From 98b8d3474bffdf42b178fad2bc4f804f1227f118 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sat, 4 Nov 2023 01:43:16 -0400 Subject: stdenvAdapters.overrideSDK: special case the 10.12 Libsystem The 10.12 Libsystem is not located as a sub-attribute of `darwin.apple_sdk_10_12`. This will be fixed as part of the SDK changes planned for post-23.11. In the meantime, special case it so the adapter can be used to change the deployment target. --- pkgs/stdenv/adapters.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pkgs/stdenv') diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 977ef2eef9c75..a6a2736fec110 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -262,6 +262,9 @@ rec { ) darwinMinVersion darwinSdkVersion; sdk = pkgs.darwin."apple_sdk_${lib.replaceStrings [ "." ] [ "_" ] darwinSdkVersion}"; + # TODO: Make this unconditional after #229210 has been merged, + # and the 10.12 SDK is updated to follow the new structure. + Libsystem = if darwinSdkVersion == "10.12" then pkgs.darwin.Libsystem else sdk.Libsystem; replacePropagatedFrameworks = pkg: let @@ -349,8 +352,8 @@ rec { // lib.genAttrs atBuildInputs (input: map mapRuntimeToSDK (args."${input}" or [ ])); mkCC = cc: cc.override { - bintools = cc.bintools.override { libc = sdk.Libsystem; }; - libc = sdk.Libsystem; + bintools = cc.bintools.override { libc = Libsystem; }; + libc = Libsystem; }; in # TODO: make this work across all input types and not just propagatedBuildInputs -- cgit 1.4.1