zlib: build with the bootstrap stdenv on Darwin

Using the bootstrap stdenv avoids an infinite recursion from xcbuild
depending on zlib depending on xcrun from xcbuild, which is propagated
by the non-bootstrap stdenv.
This commit is contained in:
Randy Eckenrode 2024-09-07 22:01:39 -04:00
parent 75bc428cf2
commit 1fd1796e65
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9

View File

@ -23701,7 +23701,15 @@ with pkgs;
zeitgeist = callPackage ../development/libraries/zeitgeist { };
zlib = callPackage ../development/libraries/zlib { };
zlib = callPackage ../development/libraries/zlib {
stdenv =
# zlib 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;
};
zlib-ng = callPackage ../development/libraries/zlib-ng { };