2004-03-08 08:02:46 -08: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 09:23:01 -08:00
|
|
|
let {
|
|
|
|
|
2005-05-10 02:22:14 -07:00
|
|
|
shell = "/bin/bash";
|
2004-03-30 04:46:52 -08:00
|
|
|
|
2004-03-29 09:23:01 -08:00
|
|
|
body =
|
|
|
|
|
|
|
|
derivation {
|
|
|
|
inherit system name;
|
2004-03-30 04:46:52 -08:00
|
|
|
builder = shell;
|
2004-03-29 09:23:01 -08:00
|
|
|
args = ["-e" ./builder.sh];
|
2006-12-28 02:54:39 -08:00
|
|
|
stdenvScript = ../generic/setup.sh;
|
2004-03-29 09:23:01 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// {
|
2006-03-24 08:07:42 -08:00
|
|
|
mkDerivation = attrs: derivation ((removeAttrs attrs ["meta"]) // {
|
2004-03-30 04:46:52 -08:00
|
|
|
builder = shell;
|
2004-03-29 09:23:01 -08:00
|
|
|
args = ["-e" attrs.builder];
|
|
|
|
stdenv = body;
|
|
|
|
system = body.system;
|
|
|
|
});
|
2004-03-30 04:46:52 -08:00
|
|
|
|
|
|
|
inherit shell;
|
2004-03-29 09:23:01 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|