2004-03-08 16:02:46 +00:00
|
|
|
# Here we construct an absolutely trivial `initial' standard
|
|
|
|
# environment. It's not actually a functional stdenv, since there is
|
|
|
|
# not necessarily a working C compiler. We need this to build
|
|
|
|
# gcc-wrapper et al. for the native stdenv.
|
|
|
|
|
|
|
|
{system, name}:
|
|
|
|
|
2004-03-29 18:23:01 +01:00
|
|
|
let {
|
|
|
|
|
2005-05-10 10:22:14 +01:00
|
|
|
shell = "/bin/bash";
|
2004-03-30 13:46:52 +01:00
|
|
|
|
2004-03-29 18:23:01 +01:00
|
|
|
body =
|
|
|
|
|
|
|
|
derivation {
|
|
|
|
inherit system name;
|
2004-03-30 13:46:52 +01:00
|
|
|
builder = shell;
|
2004-03-29 18:23:01 +01:00
|
|
|
args = ["-e" ./builder.sh];
|
2006-12-28 10:54:39 +00:00
|
|
|
stdenvScript = ../generic/setup.sh;
|
2004-03-29 18:23:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// {
|
2006-03-24 16:07:42 +00:00
|
|
|
mkDerivation = attrs: derivation ((removeAttrs attrs ["meta"]) // {
|
2004-03-30 13:46:52 +01:00
|
|
|
builder = shell;
|
2004-03-29 18:23:01 +01:00
|
|
|
args = ["-e" attrs.builder];
|
|
|
|
stdenv = body;
|
|
|
|
system = body.system;
|
|
|
|
});
|
2004-03-30 13:46:52 +01:00
|
|
|
|
|
|
|
inherit shell;
|
2004-03-29 18:23:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|