DarwinTools: fix Darwin cross-compilation

This commit is contained in:
Randy Eckenrode 2023-09-29 09:47:18 -04:00
parent 6215da7844
commit fd70154fca
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9

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