mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 04:46:43 +00:00
dade32b409
this fixes strange linking issues on darwin when any attempt to link with libminiupnpc ends with "Killed: 9"
35 lines
841 B
Nix
35 lines
841 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, cmake
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "miniupnpc";
|
|
version = "2.2.4";
|
|
|
|
src = fetchurl {
|
|
url = "https://miniupnp.tuxfamily.org/files/${pname}-${version}.tar.gz";
|
|
sha256 = "0jrc84lkc7xb53rb8dbswxrxj21ndj1iiclmk3r9wkp6xm55w6j8";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
patches = lib.optional stdenv.isFreeBSD ./freebsd.patch;
|
|
|
|
doCheck = !stdenv.isFreeBSD;
|
|
|
|
makeFlags = [ "PREFIX=$(out)" "INSTALLPREFIX=$(out)" ];
|
|
|
|
postInstall = ''
|
|
chmod +x "$out"/lib/libminiupnpc${stdenv.hostPlatform.extensions.sharedLibrary}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://miniupnp.tuxfamily.org/";
|
|
description = "A client that implements the UPnP Internet Gateway Device (IGD) specification";
|
|
platforms = with platforms; linux ++ freebsd ++ darwin;
|
|
license = licenses.bsd3;
|
|
};
|
|
}
|