mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
Merge pull request #6518 from edolstra/fix-nix-develop
nix develop: Find bin/bash in the bashInteractive outputs
This commit is contained in:
commit
73b9b008f0
1 changed files with 14 additions and 3 deletions
|
@ -512,9 +512,20 @@ struct CmdDevelop : Common, MixEnvironment
|
||||||
Strings{"legacyPackages." + settings.thisSystem.get() + "."},
|
Strings{"legacyPackages." + settings.thisSystem.get() + "."},
|
||||||
nixpkgsLockFlags);
|
nixpkgsLockFlags);
|
||||||
|
|
||||||
shell = store->printStorePath(
|
bool found = false;
|
||||||
Installable::toStorePath(getEvalStore(), store, Realise::Outputs, OperateOn::Output, bashInstallable))
|
|
||||||
+ "/bin/bash";
|
for (auto & path : Installable::toStorePaths(getEvalStore(), store, Realise::Outputs, OperateOn::Output, {bashInstallable})) {
|
||||||
|
auto s = store->printStorePath(path) + "/bin/bash";
|
||||||
|
if (pathExists(s)) {
|
||||||
|
shell = s;
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found)
|
||||||
|
throw Error("package 'nixpkgs#bashInteractive' does not provide a 'bin/bash'");
|
||||||
|
|
||||||
} catch (Error &) {
|
} catch (Error &) {
|
||||||
ignoreException();
|
ignoreException();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue