···262 ) darwinMinVersion darwinSdkVersion;
263264 sdk = pkgs.darwin."apple_sdk_${lib.replaceStrings [ "." ] [ "_" ] darwinSdkVersion}";
000265266 replacePropagatedFrameworks = pkg:
267 let
···349 // lib.genAttrs atBuildInputs (input: map mapRuntimeToSDK (args."${input}" or [ ]));
350351 mkCC = cc: cc.override {
352- bintools = cc.bintools.override { libc = sdk.Libsystem; };
353- libc = sdk.Libsystem;
354 };
355 in
356 # TODO: make this work across all input types and not just propagatedBuildInputs
···262 ) darwinMinVersion darwinSdkVersion;
263264 sdk = pkgs.darwin."apple_sdk_${lib.replaceStrings [ "." ] [ "_" ] darwinSdkVersion}";
265+ # TODO: Make this unconditional after #229210 has been merged,
266+ # and the 10.12 SDK is updated to follow the new structure.
267+ Libsystem = if darwinSdkVersion == "10.12" then pkgs.darwin.Libsystem else sdk.Libsystem;
268269 replacePropagatedFrameworks = pkg:
270 let
···352 // lib.genAttrs atBuildInputs (input: map mapRuntimeToSDK (args."${input}" or [ ]));
353354 mkCC = cc: cc.override {
355+ bintools = cc.bintools.override { libc = Libsystem; };
356+ libc = Libsystem;
357 };
358 in
359 # TODO: make this work across all input types and not just propagatedBuildInputs