From 5a60ff8315b67c0d95540329deb207b75c58cfbd Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sat, 7 Sep 2024 22:01:39 -0400 Subject: [PATCH] libxml2: build with the bootstrap stdenv on Darwin Using the bootstrap stdenv avoids an infinite recursion from xcbuild depending on libxml2 depending on xcrun from xcbuild, which is propagated by the non-bootstrap stdenv. --- pkgs/top-level/all-packages.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4f3b647767f8..e822d46ec9e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21800,6 +21800,13 @@ with pkgs; libxml2 = callPackage ../development/libraries/libxml2 { python = python3; + stdenv = + # libxml2 is a dependency of xcbuild. Avoid an infinite recursion by using a bootstrap stdenv + # that does not propagate xcrun. + if stdenv.hostPlatform.isDarwin then + darwin.bootstrapStdenv + else + stdenv; }; libxml2Python = let