aboutsummaryrefslogtreecommitdiff
path: root/src/nix/command.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/command.hh')
-rw-r--r--src/nix/command.hh21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/nix/command.hh b/src/nix/command.hh
index b052c42b1..182b01ef9 100644
--- a/src/nix/command.hh
+++ b/src/nix/command.hh
@@ -93,6 +93,8 @@ private:
Value * vSourceExpr = 0;
};
+enum RealiseMode { Build, NoBuild, DryRun };
+
/* A command that operates on a list of "installables", which can be
store paths, attribute paths, Nix expressions, etc. */
struct InstallablesCommand : virtual Args, SourceExprCommand
@@ -104,12 +106,6 @@ struct InstallablesCommand : virtual Args, SourceExprCommand
expectArgs("installables", &_installables);
}
- enum RealiseMode { Build, NoBuild, DryRun };
-
- Buildables toBuildables(ref<Store> store, RealiseMode mode);
-
- PathSet toStorePaths(ref<Store> store, RealiseMode mode);
-
void prepare() override;
virtual bool useDefaultInstallables() { return true; }
@@ -198,4 +194,17 @@ struct RegisterCommand
}
};
+std::shared_ptr<Installable> parseInstallable(
+ SourceExprCommand & cmd, ref<Store> store, const std::string & installable,
+ bool useDefaultInstallables);
+
+Buildables toBuildables(ref<Store> store, RealiseMode mode,
+ std::vector<std::shared_ptr<Installable>> installables);
+
+PathSet toStorePaths(ref<Store> store, RealiseMode mode,
+ std::vector<std::shared_ptr<Installable>> installables);
+
+Path toStorePath(ref<Store> store, RealiseMode mode,
+ std::shared_ptr<Installable> installable);
+
}