7 stdenv.mkDerivation rec {
12 url = "https://miniupnp.tuxfamily.org/files/${pname}-${version}.tar.gz";
13 sha256 = "sha256-N/zZGVNQjD5i1pZLuP+8XUfz4TSB+lTmIU/MaHBMZvE=";
16 nativeBuildInputs = [ cmake ];
18 doCheck = !stdenv.isFreeBSD;
20 makeFlags = [ "PREFIX=$(out)" ];
23 chmod +x $out/lib/libminiupnpc${stdenv.hostPlatform.extensions.sharedLibrary}
25 # for some reason cmake does not install binaries and manpages
26 # https://github.com/miniupnp/miniupnp/issues/637
28 cp -a upnpc-static $out/bin/upnpc
29 cp -a ../external-ip.sh $out/bin/external-ip
30 mkdir -p $out/share/man
31 cp -a ../man3 $out/share/man
35 homepage = "https://miniupnp.tuxfamily.org/";
36 description = "A client that implements the UPnP Internet Gateway Device (IGD) specification";
37 platforms = with platforms; linux ++ freebsd ++ darwin;
38 license = licenses.bsd3;
39 mainProgram = "upnpc";