mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
nix develop: Search in devShells.${system}
by default
Make `nix develop .#foo` search `.#devShells.${system}.foo` first
This commit is contained in:
parent
eb4788954d
commit
037c86ee04
2 changed files with 16 additions and 1 deletions
|
@ -326,6 +326,12 @@ struct Common : InstallableCommand, MixProfile
|
||||||
{
|
{
|
||||||
return {"devShell." + settings.thisSystem.get(), "defaultPackage." + settings.thisSystem.get()};
|
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)
|
StorePath getShellOutPath(ref<Store> store)
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,11 +84,20 @@ the flake's `nixConfig` attribute.
|
||||||
|
|
||||||
# Flake output attributes
|
# Flake output attributes
|
||||||
|
|
||||||
If no flake output attribute is given, `nix run` tries the following
|
If no flake output attribute is given, `nix develop` tries the following
|
||||||
flake output attributes:
|
flake output attributes:
|
||||||
|
|
||||||
* `devShell.<system>`
|
* `devShell.<system>`
|
||||||
|
|
||||||
* `defaultPackage.<system>`
|
* `defaultPackage.<system>`
|
||||||
|
|
||||||
|
If a flake output *name* is given, `nix develop` tries the following flake
|
||||||
|
output attributes:
|
||||||
|
|
||||||
|
* `devShells.<system>.<name>`
|
||||||
|
|
||||||
|
* `packages.<system>.<name>`
|
||||||
|
|
||||||
|
* `legacyPackages.<system>.<name>`
|
||||||
|
|
||||||
)""
|
)""
|
||||||
|
|
Loading…
Reference in a new issue