mirror of
https://github.com/NixOS/nix.git
synced 2025-11-17 07:52:43 +01:00
Move installables-related operations
This commit is contained in:
parent
b2da2a22c6
commit
54888b92de
12 changed files with 81 additions and 74 deletions
|
|
@ -307,7 +307,7 @@ struct Common : InstallableCommand, MixProfile
|
|||
for (auto & [installable_, dir_] : redirects) {
|
||||
auto dir = absPath(dir_);
|
||||
auto installable = parseInstallable(store, installable_);
|
||||
auto builtPaths = toStorePaths(
|
||||
auto builtPaths = Installable::toStorePaths(
|
||||
getEvalStore(), store, Realise::Nothing, OperateOn::Output, {installable});
|
||||
for (auto & path: builtPaths) {
|
||||
auto from = store->printStorePath(path);
|
||||
|
|
@ -347,7 +347,7 @@ struct Common : InstallableCommand, MixProfile
|
|||
if (path && hasSuffix(path->to_string(), "-env"))
|
||||
return *path;
|
||||
else {
|
||||
auto drvs = toDerivations(store, {installable});
|
||||
auto drvs = Installable::toDerivations(store, {installable});
|
||||
|
||||
if (drvs.size() != 1)
|
||||
throw Error("'%s' needs to evaluate to a single derivation, but it evaluated to %d derivations",
|
||||
|
|
@ -511,7 +511,8 @@ struct CmdDevelop : Common, MixEnvironment
|
|||
nixpkgsLockFlags);
|
||||
|
||||
shell = store->printStorePath(
|
||||
toStorePath(getEvalStore(), store, Realise::Outputs, OperateOn::Output, bashInstallable)) + "/bin/bash";
|
||||
Installable::toStorePath(getEvalStore(), store, Realise::Outputs, OperateOn::Output, bashInstallable))
|
||||
+ "/bin/bash";
|
||||
} catch (Error &) {
|
||||
ignoreException();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue