about summary refs log tree commit diff
path: root/pkgs/development/libraries/libnatpmp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libnatpmp/default.nix')
-rw-r--r--pkgs/development/libraries/libnatpmp/default.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libnatpmp/default.nix b/pkgs/development/libraries/libnatpmp/default.nix
index 8841de12f9a4..49e89b97344b 100644
--- a/pkgs/development/libraries/libnatpmp/default.nix
+++ b/pkgs/development/libraries/libnatpmp/default.nix
@@ -1,4 +1,9 @@
-{ lib, stdenv, fetchurl, fixDarwinDylibNames }:
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, fixDarwinDylibNames
+}:
 
 stdenv.mkDerivation rec {
   pname = "libnatpmp";
@@ -9,6 +14,14 @@ stdenv.mkDerivation rec {
     hash = "sha256-BoTtLIQGQ351GaG9IOqDeA24cbOjpddSMRuj6Inb/HA=";
   };
 
+  patches = [
+    # install natpmp_declspec.h too, else nothing that uses this library will build
+    (fetchpatch {
+      url = "https://github.com/miniupnp/libnatpmp/commit/5f4a7c65837a56e62c133db33c28cd1ea71db662.patch";
+      hash = "sha256-tvoGFmo5AzUgb40bIs/EzikE0ex1SFzE5peLXhktnbc=";
+    })
+  ];
+
   makeFlags = [
     "INSTALLPREFIX=$(out)"
     "CC:=$(CC)"