diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-03-04T14·21+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-03-04T14·21+0100 |
commit | 7c9d7a253c52dfbf8488d3394fe8af104a3af234 (patch) | |
tree | b78f69734d35f428456dde41a87808feead701e0 /src/nix/installables.hh | |
parent | 0a26b56cba5d9f1fa815273fadc500284dda1118 (diff) | |
parent | 1b4b16cc6d9585c7bbeb871edc815137baef8f83 (diff) |
Merge branch 'new-cli'
Diffstat (limited to 'src/nix/installables.hh')
-rw-r--r-- | src/nix/installables.hh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/nix/installables.hh b/src/nix/installables.hh new file mode 100644 index 000000000000..5eb897d46148 --- /dev/null +++ b/src/nix/installables.hh @@ -0,0 +1,38 @@ +#pragma once + +#include "args.hh" + +namespace nix { + +struct UserEnvElem +{ + Strings attrPath; + + // FIXME: should use boost::variant or so. + bool isDrv; + + // Derivation case: + Path drvPath; + StringSet outputNames; + + // Non-derivation case: + PathSet outPaths; +}; + +typedef std::vector<UserEnvElem> UserEnvElems; + +struct MixInstallables : virtual Args +{ + Strings installables; + Path file = "<nixpkgs>"; + + MixInstallables() + { + mkFlag('f', "file", "file", "evaluate FILE rather than the default", &file); + expectArgs("installables", &installables); + } + + UserEnvElems evalInstallables(ref<Store> store); +}; + +} |