about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libnatpmp
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libnatpmp')
-rw-r--r--nixpkgs/pkgs/development/libraries/libnatpmp/default.nix11
1 files changed, 4 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix b/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix
index 36c1c0dc098c..9672d1cceca7 100644
--- a/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix
+++ b/nixpkgs/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/*