2016-12-16 13:22:02 +00:00
|
|
|
{ lib
|
2020-03-01 19:22:16 +00:00
|
|
|
, localSystem, crossSystem, config, overlays, crossOverlays ? []
|
2015-11-26 02:35:12 +00:00
|
|
|
}:
|
|
|
|
|
2018-12-05 03:06:46 +00:00
|
|
|
assert crossSystem == localSystem;
|
2020-03-01 19:22:16 +00:00
|
|
|
let inherit (localSystem) system;
|
|
|
|
fetchURL = import <nix/fetchurl.nix>;
|
|
|
|
trivialBuilder = (import ./trivial-builder.nix);
|
|
|
|
make = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "make";
|
|
|
|
ver = "4.3";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.gz";
|
|
|
|
sha256 = "06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--without-libintl-prefix"
|
|
|
|
"--without-libiconv-prefix"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
bash = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "bash";
|
|
|
|
ver = "4.4.18";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.gz";
|
|
|
|
sha256 = "08vz660768mnnax7n8d4d85jxafwdmsxsi7fh0hzvmafbvn9wkb0";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--without-libintl-prefix"
|
|
|
|
"--without-libiconv-prefix"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
coreutils = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "coreutils";
|
|
|
|
ver = "8.31";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
|
|
|
|
sha256 = "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--without-libintl-prefix"
|
|
|
|
"--without-libiconv-prefix"
|
|
|
|
"--without-gmp"
|
|
|
|
"--without-libpth-prefix"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
findutils = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "findutils";
|
|
|
|
ver = "4.7.0";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
|
|
|
|
sha256 = "16kqz9yz98dasmj70jwf5py7jk558w96w0vgp3zf9xsqk3gzpzn5";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--without-libintl-prefix"
|
|
|
|
"--without-libiconv-prefix"
|
|
|
|
"--without-gmp"
|
|
|
|
"--without-libpth-prefix"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
diffutils = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "diffutils";
|
|
|
|
ver = "3.7";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
|
|
|
|
sha256 = "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--without-libintl-prefix"
|
|
|
|
"--without-libiconv-prefix"
|
|
|
|
"--without-libsigsegv-prefix"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
grep = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "grep";
|
|
|
|
ver = "3.4";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
|
|
|
|
sha256 = "1yy33kiwrxrwj2nxa4fg15bvmwyghqbs8qwkdvy5phm784f7brjq";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--without-libintl-prefix"
|
|
|
|
"--without-libiconv-prefix"
|
|
|
|
"--disable-perl-regexp"
|
|
|
|
"--without-libsegsegv-prefix"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
patch = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "patch";
|
|
|
|
ver = "2.7.6";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
|
|
|
|
sha256 = "1zfqy4rdcy279vwn2z1kbv19dcfw25d2aqy9nzvdkq5bjzd0nqdc";
|
|
|
|
};
|
|
|
|
gawk = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "gawk";
|
|
|
|
ver = "5.0.1";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
|
|
|
|
sha256 = "15570p7g2x54asvr2fsc56sxzmm08fbk4mzpcs5n92fp9vq8cklf";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--disable-mpfr"
|
|
|
|
"--without-libintl-prefix"
|
|
|
|
"--without-libiconv-prefix"
|
|
|
|
"--without-libsegsegv-prefix"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
cpio = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "cpio";
|
|
|
|
ver = "2.13";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.gz";
|
|
|
|
sha256 = "126vyg4a8wcdwh6npgvxy6gq433bzgz3ph37hmjpycc4r7cp0x78";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--without-libintl-prefix"
|
|
|
|
"--without-libiconv-prefix"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
sed = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "sed";
|
|
|
|
ver = "4.8";
|
|
|
|
url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
|
|
|
|
sha256 = "0cznxw73fzv1n3nj2zsq6nf73rvsbxndp444xkpahdqvlzz0r6zp";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--without-libintl-prefix"
|
|
|
|
"--without-libiconv-prefix"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
cacert = fetchURL rec {
|
|
|
|
url = "https://curl.haxx.se/ca/cacert-2020-01-01.pem";
|
|
|
|
sha256 = "07q808n307gzaga93abpf6an7c3rd35p18psdc1dd83lspgp1xxd";
|
|
|
|
executable = false;
|
|
|
|
};
|
|
|
|
curl = trivialBuilder rec {
|
|
|
|
inherit (localSystem) system;
|
|
|
|
name = "curl";
|
|
|
|
ver = "7.68.0";
|
|
|
|
url = "https://curl.haxx.se/download/${name}-${ver}.tar.xz";
|
|
|
|
sha256 = "0nh3j90w6b97wqcgxjfq55qhkz9s38955fbhwzv2fsi7483j895p";
|
|
|
|
configureArgs = [ "--disable-nls"
|
|
|
|
"--disable-ares"
|
|
|
|
"--disable-debug"
|
|
|
|
"--disable-ldap"
|
|
|
|
"--disable-ldaps"
|
|
|
|
"--disable-rtsp"
|
|
|
|
"--disable-dict"
|
|
|
|
"--disable-telnet"
|
|
|
|
"--disable-tftp"
|
|
|
|
"--disable-pop3"
|
|
|
|
"--disable-imap"
|
|
|
|
"--disable-smb"
|
|
|
|
"--disable-smtp"
|
|
|
|
"--disable-gopher"
|
|
|
|
"--disable-manual"
|
|
|
|
"--disable-verbose"
|
|
|
|
"--disable-sspi"
|
|
|
|
"--disable-tls-srp"
|
|
|
|
"--disable-unix-sockets"
|
|
|
|
"--without-brotli"
|
|
|
|
"--without-gnutls"
|
|
|
|
"--without-mbedtls"
|
|
|
|
"--without-wolfssl"
|
|
|
|
"--without-bearssl"
|
|
|
|
"--without-libidn2"
|
|
|
|
"--without-librtmp"
|
|
|
|
"--without-nghttp2"
|
|
|
|
"--with-ssl=/usr"
|
|
|
|
"--with-ca-bundle=${cacert}"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
bashExe = "${bash}/bin/bash";
|
|
|
|
in
|
2016-12-16 13:22:02 +00:00
|
|
|
[
|
2015-11-26 02:35:12 +00:00
|
|
|
|
2016-12-16 13:22:02 +00:00
|
|
|
({}: {
|
|
|
|
__raw = true;
|
2015-11-26 02:35:12 +00:00
|
|
|
|
2021-04-26 15:21:17 +00:00
|
|
|
bootstrapTools = derivation ({
|
2016-12-16 13:22:02 +00:00
|
|
|
inherit system;
|
2020-03-01 19:22:16 +00:00
|
|
|
inherit make bash coreutils findutils
|
|
|
|
diffutils grep patch gawk cpio sed
|
|
|
|
curl;
|
2016-12-16 13:22:02 +00:00
|
|
|
|
|
|
|
name = "trivial-bootstrap-tools";
|
2020-03-01 19:22:16 +00:00
|
|
|
builder = bashExe;
|
2016-12-16 13:22:02 +00:00
|
|
|
args = [ ./trivial-bootstrap.sh ];
|
2020-03-01 19:22:16 +00:00
|
|
|
buildInputs = [ make ];
|
2016-12-16 13:22:02 +00:00
|
|
|
mkdir = "/bin/mkdir";
|
|
|
|
ln = "/bin/ln";
|
2022-04-27 20:21:32 +00:00
|
|
|
} // lib.optionalAttrs config.contentAddressedByDefault {
|
2021-04-26 15:21:17 +00:00
|
|
|
__contentAddressed = true;
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
});
|
2016-12-16 13:22:02 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
({ bootstrapTools, ... }: rec {
|
|
|
|
__raw = true;
|
|
|
|
|
|
|
|
inherit bootstrapTools;
|
|
|
|
|
|
|
|
fetchurl = import ../../build-support/fetchurl {
|
2018-02-17 18:44:43 +00:00
|
|
|
inherit lib;
|
|
|
|
stdenvNoCC = stdenv;
|
2016-12-16 13:22:02 +00:00
|
|
|
curl = bootstrapTools;
|
|
|
|
};
|
2015-11-26 02:35:12 +00:00
|
|
|
|
|
|
|
stdenv = import ../generic {
|
|
|
|
name = "stdenv-freebsd-boot-1";
|
2017-07-06 01:47:48 +00:00
|
|
|
buildPlatform = localSystem;
|
|
|
|
hostPlatform = localSystem;
|
|
|
|
targetPlatform = localSystem;
|
2017-05-22 01:37:16 +00:00
|
|
|
inherit config;
|
2016-12-16 13:22:02 +00:00
|
|
|
initialPath = [ "/" "/usr" ];
|
|
|
|
shell = "${bootstrapTools}/bin/bash";
|
2015-11-28 15:06:15 +00:00
|
|
|
fetchurlBoot = null;
|
|
|
|
cc = null;
|
2016-12-16 13:22:02 +00:00
|
|
|
overrides = self: super: {
|
2015-11-28 15:06:15 +00:00
|
|
|
};
|
2016-12-16 13:22:02 +00:00
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
(prevStage: {
|
|
|
|
__raw = true;
|
|
|
|
|
2020-03-01 19:22:16 +00:00
|
|
|
inherit (prevStage) bootstrapTools;
|
|
|
|
|
2016-12-16 13:22:02 +00:00
|
|
|
stdenv = import ../generic {
|
|
|
|
name = "stdenv-freebsd-boot-0";
|
2017-05-22 01:37:16 +00:00
|
|
|
inherit config;
|
2016-12-16 13:22:02 +00:00
|
|
|
initialPath = [ prevStage.bootstrapTools ];
|
2017-05-22 01:37:16 +00:00
|
|
|
inherit (prevStage.stdenv)
|
2017-08-21 22:26:08 +00:00
|
|
|
buildPlatform hostPlatform targetPlatform
|
|
|
|
shell;
|
2016-12-16 13:22:02 +00:00
|
|
|
fetchurlBoot = prevStage.fetchurl;
|
|
|
|
cc = null;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
(prevStage: {
|
2016-12-24 18:55:11 +00:00
|
|
|
inherit config overlays;
|
2020-03-01 19:22:16 +00:00
|
|
|
stdenv = import ../generic rec {
|
2016-12-16 13:22:02 +00:00
|
|
|
name = "stdenv-freebsd-boot-3";
|
2017-05-22 01:37:16 +00:00
|
|
|
inherit config;
|
2016-12-16 13:22:02 +00:00
|
|
|
|
|
|
|
inherit (prevStage.stdenv)
|
2017-08-21 22:26:08 +00:00
|
|
|
buildPlatform hostPlatform targetPlatform
|
|
|
|
initialPath shell fetchurlBoot;
|
2016-12-16 13:22:02 +00:00
|
|
|
|
2021-04-10 19:25:46 +00:00
|
|
|
cc = lib.makeOverridable (import ../../build-support/cc-wrapper) {
|
2020-03-01 19:22:16 +00:00
|
|
|
inherit lib;
|
2016-12-16 13:22:02 +00:00
|
|
|
nativeTools = true;
|
|
|
|
nativePrefix = "/usr";
|
|
|
|
nativeLibc = true;
|
2017-09-20 15:07:52 +00:00
|
|
|
stdenvNoCC = prevStage.stdenv;
|
2020-03-01 19:22:16 +00:00
|
|
|
buildPackages = {
|
|
|
|
inherit (prevStage) stdenv;
|
|
|
|
};
|
2016-12-16 13:22:02 +00:00
|
|
|
cc = {
|
|
|
|
name = "clang-9.9.9";
|
|
|
|
cc = "/usr";
|
2020-03-01 19:22:16 +00:00
|
|
|
outPath = prevStage.bootstrapTools;
|
2016-12-16 13:22:02 +00:00
|
|
|
};
|
|
|
|
isClang = true;
|
2020-03-01 19:22:16 +00:00
|
|
|
bintools = import ../../build-support/bintools-wrapper {
|
|
|
|
inherit lib;
|
|
|
|
stdenvNoCC = prevStage.stdenv;
|
|
|
|
nativeTools = true;
|
|
|
|
nativeLibc = true;
|
|
|
|
propagateDoc = false;
|
|
|
|
nativePrefix = "/usr";
|
|
|
|
bintools = { name = "${name}-binutils";
|
|
|
|
outPath = prevStage.bootstrapTools; };
|
|
|
|
};
|
2015-11-28 15:06:15 +00:00
|
|
|
};
|
2016-12-16 13:22:02 +00:00
|
|
|
|
2021-01-24 09:19:10 +00:00
|
|
|
preHook = "export NIX_NO_SELF_RPATH=1";
|
2015-11-26 02:35:12 +00:00
|
|
|
};
|
2016-12-16 13:22:02 +00:00
|
|
|
})
|
2015-11-26 02:35:12 +00:00
|
|
|
|
2016-12-16 13:22:02 +00:00
|
|
|
]
|