eigenmath: 3.33-unstable-2024-11-22 -> 3.35-unstable-2024-12-11 (#364381)
[NixPkgs.git] / pkgs / stdenv / nix / default.nix
blob59e67960aef1fc525465b3f09730dc872368464c
2   lib,
3   crossSystem,
4   localSystem,
5   config,
6   overlays,
7   bootStages,
8   ...
9 }:
11 assert crossSystem == localSystem;
13 bootStages
14 ++ [
15   (prevStage: {
16     inherit config overlays;
18     stdenv = import ../generic rec {
19       inherit config;
21       inherit (prevStage.stdenv) buildPlatform hostPlatform targetPlatform;
23       preHook = ''
24         export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}"
25         export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}"
26         export NIX_IGNORE_LD_THROUGH_GCC=1
27       '';
29       initialPath = (import ../generic/common-path.nix) { pkgs = prevStage; };
31       cc = import ../../build-support/cc-wrapper {
32         inherit lib;
33         nativeTools = false;
34         nativePrefix = lib.optionalString hostPlatform.isSunOS "/usr";
35         nativeLibc = true;
36         inherit (prevStage)
37           stdenvNoCC
38           binutils
39           coreutils
40           gnugrep
41           ;
42         cc = prevStage.gcc.cc;
43         isGNU = true;
44         shell = prevStage.bash + "/bin/sh";
45       };
47       shell = prevStage.bash + "/bin/sh";
49       fetchurlBoot = prevStage.stdenv.fetchurlBoot;
51       overrides = self: super: {
52         inherit cc;
53         inherit (cc) binutils;
54         inherit (prevStage)
55           gzip
56           bzip2
57           xz
58           bash
59           coreutils
60           diffutils
61           findutils
62           gawk
63           gnumake
64           gnused
65           gnutar
66           gnugrep
67           gnupatch
68           perl
69           ;
70       };
71     };
72   })