aboutsummaryrefslogtreecommitdiff
path: root/src/nix/develop.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-07-15 20:22:52 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-07-15 20:25:10 +0200
commit3624c042ace05db88794e87ee37f3296bab19bc8 (patch)
treea4fc56352803236c73cd4abaa3a96cae14725809 /src/nix/develop.cc
parentdfe8f3ebc6c5a3d96528794b8822536aac718046 (diff)
nix: Add --derivation flag to operate on .drv paths
For instance, 'nix why-depends --use-derivation nixpkgs#hello nixpkgs#glibc' shows why hello's .drv depends on glibc's .drv.
Diffstat (limited to 'src/nix/develop.cc')
-rw-r--r--src/nix/develop.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index bf4890e95..a6d7d6add 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -321,7 +321,8 @@ struct CmdDevelop : Common, MixEnvironment
Strings{"legacyPackages." + settings.thisSystem.get() + "."},
lockFlags);
- shell = state->store->printStorePath(toStorePath(state->store, Realise::Outputs, bashInstallable)) + "/bin/bash";
+ shell = state->store->printStorePath(
+ toStorePath(state->store, Realise::Outputs, OperateOn::Output, bashInstallable)) + "/bin/bash";
} catch (Error &) {
ignoreException();
}