Merge pull request #260544 from reckenrode/darwintools-cross

DarwinTools: fix Darwin cross-compilation
This commit is contained in:
Weijia Wang 2023-10-13 23:16:00 +02:00 committed by GitHub
commit 83cb70d8c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,17 +13,17 @@ stdenv.mkDerivation rec {
./sw_vers-CFPriv.patch
];
postPatch = ''
substituteInPlace Makefile \
--replace gcc cc
'';
configurePhase = ''
export SRCROOT=.
export SYMROOT=.
export DSTROOT=$out
'';
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"STRIP=${stdenv.cc.targetPrefix}strip"
];
postInstall = ''
mv $out/usr/* $out
rmdir $out/usr