2016-12-16 16:22:02 +03:00
|
|
|
{ lib
|
2016-12-24 21:55:11 +03:00
|
|
|
, localSystem, crossSystem, config, overlays
|
2015-11-26 05:35:12 +03:00
|
|
|
}:
|
|
|
|
|
2016-12-01 02:51:13 +03:00
|
|
|
assert crossSystem == null;
|
2016-12-24 21:55:11 +03:00
|
|
|
let inherit (localSystem) system; in
|
2016-12-01 02:51:13 +03:00
|
|
|
|
2015-11-26 05:35:12 +03:00
|
|
|
|
2016-12-16 16:22:02 +03:00
|
|
|
[
|
2015-11-26 05:35:12 +03:00
|
|
|
|
2016-12-16 16:22:02 +03:00
|
|
|
({}: {
|
|
|
|
__raw = true;
|
2015-11-26 05:35:12 +03:00
|
|
|
|
2016-12-16 16:22:02 +03:00
|
|
|
bootstrapTools = derivation {
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
name = "trivial-bootstrap-tools";
|
|
|
|
builder = "/usr/local/bin/bash";
|
|
|
|
args = [ ./trivial-bootstrap.sh ];
|
|
|
|
|
|
|
|
mkdir = "/bin/mkdir";
|
|
|
|
ln = "/bin/ln";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
({ bootstrapTools, ... }: rec {
|
|
|
|
__raw = true;
|
|
|
|
|
|
|
|
inherit bootstrapTools;
|
|
|
|
|
|
|
|
fetchurl = import ../../build-support/fetchurl {
|
|
|
|
inherit stdenv;
|
|
|
|
curl = bootstrapTools;
|
|
|
|
};
|
2015-11-26 05:35:12 +03:00
|
|
|
|
|
|
|
stdenv = import ../generic {
|
|
|
|
name = "stdenv-freebsd-boot-1";
|
|
|
|
inherit system config;
|
2016-12-16 16:22:02 +03:00
|
|
|
initialPath = [ "/" "/usr" ];
|
|
|
|
shell = "${bootstrapTools}/bin/bash";
|
2015-11-28 18:06:15 +03:00
|
|
|
fetchurlBoot = null;
|
|
|
|
cc = null;
|
2016-12-16 16:22:02 +03:00
|
|
|
overrides = self: super: {
|
2015-11-28 18:06:15 +03:00
|
|
|
};
|
2016-12-16 16:22:02 +03:00
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
(prevStage: {
|
|
|
|
__raw = true;
|
|
|
|
|
|
|
|
stdenv = import ../generic {
|
|
|
|
name = "stdenv-freebsd-boot-0";
|
|
|
|
inherit system config;
|
|
|
|
initialPath = [ prevStage.bootstrapTools ];
|
|
|
|
inherit (prevStage.stdenv) shell;
|
|
|
|
fetchurlBoot = prevStage.fetchurl;
|
|
|
|
cc = null;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
(prevStage: {
|
2016-12-24 21:55:11 +03:00
|
|
|
buildPlatform = localSystem;
|
|
|
|
hostPlatform = localSystem;
|
|
|
|
targetPlatform = localSystem;
|
|
|
|
inherit config overlays;
|
2016-12-16 16:22:02 +03:00
|
|
|
stdenv = import ../generic {
|
|
|
|
name = "stdenv-freebsd-boot-3";
|
|
|
|
inherit system config;
|
|
|
|
|
|
|
|
inherit (prevStage.stdenv)
|
|
|
|
initialPath shell fetchurlBoot;
|
|
|
|
|
|
|
|
cc = import ../../build-support/cc-wrapper {
|
|
|
|
nativeTools = true;
|
|
|
|
nativePrefix = "/usr";
|
|
|
|
nativeLibc = true;
|
|
|
|
inherit (prevStage) stdenv;
|
|
|
|
cc = {
|
|
|
|
name = "clang-9.9.9";
|
|
|
|
cc = "/usr";
|
|
|
|
outPath = "/usr";
|
|
|
|
};
|
|
|
|
isClang = true;
|
2015-11-28 18:06:15 +03:00
|
|
|
};
|
2016-12-16 16:22:02 +03:00
|
|
|
|
|
|
|
preHook = ''export NIX_NO_SELF_RPATH=1'';
|
2015-11-26 05:35:12 +03:00
|
|
|
};
|
2016-12-16 16:22:02 +03:00
|
|
|
})
|
2015-11-26 05:35:12 +03:00
|
|
|
|
2016-12-16 16:22:02 +03:00
|
|
|
]
|