2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, meson
|
|
|
|
, ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk-doc
|
|
|
|
, docbook_xsl
|
|
|
|
, docbook_xml_dtd_412
|
|
|
|
, glib
|
|
|
|
, gupnp-igd
|
|
|
|
, gst_all_1
|
|
|
|
, gnutls
|
2022-01-26 04:04:25 +00:00
|
|
|
, graphviz
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-25 13:55:36 +00:00
|
|
|
pname = "libnice";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.1.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
outputs = [ "bin" "out" "dev" ]
|
|
|
|
++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-12-25 13:55:36 +00:00
|
|
|
url = "https://libnice.freedesktop.org/releases/${pname}-${version}.tar.gz";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-cuc6Ks8g9ZCT4h1WAWBuQFhzUD6zXzRvpiHeI+mbOzk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
|
|
|
gobject-introspection
|
|
|
|
|
|
|
|
# documentation
|
|
|
|
gtk-doc
|
|
|
|
docbook_xsl
|
|
|
|
docbook_xml_dtd_412
|
2022-01-26 04:04:25 +00:00
|
|
|
graphviz
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gnutls
|
|
|
|
gupnp-igd
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
2021-12-06 16:07:01 +00:00
|
|
|
"-Dgtk_doc=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}"
|
|
|
|
"-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}"
|
2020-04-24 23:36:52 +00:00
|
|
|
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
|
|
|
|
];
|
|
|
|
|
|
|
|
# Tests are flaky
|
|
|
|
# see https://github.com/NixOS/nixpkgs/pull/53293#issuecomment-453739295
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GLib ICE implementation";
|
|
|
|
longDescription = ''
|
|
|
|
Libnice is an implementation of the IETF's Interactice Connectivity
|
|
|
|
Establishment (ICE) standard (RFC 5245) and the Session Traversal
|
|
|
|
Utilities for NAT (STUN) standard (RFC 5389).
|
|
|
|
|
|
|
|
It provides a GLib-based library, libnice and a Glib-free library,
|
|
|
|
libstun as well as GStreamer elements.'';
|
2020-12-25 13:55:36 +00:00
|
|
|
homepage = "https://libnice.freedesktop.org/";
|
2022-11-21 17:40:18 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ lgpl21 mpl11 ];
|
|
|
|
};
|
|
|
|
}
|