2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, which, cctools }:
|
2011-05-17 12:34:18 +01:00
|
|
|
|
2017-03-02 18:27:10 +00:00
|
|
|
let
|
|
|
|
generic = { version, sha256 }:
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "miniupnpc";
|
|
|
|
inherit version;
|
2017-03-02 18:27:10 +00:00
|
|
|
src = fetchurl {
|
2022-10-29 09:06:54 +01:00
|
|
|
url = "https://miniupnp.tuxfamily.org/files/${pname}-${version}.tar.gz";
|
2017-03-02 18:27:10 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
2011-05-17 12:34:18 +01:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
nativeBuildInputs = lib.optionals stdenv.isDarwin [ which cctools ];
|
2017-08-09 04:37:00 +01:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
patches = lib.optional stdenv.isFreeBSD ./freebsd.patch;
|
2015-11-24 12:00:19 +00:00
|
|
|
|
2017-03-02 18:27:10 +00:00
|
|
|
doCheck = !stdenv.isFreeBSD;
|
2011-05-17 12:34:18 +01:00
|
|
|
|
2019-10-26 14:35:48 +01:00
|
|
|
makeFlags = [ "PREFIX=$(out)" "INSTALLPREFIX=$(out)" ];
|
2011-05-17 12:34:18 +01:00
|
|
|
|
2021-10-22 10:03:43 +01:00
|
|
|
postInstall = ''
|
|
|
|
chmod +x "$out"/lib/libminiupnpc${stdenv.hostPlatform.extensions.sharedLibrary}
|
|
|
|
'';
|
2021-09-27 16:28:35 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-10-29 09:06:54 +01:00
|
|
|
homepage = "https://miniupnp.tuxfamily.org/";
|
2017-03-02 18:27:10 +00:00
|
|
|
description = "A client that implements the UPnP Internet Gateway Device (IGD) specification";
|
2018-09-10 20:31:33 +01:00
|
|
|
platforms = with platforms; linux ++ freebsd ++ darwin;
|
|
|
|
license = licenses.bsd3;
|
2017-03-02 18:27:10 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
miniupnpc_2 = generic {
|
2022-10-29 09:06:54 +01:00
|
|
|
version = "2.2.4";
|
|
|
|
sha256 = "0jrc84lkc7xb53rb8dbswxrxj21ndj1iiclmk3r9wkp6xm55w6j8";
|
2017-03-02 18:27:10 +00:00
|
|
|
};
|
|
|
|
miniupnpc_1 = generic {
|
2017-05-26 12:05:32 +01:00
|
|
|
version = "1.9.20160209";
|
|
|
|
sha256 = "0vsbv6a8by67alx4rxfsrxxsnmq74rqlavvvwiy56whxrkm728ap";
|
2011-05-17 12:34:18 +01:00
|
|
|
};
|
|
|
|
}
|