mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Improve build sytem support for readline instead of editline
Changes: - CPP variable is now `USE_READLINE` not `READLINE` - `configure.ac` supports with new CLI flag - `package.nix` supports with new configuration option - `flake.nix` CIs this (along with no markdown) Remove old Ubuntu 16.04 stop-gap too, as that is now quite old. Motivation: - editline does not build for Windows, but readline *should*. (I am still working on this in Nixpkgs at this time, however. So there will be a follow-up Nix PR removing the windows-only skipping of the readline library once I am done.) - Per https://salsa.debian.org/debian/nix/-/blob/master/debian/rules?ref_type=heads#L27 and #2551, Debian builds Nix with readline. Now we better support and CI that build configuration. This is picking up where #2551 left off, ensuring we test a few more things not merely have CPP for them. Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
This commit is contained in:
parent
b91c935c2f
commit
2cea88dbc8
4 changed files with 41 additions and 15 deletions
12
package.nix
12
package.nix
|
@ -13,6 +13,7 @@
|
|||
, changelog-d
|
||||
, curl
|
||||
, editline
|
||||
, readline
|
||||
, fileset
|
||||
, flex
|
||||
, git
|
||||
|
@ -71,6 +72,14 @@
|
|||
# Whether to enable Markdown rendering in the Nix binary.
|
||||
, enableMarkdown ? !stdenv.hostPlatform.isWindows
|
||||
|
||||
# Which interactive line editor library to use for Nix's repl.
|
||||
#
|
||||
# Currently supported choices are:
|
||||
#
|
||||
# - editline (default)
|
||||
# - readline
|
||||
, readlineFlavor ? if stdenv.hostPlatform.isWindows then "readline" else "editline"
|
||||
|
||||
# Whether to compile `rl-next.md`, the release notes for the next
|
||||
# not-yet-released version of Nix in the manul, from the individual
|
||||
# change log entries in the directory.
|
||||
|
@ -219,7 +228,7 @@ in {
|
|||
sqlite
|
||||
xz
|
||||
] ++ lib.optionals (!stdenv.hostPlatform.isWindows) [
|
||||
editline
|
||||
({ inherit readline editline; }.${readlineFlavor})
|
||||
] ++ lib.optionals enableMarkdown [
|
||||
lowdown
|
||||
] ++ lib.optionals buildUnitTests [
|
||||
|
@ -279,6 +288,7 @@ in {
|
|||
(lib.enableFeature enableManual "doc-gen")
|
||||
(lib.enableFeature enableMarkdown "markdown")
|
||||
(lib.enableFeature installUnitTests "install-unit-tests")
|
||||
(lib.withFeatureAs true "readline-flavor" readlineFlavor)
|
||||
] ++ lib.optionals (!forDevShell) [
|
||||
"--sysconfdir=/etc"
|
||||
] ++ lib.optionals installUnitTests [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue