diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix index 081c501a5539..978038fc111f 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -276,7 +276,9 @@ developerToolsPackages_11_3_1 // macosPackages_11_0_1 // { libmalloc = if stdenv.isx86_64 then applePackage "libmalloc" "osx-10.12.6" "sha256-brfG4GEF2yZipKdhlPq6DhT2z5hKYSb2MAmffaikdO4=" {} else macosPackages_11_0_1.libmalloc; - libplatform = applePackage "libplatform" "osx-10.12.6" "sha256-6McMTjw55xtnCsFI3AB1osRagnuB5pSTqeMKD3gpGtM=" {}; + libplatform = if stdenv.isx86_64 then + applePackage "libplatform" "osx-10.12.6" "sha256-6McMTjw55xtnCsFI3AB1osRagnuB5pSTqeMKD3gpGtM=" {} + else macosPackages_11_0_1.libplatform; libpthread = applePackage "libpthread" "osx-10.12.6" "sha256-QvJ9PERmrCWBiDmOWrLvQUKZ4JxHuh8gS5nlZKDLqE8=" {}; libresolv = applePackage "libresolv" "osx-10.12.6" "sha256-FtvwjJKSFX6j9APYPC8WLXVOjbHLZa1Gcoc8yxLy8qE=" {}; Libsystem = applePackage "Libsystem" "osx-10.12.6" "sha256-zvRdCP//TjKCGAqm/5nJXPppshU1cv2fg/L/yK/olGQ=" {}; diff --git a/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix index 39c801962692..e0b25d27778a 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix @@ -1,9 +1,10 @@ -{ appleDerivation', stdenvNoCC }: +{ lib, appleDerivation', stdenvNoCC }: -appleDerivation' stdenvNoCC { +appleDerivation' stdenvNoCC (finalAttrs: { installPhase = '' mkdir $out cp -r include $out/include + test -d private && cp -r private/* $out/include ''; appleHeaders = '' @@ -27,6 +28,12 @@ appleDerivation' stdenvNoCC { platform/introspection_private.h platform/string.h setjmp.h - ucontext.h - ''; -} + '' + ( + if lib.versionAtLeast finalAttrs.version "254.40.4" then '' + string_x86.h + ucontext.h + '' else '' + ucontext.h + '' + ); +})