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