ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / stdenv / freebsd / default.nix
blobde6608587605213cb8bad09f925b61274bb839a8
1 { lib
2 , localSystem, crossSystem, config, overlays, crossOverlays ? []
3 }:
5 assert crossSystem == localSystem;
6 let inherit (localSystem) system;
7     fetchURL = import <nix/fetchurl.nix>;
8     trivialBuilder = (import ./trivial-builder.nix);
9     make = trivialBuilder rec {
10       inherit (localSystem) system;
11       name = "make";
12       ver = "4.3";
13       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.gz";
14       sha256 = "06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0";
15       configureArgs = [ "--disable-nls"
16                         "--without-libintl-prefix"
17                         "--without-libiconv-prefix"
18                       ];
19     };
20     bash = trivialBuilder rec {
21       inherit (localSystem) system;
22       name = "bash";
23       ver = "4.4.18";
24       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.gz";
25       sha256 = "08vz660768mnnax7n8d4d85jxafwdmsxsi7fh0hzvmafbvn9wkb0";
26       configureArgs = [ "--disable-nls"
27                         "--without-libintl-prefix"
28                         "--without-libiconv-prefix"
29                       ];
30     };
31     coreutils = trivialBuilder rec {
32       inherit (localSystem) system;
33       name = "coreutils";
34       ver = "8.31";
35       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
36       sha256 = "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz";
37       configureArgs = [ "--disable-nls"
38                         "--without-libintl-prefix"
39                         "--without-libiconv-prefix"
40                         "--without-gmp"
41                         "--without-libpth-prefix"
42                       ];
43     };
44     findutils = trivialBuilder rec {
45       inherit (localSystem) system;
46       name = "findutils";
47       ver = "4.7.0";
48       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
49       sha256 = "16kqz9yz98dasmj70jwf5py7jk558w96w0vgp3zf9xsqk3gzpzn5";
50       configureArgs = [ "--disable-nls"
51                         "--without-libintl-prefix"
52                         "--without-libiconv-prefix"
53                         "--without-gmp"
54                         "--without-libpth-prefix"
55                       ];
56     };
57     diffutils = trivialBuilder rec {
58       inherit (localSystem) system;
59       name = "diffutils";
60       ver = "3.7";
61       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
62       sha256 = "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk";
63       configureArgs = [ "--disable-nls"
64                         "--without-libintl-prefix"
65                         "--without-libiconv-prefix"
66                         "--without-libsigsegv-prefix"
67                       ];
68     };
69     grep = trivialBuilder rec {
70       inherit (localSystem) system;
71       name = "grep";
72       ver = "3.4";
73       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
74       sha256 = "1yy33kiwrxrwj2nxa4fg15bvmwyghqbs8qwkdvy5phm784f7brjq";
75       configureArgs = [ "--disable-nls"
76                         "--without-libintl-prefix"
77                         "--without-libiconv-prefix"
78                         "--disable-perl-regexp"
79                         "--without-libsegsegv-prefix"
80                       ];
81     };
82     patch = trivialBuilder rec {
83       inherit (localSystem) system;
84       name = "patch";
85       ver = "2.7.6";
86       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
87       sha256 = "1zfqy4rdcy279vwn2z1kbv19dcfw25d2aqy9nzvdkq5bjzd0nqdc";
88     };
89     gawk = trivialBuilder rec {
90       inherit (localSystem) system;
91       name = "gawk";
92       ver = "5.0.1";
93       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
94       sha256 = "15570p7g2x54asvr2fsc56sxzmm08fbk4mzpcs5n92fp9vq8cklf";
95       configureArgs = [ "--disable-nls"
96                         "--disable-mpfr"
97                         "--without-libintl-prefix"
98                         "--without-libiconv-prefix"
99                         "--without-libsegsegv-prefix"
100                       ];
101     };
102     cpio = trivialBuilder rec {
103       inherit (localSystem) system;
104       name = "cpio";
105       ver = "2.13";
106       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.gz";
107       sha256 = "126vyg4a8wcdwh6npgvxy6gq433bzgz3ph37hmjpycc4r7cp0x78";
108       configureArgs = [ "--disable-nls"
109                         "--without-libintl-prefix"
110                         "--without-libiconv-prefix"
111                       ];
112     };
113     sed = trivialBuilder rec {
114       inherit (localSystem) system;
115       name = "sed";
116       ver = "4.8";
117       url = "https://ftp.gnu.org/gnu/${name}/${name}-${ver}.tar.xz";
118       sha256 = "0cznxw73fzv1n3nj2zsq6nf73rvsbxndp444xkpahdqvlzz0r6zp";
119       configureArgs = [ "--disable-nls"
120                         "--without-libintl-prefix"
121                         "--without-libiconv-prefix"
122                       ];
123     };
124     cacert = fetchURL rec {
125       url = "https://curl.haxx.se/ca/cacert-2020-01-01.pem";
126       sha256 = "07q808n307gzaga93abpf6an7c3rd35p18psdc1dd83lspgp1xxd";
127       executable = false;
128     };
129     curl = trivialBuilder rec {
130       inherit (localSystem) system;
131       name = "curl";
132       ver = "7.68.0";
133       url = "https://curl.haxx.se/download/${name}-${ver}.tar.xz";
134       sha256 = "0nh3j90w6b97wqcgxjfq55qhkz9s38955fbhwzv2fsi7483j895p";
135       configureArgs = [ "--disable-nls"
136                         "--disable-ares"
137                         "--disable-debug"
138                         "--disable-ldap"
139                         "--disable-ldaps"
140                         "--disable-rtsp"
141                         "--disable-dict"
142                         "--disable-telnet"
143                         "--disable-tftp"
144                         "--disable-pop3"
145                         "--disable-imap"
146                         "--disable-smb"
147                         "--disable-smtp"
148                         "--disable-gopher"
149                         "--disable-manual"
150                         "--disable-verbose"
151                         "--disable-sspi"
152                         "--disable-tls-srp"
153                         "--disable-unix-sockets"
154                         "--without-brotli"
155                         "--without-gnutls"
156                         "--without-mbedtls"
157                         "--without-wolfssl"
158                         "--without-bearssl"
159                         "--without-libidn2"
160                         "--without-librtmp"
161                         "--without-nghttp2"
162                         "--with-ssl=/usr"
163                         "--with-ca-bundle=${cacert}"
164                       ];
165     };
166     bashExe = "${bash}/bin/bash";
170   ({}: {
171     __raw = true;
173     bootstrapTools = derivation ({
174       inherit system;
175       inherit make bash coreutils findutils
176         diffutils grep patch gawk cpio sed
177         curl;
179       name = "trivial-bootstrap-tools";
180       builder = bashExe;
181       args = [ ./trivial-bootstrap.sh ];
182       buildInputs = [ make ];
183       mkdir = "/bin/mkdir";
184       ln = "/bin/ln";
185     } // lib.optionalAttrs config.contentAddressedByDefault {
186       __contentAddressed = true;
187       outputHashAlgo = "sha256";
188       outputHashMode = "recursive";
189     });
190   })
192   ({ bootstrapTools, ... }: rec {
193     __raw = true;
195     inherit bootstrapTools;
197     fetchurl = import ../../build-support/fetchurl {
198       inherit lib;
199       stdenvNoCC = stdenv;
200       curl = bootstrapTools;
201     };
203     stdenv = import ../generic {
204       name = "stdenv-freebsd-boot-1";
205       buildPlatform = localSystem;
206       hostPlatform = localSystem;
207       targetPlatform = localSystem;
208       inherit config;
209       initialPath = [ "/" "/usr" ];
210       shell = "${bootstrapTools}/bin/bash";
211       fetchurlBoot = null;
212       cc = null;
213       overrides = self: super: {
214       };
215     };
216   })
218   (prevStage: {
219     __raw = true;
221     inherit (prevStage) bootstrapTools;
223     stdenv = import ../generic {
224       name = "stdenv-freebsd-boot-0";
225       inherit config;
226       initialPath = [ prevStage.bootstrapTools ];
227       inherit (prevStage.stdenv)
228         buildPlatform hostPlatform targetPlatform
229         shell;
230       fetchurlBoot = prevStage.fetchurl;
231       cc = null;
232     };
233   })
235   (prevStage: {
236     inherit config overlays;
237     stdenv = import ../generic rec {
238       name = "stdenv-freebsd-boot-3";
239       inherit config;
241       inherit (prevStage.stdenv)
242         buildPlatform hostPlatform targetPlatform
243         initialPath shell fetchurlBoot;
245       cc = lib.makeOverridable (import ../../build-support/cc-wrapper) {
246         inherit lib;
247         nativeTools  = true;
248         nativePrefix = "/usr";
249         nativeLibc   = true;
250         stdenvNoCC = prevStage.stdenv;
251         buildPackages = {
252           inherit (prevStage) stdenv;
253         };
254         cc           = {
255           name    = "clang-9.9.9";
256           cc      = "/usr";
257           outPath = prevStage.bootstrapTools;
258         };
259         isClang      = true;
260         bintools = import ../../build-support/bintools-wrapper {
261           inherit lib;
262           stdenvNoCC = prevStage.stdenv;
263           nativeTools  = true;
264           nativeLibc   = true;
265           propagateDoc = false;
266           nativePrefix = "/usr";
267           bintools     = { name = "${name}-binutils";
268                            outPath = prevStage.bootstrapTools; };
269         };
270       };
272       preHook = "export NIX_NO_SELF_RPATH=1";
273     };
274   })