From 53b059ade536f7e9b238abb4d68eaa5bee2c31f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 2 Mar 2017 19:27:10 +0100 Subject: [PATCH] miniupnpc: switch to old version by default miniupnpc 2.0.20161216 change its api --- pkgs/tools/networking/miniupnpc/default.nix | 45 +++++++++++++-------- pkgs/top-level/all-packages.nix | 9 ++++- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/pkgs/tools/networking/miniupnpc/default.nix b/pkgs/tools/networking/miniupnpc/default.nix index 42fe2db7a4ea..575bac3e9d1e 100644 --- a/pkgs/tools/networking/miniupnpc/default.nix +++ b/pkgs/tools/networking/miniupnpc/default.nix @@ -1,23 +1,34 @@ { stdenv, fetchurl }: -stdenv.mkDerivation rec { - name = "miniupnpc-${version}"; - version = "2.0.20161216"; +let + generic = { version, sha256 }: + stdenv.mkDerivation rec { + name = "miniupnpc-${version}"; + src = fetchurl { + name = "${name}.tar.gz"; + url = "http://miniupnp.free.fr/files/download.php?file=${name}.tar.gz"; + inherit sha256; + }; - src = fetchurl { - url = "http://miniupnp.free.fr/files/download.php?file=${name}.tar.gz"; + patches = stdenv.lib.optional stdenv.isFreeBSD ./freebsd.patch; + + doCheck = !stdenv.isFreeBSD; + + installFlags = "PREFIX=$(out) INSTALLPREFIX=$(out)"; + + meta = { + homepage = http://miniupnp.free.fr/; + description = "A client that implements the UPnP Internet Gateway Device (IGD) specification"; + platforms = with stdenv.lib.platforms; linux ++ freebsd; + }; + }; +in { + miniupnpc_2 = generic { + version = "2.0.20161216"; sha256 = "0gpxva9jkjvqwawff5y51r6bmsmdhixl3i5bmzlqsqpwsq449q81"; - }; - - patches = stdenv.lib.optional stdenv.isFreeBSD ./freebsd.patch; - - doCheck = !stdenv.isFreeBSD; - - installFlags = "PREFIX=$(out) INSTALLPREFIX=$(out)"; - - meta = { - homepage = http://miniupnp.free.fr/; - description = "A client that implements the UPnP Internet Gateway Device (IGD) specification"; - platforms = with stdenv.lib.platforms; linux ++ freebsd; + }; + miniupnpc_1 = generic { + version = "1.9.20150430"; + sha256 = "0ivnvzla0l2pzmy8s0j8ss0fnpsii7z9scvyl4a13g9k911hgmvn"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f5230fd82907..4f1968ebf406 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2883,7 +2883,9 @@ with pkgs; minissdpd = callPackage ../tools/networking/minissdpd { }; - miniupnpc = callPackage ../tools/networking/miniupnpc { }; + inherit (callPackage ../tools/networking/miniupnpc { }) + miniupnpc_1 miniupnpc_2; + miniupnpc = miniupnpc_1; miniupnpd = callPackage ../tools/networking/miniupnpd { }; @@ -14932,7 +14934,10 @@ with pkgs; libtorrentRasterbar = libtorrentRasterbar_1_0; }; - eiskaltdcpp = callPackage ../applications/networking/p2p/eiskaltdcpp { lua5 = lua5_1; }; + eiskaltdcpp = callPackage ../applications/networking/p2p/eiskaltdcpp { + lua5 = lua5_1; + miniupnpc = miniupnpc_1; + }; qemu = callPackage ../applications/virtualization/qemu { inherit (darwin.apple_sdk.frameworks) CoreServices Cocoa;