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;
|
2006-08-15 22:25:14 +01:00
|
|
|
args = extraShellOptions ++ ["-e" attrs.builder];
|
2006-08-15 15:46:41 +01:00
|
|
|
stdenv = body;
|
|
|
|
system = body.system;
|
|
|
|
}
|
|
|
|
|
|
|
|
// extraEnv);
|
|
|
|
|
|
|
|
inherit shell;
|
|
|
|
};
|
|
|
|
}
|