aboutsummaryrefslogtreecommitdiff
path: root/src/nix/develop.cc
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-07-13 11:44:19 +0200
committerregnat <rg@regnat.ovh>2021-07-13 17:25:27 +0200
commit037c86ee04d681170cedaf71f9d75c186abe9719 (patch)
tree7a9f63e2a089033b0a12a398addfafb78db52dc7 /src/nix/develop.cc
parenteb4788954de4546787cce2e4ecd660fc55fe2e85 (diff)
nix develop: Search in `devShells.${system}` by default
Make `nix develop .#foo` search `.#devShells.${system}.foo` first
Diffstat (limited to 'src/nix/develop.cc')
-rw-r--r--src/nix/develop.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index 26f53db09..9ac2791f8 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -326,6 +326,12 @@ struct Common : InstallableCommand, MixProfile
{
return {"devShell." + settings.thisSystem.get(), "defaultPackage." + settings.thisSystem.get()};
}
+ Strings getDefaultFlakeAttrPathPrefixes() override
+ {
+ auto res = SourceExprCommand::getDefaultFlakeAttrPathPrefixes();
+ res.emplace_front("devShells." + settings.thisSystem.get());
+ return res;
+ }
StorePath getShellOutPath(ref<Store> store)
{