libnice: refactor; add patch for gupnp-igd 1.6.0

authored by Niko Cantero and committed by Jan Tojnar 399845af 13c92dea

+42 -14
+33
pkgs/by-name/li/libnice/gupnp-igd-bump.patch
··· 1 + From 7255d6376fad2c88eaadf1278ee8947181230866 Mon Sep 17 00:00:00 2001 2 + From: Your Name <you@example.com> 3 + Date: Sun, 16 Apr 2023 19:52:38 +0000 4 + Subject: [PATCH] Update for gupnp-igd-1.6 5 + MIME-Version: 1.0 6 + Content-Type: text/plain; charset=UTF-8 7 + Content-Transfer-Encoding: 8bit 8 + 9 + New gupnp-igd has been released. 10 + No significant changed in API so pkgconfig dependency can be simple 11 + bumped. 12 + 13 + Signed-off-by: Tomasz Kłoczko <kloczek@github.com> 14 + --- 15 + meson.build | 2 +- 16 + 1 file changed, 1 insertion(+), 1 deletion(-) 17 + 18 + diff --git a/meson.build b/meson.build 19 + index 6a733b73..c42fa138 100644 20 + --- a/meson.build 21 + +++ b/meson.build 22 + @@ -285,7 +285,7 @@ gst_dep = dependency('gstreamer-base-1.0', version: gst_req, 23 + cdata.set('HAVE_GSTREAMER', gst_dep.found(), description: 'Build GStreamer plugin') 24 + 25 + # GUPnP IGD 26 + -gupnp_igd_dep = dependency('gupnp-igd-1.0', version: gupnp_igd_req, required: get_option('gupnp')) 27 + +gupnp_igd_dep = dependency('gupnp-igd-1.6', version: gupnp_igd_req, required: get_option('gupnp')) 28 + cdata.set('HAVE_GUPNP', gupnp_igd_dep.found(), description: 'Use the GUPnP IGD library') 29 + 30 + libm = cc.find_library('m', required: false) 31 + -- 32 + GitLab 33 +
+9 -14
pkgs/by-name/li/libnice/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchurl, 5 - fetchpatch, 6 5 meson, 7 6 ninja, 8 7 pkg-config, ··· 18 17 graphviz, 19 18 }: 20 19 21 - stdenv.mkDerivation rec { 20 + stdenv.mkDerivation (finalAttrs: { 22 21 pname = "libnice"; 23 22 version = "0.1.22"; 24 23 ··· 29 28 ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; 30 29 31 30 src = fetchurl { 32 - url = "https://libnice.freedesktop.org/releases/${pname}-${version}.tar.gz"; 31 + url = "https://libnice.freedesktop.org/releases/libnice-${finalAttrs.version}.tar.gz"; 33 32 hash = "sha256-pfckzwnq5QxBp1FxQdidpKYeyerKMtpKAHP67VQXrX4="; 34 33 }; 35 34 36 35 patches = [ 37 - # Fix generating data 38 - # Note: upstream is not willing to merge our fix 39 - # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/35#note_98871 40 - (fetchpatch { 41 - url = "https://gitlab.freedesktop.org/libnice/libnice/commit/d470c4bf4f2449f7842df26ca1ce1efb63452bc6.patch"; 42 - sha256 = "0z74vizf92flfw1m83p7yz824vfykmnm0xbnk748bnnyq186i6mg"; 43 - }) 36 + # Bumps the gupnp_igd_dep version requested to 1.6 37 + # https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/255 38 + ./gupnp-igd-bump.patch 44 39 ]; 45 40 46 41 nativeBuildInputs = [ ··· 78 73 # see https://github.com/NixOS/nixpkgs/pull/53293#issuecomment-453739295 79 74 doCheck = false; 80 75 81 - meta = with lib; { 76 + meta = { 82 77 description = "GLib ICE implementation"; 83 78 longDescription = '' 84 79 Libnice is an implementation of the IETF's Interactice Connectivity ··· 88 83 It provides a GLib-based library, libnice and a Glib-free library, 89 84 libstun as well as GStreamer elements.''; 90 85 homepage = "https://libnice.freedesktop.org/"; 91 - platforms = platforms.unix; 92 - license = with licenses; [ 86 + platforms = lib.platforms.unix; 87 + license = with lib.licenses; [ 93 88 lgpl21 94 89 mpl11 95 90 ]; 96 91 }; 97 - } 92 + })