aboutsummaryrefslogtreecommitdiff
path: root/src/nix/command.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-07-12 16:28:39 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-07-12 16:36:34 +0200
commitaa82f8b2d2a2c42f0d713e8404b668cef1a4b108 (patch)
tree66f883d00898d6de01b1e4fac0b387393090e2aa /src/nix/command.hh
parent731bc65ec04900834ca5e5b8e9dae1aa8c2c1027 (diff)
nix dev-shell: Make it possible to enter a profile
For example: $ nix dev-shell --profile /tmp/my-shell dwarffs (later) $ nix dev-shell /tmp/my-shell
Diffstat (limited to 'src/nix/command.hh')
-rw-r--r--src/nix/command.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nix/command.hh b/src/nix/command.hh
index d6153e42b..00c202f20 100644
--- a/src/nix/command.hh
+++ b/src/nix/command.hh
@@ -64,6 +64,13 @@ struct Installable
{
throw Error("argument '%s' cannot be evaluated", what());
}
+
+ /* Return a value only if this installable is a store path or a
+ symlink to it. */
+ virtual std::optional<Path> getStorePath()
+ {
+ return {};
+ }
};
struct EvalCommand : virtual StoreCommand, MixEvalArgs