From 76ad8c242e7a6dd2606f00ffe02bc3a4bfae4a01 Mon Sep 17 00:00:00 2001 From: Niko Cantero <97130632+nyabinary@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:30:50 -0400 Subject: [PATCH 1/2] =?UTF-8?q?gupnp-igd:=20refactor;=20gupnp-igd:=201.2.0?= =?UTF-8?q?=20=E2=86=92=201.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/gu/gupnp-igd/package.nix | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/gu/gupnp-igd/package.nix b/pkgs/by-name/gu/gupnp-igd/package.nix index 7d26c68a68bc9..245f9bbcb4d92 100644 --- a/pkgs/by-name/gu/gupnp-igd/package.nix +++ b/pkgs/by-name/gu/gupnp-igd/package.nix @@ -11,13 +11,13 @@ docbook_xsl, docbook_xml_dtd_412, glib, - gupnp, + gupnp_1_6, gnome, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "gupnp-igd"; - version = "1.2.0"; + version = "1.6.0"; outputs = [ "out" @@ -25,8 +25,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-S1EgCYqhPt0ngYup7k1/6WG/VAv1DQVv9wPGFUXgK+E="; + url = "mirror://gnome/sources/gupnp-igd/${lib.versions.majorMinor finalAttrs.version}/gupnp-igd-${finalAttrs.version}.tar.xz"; + hash = "sha256-QJmXgzmrIhJtSWjyozK20JT8RMeHl4YHgfH8LxF3G3Q="; }; depsBuildBuild = [ @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ glib - gupnp + gupnp_1_6 ]; mesonFlags = [ @@ -56,20 +56,19 @@ stdenv.mkDerivation rec { # Seems to get stuck sometimes. # https://github.com/NixOS/nixpkgs/issues/119288 - #doCheck = true; + # doCheck = true; passthru = { updateScript = gnome.updateScript { - packageName = pname; + packageName = "gupnp-igd"; versionPolicy = "odd-unstable"; - freeze = true; }; }; - meta = with lib; { + meta = { description = "Library to handle UPnP IGD port mapping"; homepage = "http://www.gupnp.org/"; - license = licenses.lgpl21Plus; - platforms = platforms.unix; + license = lib.licenses.lgpl21Plus; + platforms = lib.platforms.unix; }; -} +}) From 75402017233eca2208fe20ce53b15616dd547866 Mon Sep 17 00:00:00 2001 From: Niko Cantero <97130632+nyabinary@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:31:12 -0400 Subject: [PATCH 2/2] libnice: refactor; add patch for gupnp-igd 1.6.0 --- pkgs/by-name/li/libnice/gupnp-igd-bump.patch | 33 ++++++++++++++++++++ pkgs/by-name/li/libnice/package.nix | 23 ++++++-------- 2 files changed, 42 insertions(+), 14 deletions(-) create mode 100644 pkgs/by-name/li/libnice/gupnp-igd-bump.patch diff --git a/pkgs/by-name/li/libnice/gupnp-igd-bump.patch b/pkgs/by-name/li/libnice/gupnp-igd-bump.patch new file mode 100644 index 0000000000000..90a8f618968bd --- /dev/null +++ b/pkgs/by-name/li/libnice/gupnp-igd-bump.patch @@ -0,0 +1,33 @@ +From 7255d6376fad2c88eaadf1278ee8947181230866 Mon Sep 17 00:00:00 2001 +From: Your Name +Date: Sun, 16 Apr 2023 19:52:38 +0000 +Subject: [PATCH] Update for gupnp-igd-1.6 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +New gupnp-igd has been released. +No significant changed in API so pkgconfig dependency can be simple +bumped. + +Signed-off-by: Tomasz Kłoczko +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 6a733b73..c42fa138 100644 +--- a/meson.build ++++ b/meson.build +@@ -285,7 +285,7 @@ gst_dep = dependency('gstreamer-base-1.0', version: gst_req, + cdata.set('HAVE_GSTREAMER', gst_dep.found(), description: 'Build GStreamer plugin') + + # GUPnP IGD +-gupnp_igd_dep = dependency('gupnp-igd-1.0', version: gupnp_igd_req, required: get_option('gupnp')) ++gupnp_igd_dep = dependency('gupnp-igd-1.6', version: gupnp_igd_req, required: get_option('gupnp')) + cdata.set('HAVE_GUPNP', gupnp_igd_dep.found(), description: 'Use the GUPnP IGD library') + + libm = cc.find_library('m', required: false) +-- +GitLab + diff --git a/pkgs/by-name/li/libnice/package.nix b/pkgs/by-name/li/libnice/package.nix index 7cc8166bf6d79..cdb839c464b03 100644 --- a/pkgs/by-name/li/libnice/package.nix +++ b/pkgs/by-name/li/libnice/package.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchurl, - fetchpatch, meson, ninja, pkg-config, @@ -18,7 +17,7 @@ graphviz, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libnice"; version = "0.1.22"; @@ -29,18 +28,14 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; src = fetchurl { - url = "https://libnice.freedesktop.org/releases/${pname}-${version}.tar.gz"; + url = "https://libnice.freedesktop.org/releases/libnice-${finalAttrs.version}.tar.gz"; hash = "sha256-pfckzwnq5QxBp1FxQdidpKYeyerKMtpKAHP67VQXrX4="; }; patches = [ - # Fix generating data - # Note: upstream is not willing to merge our fix - # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/35#note_98871 - (fetchpatch { - url = "https://gitlab.freedesktop.org/libnice/libnice/commit/d470c4bf4f2449f7842df26ca1ce1efb63452bc6.patch"; - sha256 = "0z74vizf92flfw1m83p7yz824vfykmnm0xbnk748bnnyq186i6mg"; - }) + # Bumps the gupnp_igd_dep version requested to 1.6 + # https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/255 + ./gupnp-igd-bump.patch ]; nativeBuildInputs = [ @@ -78,7 +73,7 @@ stdenv.mkDerivation rec { # see https://github.com/NixOS/nixpkgs/pull/53293#issuecomment-453739295 doCheck = false; - meta = with lib; { + meta = { description = "GLib ICE implementation"; longDescription = '' Libnice is an implementation of the IETF's Interactice Connectivity @@ -88,10 +83,10 @@ stdenv.mkDerivation rec { It provides a GLib-based library, libnice and a Glib-free library, libstun as well as GStreamer elements.''; homepage = "https://libnice.freedesktop.org/"; - platforms = platforms.unix; - license = with licenses; [ + platforms = lib.platforms.unix; + license = with lib.licenses; [ lgpl21 mpl11 ]; }; -} +})