5992b95b64
svn path=/nixpkgs/trunk/; revision=6124
31 lines
560 B
Nix
31 lines
560 B
Nix
{ system
|
|
, name
|
|
, shell
|
|
, path
|
|
, extraEnv ? {}
|
|
, extraShellOptions ? []
|
|
}:
|
|
|
|
let {
|
|
body =
|
|
derivation ({
|
|
inherit system name;
|
|
initialPath = path;
|
|
builder = shell;
|
|
args = extraShellOptions ++ ["-e" ./builder.sh];
|
|
} // extraEnv)
|
|
|
|
// {
|
|
mkDerivation = attrs:
|
|
derivation ((removeAttrs attrs ["meta"]) // {
|
|
builder = shell;
|
|
args = extraShellOptions ++ ["-e" attrs.builder];
|
|
stdenv = body;
|
|
system = body.system;
|
|
}
|
|
|
|
// extraEnv);
|
|
|
|
inherit shell;
|
|
};
|
|
}
|