forked from lix-project/lix
206bbb5dc9
Currently only builds by attribute from <nixpkgs> or the specified file, e.g. "nix build hello".
39 lines
657 B
C++
39 lines
657 B
C++
#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);
|
|
};
|
|
|
|
}
|