nixpkgs/pkgs/development/libraries/libnatpmp/default.nix

29 lines
759 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl }:
2018-04-19 20:10:51 +01:00
stdenv.mkDerivation rec {
pname = "libnatpmp";
2018-04-19 20:10:51 +01:00
version = "20150609";
src = fetchurl {
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)" ];
meta = with lib; {
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
};
}