freshBootstrapTools: fix build on darwin

This commit is contained in:
Weijia Wang 2023-07-15 13:24:51 +02:00
parent 3368e885d8
commit 2b692b1d9d

View file

@ -10,14 +10,13 @@ let cross = if crossSystem != null
custom-bootstrap = if bootstrapFiles != null custom-bootstrap = if bootstrapFiles != null
then { stdenvStages = args: then { stdenvStages = args:
let args' = args // { bootstrapFiles = bootstrapFiles; }; let args' = args // { bootstrapFiles = bootstrapFiles; };
in (import "${pkgspath}/pkgs/stdenv/darwin" args').stagesDarwin; in (import "${pkgspath}/pkgs/stdenv/darwin" args');
} }
else {}; else {};
in with import pkgspath ({ inherit localSystem; } // cross // custom-bootstrap); in with import pkgspath ({ inherit localSystem; } // cross // custom-bootstrap);
let let
llvmPackages = llvmPackages_11; llvmPackages = llvmPackages_11;
storePrefixLen = builtins.stringLength builtins.storeDir;
in rec { in rec {
coreutils_ = coreutils.override (args: { coreutils_ = coreutils.override (args: {
# We want coreutils without ACL support. # We want coreutils without ACL support.
@ -207,8 +206,6 @@ in rec {
''; '';
}; };
bootstrapLlvmVersion = llvmPackages.llvm.version;
bootstrapFiles = { bootstrapFiles = {
tools = "${build}/pack"; tools = "${build}/pack";
}; };
@ -313,13 +310,16 @@ in rec {
}; };
# The ultimate test: bootstrap a whole stdenv from the tools specified above and get a package set out of it # The ultimate test: bootstrap a whole stdenv from the tools specified above and get a package set out of it
# TODO: uncomment once https://github.com/NixOS/nixpkgs/issues/222717 is resolved
/*
test-pkgs = import test-pkgspath { test-pkgs = import test-pkgspath {
# if the bootstrap tools are for another platform, we should be testing # if the bootstrap tools are for another platform, we should be testing
# that platform. # that platform.
localSystem = if crossSystem != null then crossSystem else localSystem; localSystem = if crossSystem != null then crossSystem else localSystem;
stdenvStages = args: let stdenvStages = args: let
args' = args // { inherit bootstrapLlvmVersion bootstrapFiles; }; args' = args // { inherit bootstrapFiles; };
in (import (test-pkgspath + "/pkgs/stdenv/darwin") args').stagesDarwin; in (import (test-pkgspath + "/pkgs/stdenv/darwin") args');
}; };
*/
} }