1{ stdenv, fetchurl, fetchpatch, meson, ninja, pkgconfig, python3, gobject-introspection, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, gupnp-igd, gst_all_1, gnutls }:
2
3stdenv.mkDerivation rec {
4 name = "libnice-0.1.15";
5
6 outputs = [ "bin" "out" "dev" "devdoc" ];
7
8 src = fetchurl {
9 url = "https://nice.freedesktop.org/releases/${name}.tar.gz";
10 sha256 = "1nl7fn07f4i513s9c1s1ic3rki8rm2d000wsf6f4157mb0zhya7p";
11 };
12
13 patches = [
14 # Fix generating data
15 # Note: upstream is not willing to merge our fix
16 # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/35#note_98871
17 (fetchpatch {
18 url = https://gitlab.freedesktop.org/libnice/libnice/commit/d470c4bf4f2449f7842df26ca1ce1efb63452bc6.patch;
19 sha256 = "0z74vizf92flfw1m83p7yz824vfykmnm0xbnk748bnnyq186i6mg";
20 })
21
22 # Fix test-different-number-streams
23 # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/36
24 (fetchpatch {
25 url = https://gitlab.freedesktop.org/libnice/libnice/commit/a38c2adfc4bed2a69dc02568417f0926dd555b9a.patch;
26 sha256 = "1rh4z4iknrimmm3b3v8ln8vl3dsqi91g4vf0dl85348kvnf0sv6z";
27 })
28 # Fix test-gstreamer
29 # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/35
30 (fetchpatch {
31 url = https://gitlab.freedesktop.org/libnice/libnice/commit/02de1fa1956105b09d9db4fd6331452b0ff0b8a2.patch;
32 sha256 = "12dymq1v20wj5n1cway4n3y8fkra1ffnpj5w7pbz38i612b82qw0";
33 })
34 ];
35
36 nativeBuildInputs = [ meson ninja pkgconfig python3 gobject-introspection gtk-doc docbook_xsl docbook_xml_dtd_412 ];
37 buildInputs = [ gst_all_1.gstreamer gst_all_1.gst-plugins-base gnutls ];
38 propagatedBuildInputs = [ glib gupnp-igd ];
39
40 mesonFlags = [
41 "-Dgupnp=enabled"
42 "-Dgstreamer=enabled"
43 "-Dignored-network-interface-prefix=enabled"
44 "-Dexamples=enabled"
45 "-Dtests=enabled"
46 "-Dgtk_doc=enabled"
47 "-Dintrospection=enabled"
48 ];
49
50 # TODO; see #53293 etc.
51 #doCheck = true;
52
53 meta = with stdenv.lib; {
54 homepage = https://nice.freedesktop.org/wiki/;
55 description = "The GLib ICE implementation";
56 longDescription = ''
57 Libnice is an implementation of the IETF's Interactice Connectivity
58 Establishment (ICE) standard (RFC 5245) and the Session Traversal
59 Utilities for NAT (STUN) standard (RFC 5389).
60
61 It provides a GLib-based library, libnice and a Glib-free library,
62 libstun as well as GStreamer elements.'';
63 platforms = platforms.linux;
64 license = with licenses; [ lgpl21 mpl11 ];
65 };
66}