Skip to content

Commit 399845a

Browse files
nyabinaryjtojnar
authored andcommitted
libnice: refactor; add patch for gupnp-igd 1.6.0
1 parent 13c92de commit 399845a

2 files changed

Lines changed: 42 additions & 14 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+

pkgs/by-name/li/libnice/package.nix

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
lib,
33
stdenv,
44
fetchurl,
5-
fetchpatch,
65
meson,
76
ninja,
87
pkg-config,
@@ -18,7 +17,7 @@
1817
graphviz,
1918
}:
2019

21-
stdenv.mkDerivation rec {
20+
stdenv.mkDerivation (finalAttrs: {
2221
pname = "libnice";
2322
version = "0.1.22";
2423

@@ -29,18 +28,14 @@ stdenv.mkDerivation rec {
2928
] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
3029

3130
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";
3332
hash = "sha256-pfckzwnq5QxBp1FxQdidpKYeyerKMtpKAHP67VQXrX4=";
3433
};
3534

3635
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
4439
];
4540

4641
nativeBuildInputs = [
@@ -78,7 +73,7 @@ stdenv.mkDerivation rec {
7873
# see https://github.com/NixOS/nixpkgs/pull/53293#issuecomment-453739295
7974
doCheck = false;
8075

81-
meta = with lib; {
76+
meta = {
8277
description = "GLib ICE implementation";
8378
longDescription = ''
8479
Libnice is an implementation of the IETF's Interactice Connectivity
@@ -88,10 +83,10 @@ stdenv.mkDerivation rec {
8883
It provides a GLib-based library, libnice and a Glib-free library,
8984
libstun as well as GStreamer elements.'';
9085
homepage = "https://libnice.freedesktop.org/";
91-
platforms = platforms.unix;
92-
license = with licenses; [
86+
platforms = lib.platforms.unix;
87+
license = with lib.licenses; [
9388
lgpl21
9489
mpl11
9590
];
9691
};
97-
}
92+
})

0 commit comments

Comments
 (0)