p4: fix darwin build (#357381)

authored by Aleksana and committed by GitHub 61673558 d76eaf2d

+4 -1
+4 -1
pkgs/applications/version-management/p4/default.nix
··· 62 62 ++ lib.optionals stdenv.hostPlatform.isLinux [ "-sOSVER=26" ] 63 63 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 64 64 "-sOSVER=1013" 65 - "-sMACOSX_SDK=${emptyDirectory}" 66 65 "-sLIBC++DIR=${lib.getLib stdenv.cc.libcxx}/lib" 67 66 ]; 68 67 ··· 80 79 ++ lib.optionals 81 80 (stdenv.cc.isClang || (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.cc.version "11.0.0")) 82 81 [ "-include" "limits" "-include" "thread" ]; 82 + 83 + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' 84 + export MACOSX_SDK=$SDKROOT 85 + ''; 83 86 84 87 buildPhase = '' 85 88 runHook preBuild