From 09799e8b80d7bb647cf28b2ca99875145e71417f Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 4 Jun 2023 09:31:39 -0400 Subject: [PATCH] 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. --- pkgs/os-specific/darwin/apple-sdk/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index 5cf37e8f4026..4bb85609d119 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -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" ];