nixpkgs/pkgs/tools/networking/miniupnpc/default.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, which, cctools }:
let
generic = { version, sha256 }:
stdenv.mkDerivation rec {
2019-08-13 21:52:01 +00:00
pname = "miniupnpc";
inherit version;
src = fetchurl {
2019-08-13 21:52:01 +00:00
name = "${pname}-${version}.tar.gz";
url = "http://miniupnp.free.fr/files/download.php?file=${pname}-${version}.tar.gz";
inherit sha256;
};
2021-01-15 09:19:50 +00:00
nativeBuildInputs = lib.optionals stdenv.isDarwin [ which cctools ];
2021-01-15 09:19:50 +00:00
patches = lib.optional stdenv.isFreeBSD ./freebsd.patch;
doCheck = !stdenv.isFreeBSD;
2019-10-26 13:35:48 +00:00
makeFlags = [ "PREFIX=$(out)" "INSTALLPREFIX=$(out)" ];
meta = with lib; {
homepage = "http://miniupnp.free.fr/";
description = "A client that implements the UPnP Internet Gateway Device (IGD) specification";
2018-09-10 19:31:33 +00:00
platforms = with platforms; linux ++ freebsd ++ darwin;
license = licenses.bsd3;
};
};
in {
miniupnpc_2 = generic {
version = "2.1.20190625";
sha256 = "1yqp0d8x5ldjfma5x2vhpg1aaafdg0470ismccixww3rzpbza8w7";
};
miniupnpc_1 = generic {
version = "1.9.20160209";
sha256 = "0vsbv6a8by67alx4rxfsrxxsnmq74rqlavvvwiy56whxrkm728ap";
};
}