forked from mirrors/nixpkgs
290d47d0f3
svn path=/nixpkgs/trunk/; revision=18337
32 lines
661 B
Nix
32 lines
661 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]; # (if attrs ? builder then [attrs.builder] else [ ../fix-builder.sh ../default-builder.sh] ) ;
|
|
stdenv = body;
|
|
system = body.system;
|
|
}
|
|
|
|
// extraEnv);
|
|
|
|
inherit shell;
|
|
};
|
|
}
|