diff options
-rw-r--r-- | src/libmain/common-args.cc | 4 | ||||
-rw-r--r-- | tests/user-envs.sh | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libmain/common-args.cc b/src/libmain/common-args.cc index d3aac6aba..bcc05c2cd 100644 --- a/src/libmain/common-args.cc +++ b/src/libmain/common-args.cc @@ -37,6 +37,10 @@ MixCommonArgs::MixCommonArgs(const string & programName) std::string cat = "config"; settings.convertToArgs(*this, cat); + + // Backward compatibility hack: nix-env already had a --system flag. + if (programName == "nix-env") longFlags.erase("system"); + hiddenCategories.insert(cat); } diff --git a/tests/user-envs.sh b/tests/user-envs.sh index c4192fdc5..ba6392311 100644 --- a/tests/user-envs.sh +++ b/tests/user-envs.sh @@ -24,6 +24,9 @@ rm -f $HOME/.nix-defexpr ln -s $(pwd)/user-envs.nix $HOME/.nix-defexpr nix-env -qa '*' --description | grep -q silly +# Query the system. +nix-env -qa '*' --system | grep -q $system + # Install "foo-1.0". nix-env -i foo-1.0 |