Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 2 additions & 29 deletions pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,13 @@
, overlays
, crossOverlays ? [ ]
, bootstrapLlvmVersion ? if localSystem.isAarch64 then "11.1.0" else "7.1.0"
# Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools
, bootstrapFiles ? if localSystem.isAarch64 then
let
fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
url = "http://tarballs.nixos.org/stdenv-darwin/aarch64/20acd4c4f14040485f40e55c0a76c186aa8ca4f3/${file}";
inherit (localSystem) system;
inherit sha256 executable;
}; in
{
sh = fetch { file = "sh"; sha256 = "17m3xrlbl99j3vm7rzz3ghb47094dyddrbvs2a6jalczvmx7spnj"; };
bzip2 = fetch { file = "bzip2"; sha256 = "1khs8s5klf76plhlvlc1ma838r8pc1qigk9f5bdycwgbn0nx240q"; };
mkdir = fetch { file = "mkdir"; sha256 = "1m9nk90paazl93v43myv2ay68c1arz39pqr7lk5ddbgb177hgg8a"; };
cpio = fetch { file = "cpio"; sha256 = "17pxq61yjjvyd738fy9f392hc9cfzkl612sdr9rxr3v0dgvm8y09"; };
tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "1v2332k33akm6mrm4bj749rxnnmc2pkbgcslmd0bbkf76bz2ildy"; executable = false; };
}
else
let
fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/05ef940b94fe76e7ac06ea45a625adc8e4be96f9/${file}";
inherit (localSystem) system;
inherit sha256 executable;
}; in
{
sh = fetch { file = "sh"; sha256 = "sha256-igMAVEfumFv/LUNTGfNi2nSehgTNIP4Sg+f3L7u6SMA="; };
bzip2 = fetch { file = "bzip2"; sha256 = "sha256-K3rhkJZipudT1Jgh+l41Y/fNsMkrPtiAsNRDha/lpZI="; };
mkdir = fetch { file = "mkdir"; sha256 = "sha256-VddFELwLDJGNADKB1fWwWPBtIAlEUgJv2hXRmC4NEeM="; };
cpio = fetch { file = "cpio"; sha256 = "sha256-SWkwvLaFyV44kLKL2nx720SvcL4ej/p2V/bX3uqAGO0="; };
tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "sha256-b65dXbIm6o6s6U8tAiGpR6SMfvfn/VFcZgTHBetJZis="; executable = false; };
}
, seeds ? import ../seeds.nix
}:

assert crossSystem == localSystem;

let
bootstrapFiles = if localSystem.isAarch64 then seeds.darwin.aarch64 else seeds.darwin.x86_64;
inherit (localSystem) system;

useAppleSDKLibs = localSystem.isAarch64;
Expand Down
11 changes: 0 additions & 11 deletions pkgs/stdenv/linux/bootstrap-files/aarch64-musl.nix

This file was deleted.

11 changes: 0 additions & 11 deletions pkgs/stdenv/linux/bootstrap-files/aarch64.nix

This file was deleted.

18 changes: 0 additions & 18 deletions pkgs/stdenv/linux/bootstrap-files/armv5tel.nix

This file was deleted.

11 changes: 0 additions & 11 deletions pkgs/stdenv/linux/bootstrap-files/armv6l-musl.nix

This file was deleted.

18 changes: 0 additions & 18 deletions pkgs/stdenv/linux/bootstrap-files/armv6l.nix

This file was deleted.

18 changes: 0 additions & 18 deletions pkgs/stdenv/linux/bootstrap-files/armv7l.nix

This file was deleted.

12 changes: 0 additions & 12 deletions pkgs/stdenv/linux/bootstrap-files/i686.nix

This file was deleted.

44 changes: 0 additions & 44 deletions pkgs/stdenv/linux/bootstrap-files/loongson2f.nix

This file was deleted.

11 changes: 0 additions & 11 deletions pkgs/stdenv/linux/bootstrap-files/x86_64-musl.nix

This file was deleted.

9 changes: 0 additions & 9 deletions pkgs/stdenv/linux/bootstrap-files/x86_64.nix

This file was deleted.

34 changes: 8 additions & 26 deletions pkgs/stdenv/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,13 @@
# ensuring purity of components produced by it.
{ lib
, localSystem, crossSystem, config, overlays, crossOverlays ? []
, seeds ? import ../seeds.nix
}:

, bootstrapFiles ?
let table = {
glibc = {
i686-linux = import ./bootstrap-files/i686.nix;
x86_64-linux = import ./bootstrap-files/x86_64.nix;
armv5tel-linux = import ./bootstrap-files/armv5tel.nix;
armv6l-linux = import ./bootstrap-files/armv6l.nix;
armv7l-linux = import ./bootstrap-files/armv7l.nix;
aarch64-linux = import ./bootstrap-files/aarch64.nix;
mipsel-linux = import ./bootstrap-files/loongson2f.nix;
};
musl = {
aarch64-linux = import ./bootstrap-files/aarch64-musl.nix;
armv6l-linux = import ./bootstrap-files/armv6l-musl.nix;
x86_64-linux = import ./bootstrap-files/x86_64-musl.nix;
};
};
assert crossSystem == localSystem;

let
inherit (localSystem) system;

# Try to find an architecture compatible with our current system. We
# just try every bootstrap we’ve got and test to see if it is
Expand All @@ -32,17 +21,10 @@
else if localSystem.isCompatible (lib.systems.elaborate { inherit system; }) then archLookupTable.${system}
else null) null (lib.attrNames archLookupTable);

archLookupTable = table.${localSystem.libc}
archLookupTable = seeds.linux.${localSystem.libc}
or (abort "unsupported libc for the pure Linux stdenv");
files = archLookupTable.${localSystem.system} or (if getCompatibleTools != null then getCompatibleTools
bootstrapFiles = archLookupTable.${system} or (if getCompatibleTools != null then getCompatibleTools
else (abort "unsupported platform for the pure Linux stdenv"));
in files
}:

assert crossSystem == localSystem;

let
inherit (localSystem) system;

commonPreHook =
''
Expand Down
Loading