2004-03-08 19:02:46 +03: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 21:23:01 +04:00
|
|
|
let {
|
|
|
|
|
2005-05-10 13:22:14 +04:00
|
|
|
shell = "/bin/bash";
|
2004-03-30 16:46:52 +04:00
|
|
|
|
2004-03-29 21:23:01 +04:00
|
|
|
body =
|
|
|
|
|
|
|
|
derivation {
|
|
|
|
inherit system name;
|
2004-03-30 16:46:52 +04:00
|
|
|
builder = shell;
|
2004-03-29 21:23:01 +04:00
|
|
|
args = ["-e" ./builder.sh];
|
|
|
|
}
|
|
|
|
|
|
|
|
// {
|
|
|
|
mkDerivation = attrs: derivation (attrs // {
|
2004-03-30 16:46:52 +04:00
|
|
|
builder = shell;
|
2004-03-29 21:23:01 +04:00
|
|
|
args = ["-e" attrs.builder];
|
|
|
|
stdenv = body;
|
|
|
|
system = body.system;
|
|
|
|
});
|
2004-03-30 16:46:52 +04:00
|
|
|
|
|
|
|
inherit shell;
|
2004-03-29 21:23:01 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|