2016-12-16 14:22:02 +01:00
|
|
|
{ lib
|
2016-12-24 19:55:11 +01:00
|
|
|
, localSystem, crossSystem, config, overlays
|
2015-11-26 03:35:12 +01:00
|
|
|
}:
|
|
|
|
|
2018-12-05 04:06:46 +01:00
|
|
|
assert crossSystem == localSystem;
|
2016-12-24 19:55:11 +01:00
|
|
|
let inherit (localSystem) system; in
|
2016-12-01 00:51:13 +01:00
|
|
|
|
2015-11-26 03:35:12 +01:00
|
|
|
|
2016-12-16 14:22:02 +01:00
|
|
|
[
|
2015-11-26 03:35:12 +01:00
|
|
|
|
2016-12-16 14:22:02 +01:00
|
|
|
({}: {
|
|
|
|
__raw = true;
|
2015-11-26 03:35:12 +01:00
|
|
|
|
2016-12-16 14:22:02 +01: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 {
|
2018-02-17 19:44:43 +01:00
|
|
|
inherit lib;
|
|
|
|
stdenvNoCC = stdenv;
|
2016-12-16 14:22:02 +01:00
|
|
|
curl = bootstrapTools;
|
|
|
|
};
|
2015-11-26 03:35:12 +01:00
|
|
|
|
|
|
|
stdenv = import ../generic {
|
|
|
|
name = "stdenv-freebsd-boot-1";
|
2017-07-06 03:47:48 +02:00
|
|
|
buildPlatform = localSystem;
|
|
|
|
hostPlatform = localSystem;
|
|
|
|
targetPlatform = localSystem;
|
2017-05-22 03:37:16 +02:00
|
|
|
inherit config;
|
2016-12-16 14:22:02 +01:00
|
|
|
initialPath = [ "/" "/usr" ];
|
|
|
|
shell = "${bootstrapTools}/bin/bash";
|
2015-11-28 16:06:15 +01:00
|
|
|
fetchurlBoot = null;
|
|
|
|
cc = null;
|
2016-12-16 14:22:02 +01:00
|
|
|
overrides = self: super: {
|
2015-11-28 16:06:15 +01:00
|
|
|
};
|
2016-12-16 14:22:02 +01:00
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
(prevStage: {
|
|
|
|
__raw = true;
|
|
|
|
|
|
|
|
stdenv = import ../generic {
|
|
|
|
name = "stdenv-freebsd-boot-0";
|
2017-05-22 03:37:16 +02:00
|
|
|
inherit config;
|
2016-12-16 14:22:02 +01:00
|
|
|
initialPath = [ prevStage.bootstrapTools ];
|
2017-05-22 03:37:16 +02:00
|
|
|
inherit (prevStage.stdenv)
|
2017-08-22 00:26:08 +02:00
|
|
|
buildPlatform hostPlatform targetPlatform
|
|
|
|
shell;
|
2016-12-16 14:22:02 +01:00
|
|
|
fetchurlBoot = prevStage.fetchurl;
|
|
|
|
cc = null;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
(prevStage: {
|
2016-12-24 19:55:11 +01:00
|
|
|
inherit config overlays;
|
2016-12-16 14:22:02 +01:00
|
|
|
stdenv = import ../generic {
|
|
|
|
name = "stdenv-freebsd-boot-3";
|
2017-05-22 03:37:16 +02:00
|
|
|
inherit config;
|
2016-12-16 14:22:02 +01:00
|
|
|
|
|
|
|
inherit (prevStage.stdenv)
|
2017-08-22 00:26:08 +02:00
|
|
|
buildPlatform hostPlatform targetPlatform
|
|
|
|
initialPath shell fetchurlBoot;
|
2016-12-16 14:22:02 +01:00
|
|
|
|
|
|
|
cc = import ../../build-support/cc-wrapper {
|
|
|
|
nativeTools = true;
|
|
|
|
nativePrefix = "/usr";
|
|
|
|
nativeLibc = true;
|
2017-09-20 17:07:52 +02:00
|
|
|
stdenvNoCC = prevStage.stdenv;
|
2016-12-16 14:22:02 +01:00
|
|
|
cc = {
|
|
|
|
name = "clang-9.9.9";
|
|
|
|
cc = "/usr";
|
|
|
|
outPath = "/usr";
|
|
|
|
};
|
|
|
|
isClang = true;
|
2015-11-28 16:06:15 +01:00
|
|
|
};
|
2016-12-16 14:22:02 +01:00
|
|
|
|
|
|
|
preHook = ''export NIX_NO_SELF_RPATH=1'';
|
2015-11-26 03:35:12 +01:00
|
|
|
};
|
2016-12-16 14:22:02 +01:00
|
|
|
})
|
2015-11-26 03:35:12 +01:00
|
|
|
|
2016-12-16 14:22:02 +01:00
|
|
|
]
|