2004-03-30 14:46:52 +02:00
|
|
|
{ stdenv, name, preHook ? null, postHook ? null, initialPath, gcc, shell
|
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;
|
|
|
|
|
2004-03-30 14:46:52 +02:00
|
|
|
inherit preHook postHook initialPath gcc shell;
|
2004-03-29 19:23:01 +02:00
|
|
|
|
|
|
|
# TODO: make this more elegant.
|
|
|
|
inherit param1 param2 param3 param4 param5;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Add a utility function to produce derivations that use this
|
2004-03-30 14:46:52 +02:00
|
|
|
# stdenv and its shell.
|
2004-03-29 19:23:01 +02:00
|
|
|
// {
|
|
|
|
mkDerivation = attrs: derivation (attrs // {
|
2004-03-30 14:46:52 +02:00
|
|
|
builder = shell;
|
2004-03-29 19:23:01 +02:00
|
|
|
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
|
|
|
}
|