2006-08-15 22:25:14 +01:00
|
|
|
{ system
|
|
|
|
, name
|
|
|
|
, shell
|
|
|
|
, path
|
|
|
|
, extraEnv ? {}
|
|
|
|
, extraShellOptions ? []
|
|
|
|
}:
|
2006-08-15 15:46:41 +01:00
|
|
|
|
|
|
|
let {
|
|
|
|
body =
|
2006-08-15 22:25:14 +01:00
|
|
|
derivation ({
|
2006-08-15 15:46:41 +01:00
|
|
|
inherit system name;
|
|
|
|
initialPath = path;
|
|
|
|
builder = shell;
|
2006-08-15 22:25:14 +01:00
|
|
|
args = extraShellOptions ++ ["-e" ./builder.sh];
|
|
|
|
} // extraEnv)
|
2006-08-15 15:46:41 +01:00
|
|
|
|
|
|
|
// {
|
|
|
|
mkDerivation = attrs:
|
|
|
|
derivation ((removeAttrs attrs ["meta"]) // {
|
|
|
|
builder = shell;
|
2009-11-13 10:30:29 +00:00
|
|
|
args = extraShellOptions ++ ["-e" ] ++ [attrs.builder]; # (if attrs ? builder then [attrs.builder] else [ ../fix-builder.sh ../default-builder.sh] ) ;
|
2006-08-15 15:46:41 +01:00
|
|
|
stdenv = body;
|
|
|
|
system = body.system;
|
|
|
|
}
|
|
|
|
|
|
|
|
// extraEnv);
|
|
|
|
|
|
|
|
inherit shell;
|
|
|
|
};
|
|
|
|
}
|