diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-04-01 00:03:50 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-04-01 00:03:50 +0200 |
commit | 4fdec5f61d5eef5f78ecfd7cbfea491979f15ac9 (patch) | |
tree | 7b16b299944cf158d54e7487640f3864ed3083a2 /src/nix | |
parent | 03b56e96bfa89e82beee3f57de79d64c9f173afd (diff) | |
parent | a7540294cfae82c098e8691cd5212a9184add574 (diff) |
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/build.cc | 2 | ||||
-rw-r--r-- | src/nix/command.hh | 2 | ||||
-rw-r--r-- | src/nix/installables.hh | 2 | ||||
-rw-r--r-- | src/nix/shell.cc | 23 |
4 files changed, 7 insertions, 22 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc index ae931873f..613bd9efb 100644 --- a/src/nix/build.cc +++ b/src/nix/build.cc @@ -6,7 +6,7 @@ using namespace nix; -struct CmdBuild : MixDryRun, MixProfile, InstallablesCommand +struct CmdBuild : InstallablesCommand, MixDryRun, MixProfile { Path outLink = "result"; diff --git a/src/nix/command.hh b/src/nix/command.hh index 305ce5588..8b910ba78 100644 --- a/src/nix/command.hh +++ b/src/nix/command.hh @@ -171,7 +171,7 @@ std::set<StorePath> toDerivations(ref<Store> store, filename:lineno. */ Strings editorFor(const Pos & pos); -struct MixProfile : virtual Args, virtual StoreCommand +struct MixProfile : virtual StoreCommand { std::optional<Path> profile; diff --git a/src/nix/installables.hh b/src/nix/installables.hh index a96b07718..8f2d50077 100644 --- a/src/nix/installables.hh +++ b/src/nix/installables.hh @@ -2,8 +2,8 @@ #include "util.hh" #include "path.hh" -#include "flake/eval-cache.hh" #include "eval.hh" +#include "flake/eval-cache.hh" #include <optional> diff --git a/src/nix/shell.cc b/src/nix/shell.cc index bee0bddcc..439ef02ed 100644 --- a/src/nix/shell.cc +++ b/src/nix/shell.cc @@ -92,7 +92,7 @@ StorePath getDerivationEnvironment(ref<Store> store, Derivation drv) { auto builder = baseNameOf(drv.builder); if (builder != "bash") - throw Error("'nix shell' only works on derivations that use 'bash' as their builder"); + throw Error("'nix dev-shell' only works on derivations that use 'bash' as their builder"); drv.args = { "-c", @@ -136,21 +136,6 @@ StorePath getDerivationEnvironment(ref<Store> store, Derivation drv) struct Common : InstallableCommand, MixProfile { - /* - std::set<string> keepVars{ - "DISPLAY", - "HOME", - "IN_NIX_SHELL", - "LOGNAME", - "NIX_BUILD_SHELL", - "PAGER", - "PATH", - "TERM", - "TZ", - "USER", - }; - */ - std::set<string> ignoreVars{ "BASHOPTS", "EUID", @@ -258,7 +243,7 @@ struct CmdDevShell : Common, MixEnvironment return { Example{ "To get the build environment of GNU hello:", - "nix dev-shell nixpkgs:hello" + "nix dev-shell nixpkgs#hello" }, Example{ "To get the build environment of the default package of flake in the current directory:", @@ -266,7 +251,7 @@ struct CmdDevShell : Common, MixEnvironment }, Example{ "To store the build environment in a profile:", - "nix dev-shell --profile /tmp/my-shell nixpkgs:hello" + "nix dev-shell --profile /tmp/my-shell nixpkgs#hello" }, Example{ "To use a build environment previously recorded in a profile:", @@ -324,7 +309,7 @@ struct CmdPrintDevEnv : Common return { Example{ "To apply the build environment of GNU hello to the current shell:", - ". <(nix print-dev-env nixpkgs:hello)" + ". <(nix print-dev-env nixpkgs#hello)" }, }; } |