apple_sdk: fix infinite recursion

The 10.12 SDK uses `xar`, which depends on Python indirectly, which
depends on configd by default. This causes an infinite recuresion when
building configd because it needs SDK headers to build with clang 16.

Fix the infinite recursion by disabling Python support in libxml2 when
building the SDK, and use a minimal Python in the SDK build itself.
This commit is contained in:
Randy Eckenrode
2023-06-04 09:31:39 -04:00
parent 15da7dce6a
commit 09799e8b80
@@ -1,6 +1,9 @@
{ stdenv, fetchurl, xar, cpio, pkgs, python3, pbzx, lib, darwin-stubs, print-reexports }:
{ stdenv, fetchurl, libxml2, xar, cpio, pkgs, python3Minimal, pbzx, lib, darwin-stubs, print-reexports }:
let
xarMinimal = xar.override {
libxml2 = libxml2.override { pythonSupport = false; };
};
# sadly needs to be exported because security_tool needs it
sdk = stdenv.mkDerivation rec {
pname = "MacOS_SDK";
@@ -16,7 +19,7 @@ let
sha256 = "13xq34sb7383b37hwy076gnhf96prpk1b4087p87xnwswxbrisih";
};
nativeBuildInputs = [ xar cpio python3 pbzx ];
nativeBuildInputs = [ xarMinimal cpio python3Minimal pbzx ];
outputs = [ "out" "dev" "man" ];