uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
42
pkgs/tools/networking/miniupnpc/default.nix
Normal file
42
pkgs/tools/networking/miniupnpc/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchurl, which, cctools }:
|
||||
|
||||
let
|
||||
generic = { version, sha256 }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "miniupnpc";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
name = "${pname}-${version}.tar.gz";
|
||||
url = "http://miniupnp.free.fr/files/download.php?file=${pname}-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.isDarwin [ which cctools ];
|
||||
|
||||
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 = "http://miniupnp.free.fr/";
|
||||
description = "A client that implements the UPnP Internet Gateway Device (IGD) specification";
|
||||
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";
|
||||
};
|
||||
}
|
||||
11
pkgs/tools/networking/miniupnpc/freebsd.patch
Normal file
11
pkgs/tools/networking/miniupnpc/freebsd.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff --git a/minihttptestserver.c b/minihttptestserver.c
|
||||
index bbfdac3..a43999d 100644
|
||||
--- a/minihttptestserver.c
|
||||
+++ b/minihttptestserver.c
|
||||
@@ -1,3 +1,6 @@
|
||||
+#ifndef INADDR_LOOPBACK
|
||||
+#define INADDR_LOOPBACK 0x7f000001
|
||||
+#endif
|
||||
/* $Id: minihttptestserver.c,v 1.17 2015/02/06 10:31:19 nanard Exp $ */
|
||||
/* Project : miniUPnP
|
||||
* Author : Thomas Bernard
|
||||
Loading…
Add table
Add a link
Reference in a new issue