about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libnatpmp/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/libnatpmp/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix b/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix
index dd902c0021dd..11b8d66b4a8f 100644
--- a/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix
@@ -10,6 +10,12 @@ stdenv.mkDerivation rec {
     sha256 = "1c1n8n7mp0amsd6vkz32n8zj3vnsckv308bb7na0dg0r8969rap1";
   };
 
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "gcc" "${stdenv.cc.targetPrefix}cc" \
+      --replace "ar" "${stdenv.cc.targetPrefix}ar"
+  '';
+
   makeFlags = [ "INSTALLPREFIX=$(out)" ];
 
   meta = with lib; {
@@ -17,6 +23,6 @@ stdenv.mkDerivation rec {
     description = "NAT-PMP client";
     license = licenses.bsd3;
     maintainers = with maintainers; [ orivej ];
-    platforms = platforms.linux;
+    platforms = platforms.all;
   };
 }