2004-03-29 19:23:01 +02:00
|
|
|
{ stdenv, name, preHook ? null, postHook ? null, initialPath, gcc, bash
|
2004-03-08 17:02:46 +01:00
|
|
|
, param1 ? "", param2 ? "", param3 ? "", param4 ? "", param5 ? ""
|
|
|
|
}:
|
|
|
|
|
2004-03-29 19:23:01 +02:00
|
|
|
let {
|
2004-03-08 17:02:46 +01:00
|
|
|
|
2004-03-29 19:23:01 +02:00
|
|
|
body =
|
2003-11-02 18:42:19 +01:00
|
|
|
|
2004-03-29 19:23:01 +02:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit name;
|
2003-11-02 18:42:19 +01:00
|
|
|
|
2004-03-29 19:23:01 +02:00
|
|
|
builder = ./builder.sh;
|
|
|
|
|
|
|
|
setup = ./setup.sh;
|
|
|
|
|
|
|
|
inherit preHook postHook initialPath gcc;
|
|
|
|
|
|
|
|
# TODO: make this more elegant.
|
|
|
|
inherit param1 param2 param3 param4 param5;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Add a utility function to produce derivations that use this
|
|
|
|
# stdenv and its the bash shell.
|
|
|
|
// {
|
|
|
|
mkDerivation = attrs: derivation (attrs // {
|
|
|
|
builder = bash;
|
|
|
|
args = ["-e" (if attrs ? builder then attrs.builder else ./default-builder.sh)];
|
|
|
|
stdenv = body;
|
|
|
|
system = body.system;
|
|
|
|
});
|
|
|
|
};
|
2003-11-02 18:42:19 +01:00
|
|
|
|
2003-11-03 11:22:00 +01:00
|
|
|
}
|