A modern, delicious implementation of the Nix package manager, focused on correctness, usability, and growth — and committed to doing right by its community
Find a file
John Ericson 4607ac7aed Fix handling of experimental features mid-parse
If we conditionally "declare" the argument, as we did before, based upon
weather the feature is enabled, commands like

    nix --experimental-features=foo ... --thing-gated-on-foo

won't work, because the experimental feature isn't enabled until *after*
we start parsing.

Instead, allow arguments to also be associated with experimental
features (just as we did for builtins and settings), and then the
command line parser will filter out the experimental ones.

Since the effects of arguments (handler functions) are performed right
away, we get the required behavior: earlier arguments can enable later
arguments enabled!

There is just one catch: we want to keep non-positional
flags...non-positional. So if

    nix --experimental-features=foo ... --thing-gated-on-foo

works, then

    nix --thing-gated-on-foo --experimental-features=foo ...

should also work.

This is not my favorite long-term solution, but for now this is
implemented by delaying the requirement of needed experimental features
until *after* all the arguments have been parsed.
2023-03-20 11:35:34 -04:00
.github add labeler workflow 2023-03-13 18:01:21 +02:00
config
contrib
doc nix-hash: support base-64 and SRI format 2023-03-16 03:08:42 +08:00
m4
maintainers Merge pull request #7534 from fricklerhandwerk/maintainers-goals 2023-03-13 14:01:15 +01:00
misc
mk Merge pull request #8068 from DieracDelta/jr/compile_darwin 2023-03-20 11:17:46 +01:00
perl
scripts
src Fix handling of experimental features mid-parse 2023-03-20 11:35:34 -04:00
tests Write test, will fail until rest of PR 2023-03-20 09:17:33 -04:00
.dir-locals.el
.editorconfig
.gitignore
.version
boehmgc-coroutine-sp-fallback.diff Revert "Disable GC during coroutine execution + test" 2023-03-08 20:47:52 +01:00
bootstrap.sh
configure.ac Generate API docs with Doxygen 2023-03-10 12:51:06 -05:00
COPYING
default.nix add flake-compat to flake.nix and use sha256 in default.nix 2023-03-06 21:11:24 +01:00
docker.nix
flake.lock add flake-compat to flake.nix and use sha256 in default.nix 2023-03-06 21:11:24 +01:00
flake.nix Merge pull request #7989 from sysedwinistrator/flake-compat-sha256-mr 2023-03-14 17:12:50 +01:00
local.mk
Makefile Generate API docs with Doxygen 2023-03-10 12:51:06 -05:00
Makefile.config.in Generate API docs with Doxygen 2023-03-10 12:51:06 -05:00
precompiled-headers.h
README.md
shell.nix

Nix

Open Collective supporters Test

Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. Please refer to the Nix manual for more details.

Installation

On Linux and macOS the easiest way to install Nix is to run the following shell command (as a user other than root):

$ curl -L https://nixos.org/nix/install | sh

Information on additional installation methods is available on the Nix download page.

Building And Developing

See our Hacking guide in our manual for instruction on how to to set up a development environment and build Nix from source.

Additional Resources

License

Nix is released under the LGPL v2.1.