2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2018-04-19 20:10:51 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "libnatpmp";
|
2018-04-19 20:10:51 +01:00
|
|
|
version = "20150609";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
name = "${pname}-${version}.tar.gz";
|
|
|
|
url = "http://miniupnp.free.fr/files/download.php?file=${pname}-${version}.tar.gz";
|
2018-04-19 20:10:51 +01:00
|
|
|
sha256 = "1c1n8n7mp0amsd6vkz32n8zj3vnsckv308bb7na0dg0r8969rap1";
|
|
|
|
};
|
|
|
|
|
2021-03-11 18:42:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "gcc" "${stdenv.cc.targetPrefix}cc" \
|
|
|
|
--replace "ar" "${stdenv.cc.targetPrefix}ar"
|
|
|
|
'';
|
|
|
|
|
2018-04-19 20:10:51 +01:00
|
|
|
makeFlags = [ "INSTALLPREFIX=$(out)" ];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://miniupnp.free.fr/libnatpmp.html";
|
2018-04-19 20:10:51 +01:00
|
|
|
description = "NAT-PMP client";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
2021-03-11 18:42:22 +00:00
|
|
|
platforms = platforms.all;
|
2018-04-19 20:10:51 +01:00
|
|
|
};
|
|
|
|
}
|