nixpkgs/pkgs/stdenv/freebsd/default.nix
John Ericson d240a0da1a top-level: Remove cycles: stdenv calls in top-level but not vice versa
This commit changes the dependencies of stdenv, and clean-up the stdenv
story by removing the `defaultStdenv` attribute as well as the `bootStdenv`
parameter.

Before, the final bootstrapping stage's stdenv was provided by
all-packages, which was iterating multiple times over the
top-level/default.nix expression, and non-final bootstrapping stages'
stdenvs were explicitly specified with the `bootStdenv` parameter.

Now, all stages' stdenvs are specified with the `stdenv` parameter.
For non-final bootstrapping stages, this is a small change---basically just
rename the parameter.
For the final stage, top-level/default.nix takes the chosen stdenv and
makes the final stage with it.

`allPackages` is used to make all bootstrapping stages, final and
non-final alike. It's basically the expression of `stage.nix` (along with a
few partially-applied default arguments)

Note, the make-bootstrap-tools scripts are temporarily broken
2016-11-30 19:10:59 -05:00

66 lines
1.5 KiB
Nix

{ system ? builtins.currentSystem
, allPackages ? import ../../..
, platform ? null
, config ? {}
}:
rec {
inherit allPackages;
bootstrapTools = derivation {
inherit system;
name = "trivial-bootstrap-tools";
builder = "/usr/local/bin/bash";
args = [ ./trivial-bootstrap.sh ];
mkdir = "/bin/mkdir";
ln = "/bin/ln";
};
fetchurl = import ../../build-support/fetchurl {
stdenv = import ../generic {
name = "stdenv-freebsd-boot-1";
inherit system config;
initialPath = [ "/" "/usr" ];
shell = "${bootstrapTools}/bin/bash";
fetchurlBoot = null;
cc = null;
};
curl = bootstrapTools;
};
stdenvFreeBSD = import ../generic {
name = "stdenv-freebsd-boot-3";
inherit system config;
initialPath = [ bootstrapTools ];
shell = "${bootstrapTools}/bin/bash";
fetchurlBoot = fetchurl;
cc = import ../../build-support/cc-wrapper {
nativeTools = true;
nativePrefix = "/usr";
nativeLibc = true;
stdenv = import ../generic {
inherit system config;
name = "stdenv-freebsd-boot-0";
initialPath = [ bootstrapTools ];
shell = stdenvFreeBSD.shell;
fetchurlBoot = fetchurl;
cc = null;
};
cc = {
name = "clang-9.9.9";
cc = "/usr";
outPath = "/usr";
};
isClang = true;
};
preHook = ''export NIX_NO_SELF_RPATH=1'';
};
}