From bbcdceed4d78cc5367ad354c667200f7c5079ef0 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 2 Feb 2022 11:50:18 +0800 Subject: [PATCH] libnatpmp: fix cross compilation --- pkgs/development/libraries/libnatpmp/default.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libnatpmp/default.nix b/pkgs/development/libraries/libnatpmp/default.nix index 36c1c0dc098c..9672d1cceca7 100644 --- a/pkgs/development/libraries/libnatpmp/default.nix +++ b/pkgs/development/libraries/libnatpmp/default.nix @@ -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/*