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
3 changes: 2 additions & 1 deletion pkgs/development/libraries/libxml2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
, enableStatic ? !enableShared
, gnome
, testers
, forceNew ? false
}:

let
# Newer versions fail with minimal python, probably because
# https://gitlab.gnome.org/GNOME/libxml2/-/commit/b706824b612adb2c8255819c9a55e78b52774a3c
# This case is encountered "temporarily" during stdenv bootstrapping on darwin.
# Beware that the old version has known security issues, so the final set shouldn't use it.
oldVer = python.pname == "python3-minimal";
oldVer = !forceNew && python.pname == "python3-minimal";
in
assert oldVer -> stdenv.isDarwin; # reduce likelihood of using old libxml2 unintentionally

Expand Down
16 changes: 13 additions & 3 deletions pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import ./bootstrap-files/aarch64-apple-darwin.nix
else
import ./bootstrap-files/x86_64-apple-darwin.nix
, bootstrapTest ? false
}:

assert crossSystem == localSystem;
Expand Down Expand Up @@ -48,7 +49,16 @@ let
unset SDKROOT
'';

bootstrapTools = derivation ({
bootstrapTools = derivation (if bootstrapTest then {
inherit system;

name = "bootstrap-tools";
builder = "${bootstrapFiles.unpack}/bin/bash";
args = [ ./patch-bootstrap-tools.sh bootstrapFiles.bootstrapTools ];
PATH = lib.makeBinPath [ (placeholder "out") bootstrapFiles.unpack ];
allowedReferences = [ "out" ];
__impureHostDeps = commonImpureHostDeps;
} else {
inherit system;

name = "bootstrap-tools";
Expand Down Expand Up @@ -220,8 +230,8 @@ in
gnugrep = bootstrapTools;

# Either pbzx or Libsystem is required from bootstrap tools (one is used building the other).
pbzx = if localSystem.isAarch64 then bootstrapTools else super.pbzx;
cpio = self.stdenv.mkDerivation {
pbzx = if localSystem.isAarch64 || bootstrapTest then bootstrapTools else super.pbzx;
cpio = if bootstrapTest then bootstrapTools else self.stdenv.mkDerivation {
name = "bootstrap-stage0-cpio";
buildCommand = ''
mkdir -p $out/bin
Expand Down
Loading