p4: fix darwin build (#357381)
This commit is contained in:
commit
616735586a
@ -62,7 +62,6 @@ stdenv.mkDerivation (finalAttrs: rec {
|
|||||||
++ lib.optionals stdenv.hostPlatform.isLinux [ "-sOSVER=26" ]
|
++ lib.optionals stdenv.hostPlatform.isLinux [ "-sOSVER=26" ]
|
||||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
"-sOSVER=1013"
|
"-sOSVER=1013"
|
||||||
"-sMACOSX_SDK=${emptyDirectory}"
|
|
||||||
"-sLIBC++DIR=${lib.getLib stdenv.cc.libcxx}/lib"
|
"-sLIBC++DIR=${lib.getLib stdenv.cc.libcxx}/lib"
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -81,6 +80,10 @@ stdenv.mkDerivation (finalAttrs: rec {
|
|||||||
(stdenv.cc.isClang || (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.cc.version "11.0.0"))
|
(stdenv.cc.isClang || (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.cc.version "11.0.0"))
|
||||||
[ "-include" "limits" "-include" "thread" ];
|
[ "-include" "limits" "-include" "thread" ];
|
||||||
|
|
||||||
|
preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
|
export MACOSX_SDK=$SDKROOT
|
||||||
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
jam $jamFlags -j$NIX_BUILD_CORES p4
|
jam $jamFlags -j$NIX_BUILD_CORES p4
|
||||||
|
Loading…
Reference in New Issue
Block a user