Merge pull request #157794 from NickCao/libnatpmp-cross

libnatpmp: fix cross compilation
This commit is contained in:
Guillaume Girol 2022-02-03 21:55:43 +00:00 committed by GitHub
commit 2065ecc174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,13 +10,10 @@ stdenv.mkDerivation rec {
sha256 = "1c1n8n7mp0amsd6vkz32n8zj3vnsckv308bb7na0dg0r8969rap1";
};
postPatch = ''
substituteInPlace Makefile \
--replace "gcc" "${stdenv.cc.targetPrefix}cc" \
--replace "ar" "${stdenv.cc.targetPrefix}ar"
'';
makeFlags = [ "INSTALLPREFIX=$(out)" ];
makeFlags = [
"INSTALLPREFIX=$(out)"
"CC:=$(CC)"
];
postFixup = ''
chmod +x $out/lib/*