nixpkgs/pkgs/development/libraries/libnice/default.nix
Niklas Hambüchen 1a6e572529 gstreamer: 1.14.4 -> 1.15.1, and extended gst-plugins-bad.
During the 1.14 -> 1.15 upgrade, lots of stuff stopped working because
gstreamer changed what features are enabled by default and which ones are
automatically turned on/off via pkgconfig dependency detection.

This resulted in the `gstreamer` ("core" attribute in nixpkgs) package
to have only 15 of its previous 163 build targets enabled, and downstream
packages breaking correspondingly.

To ease maintainability and to ensure users will find the expected features
available (and when not, will see in the nix file why not), we now pass
the `-Dauto_features=enabled` Meson build flag to all gstreamer builds,
which sets all `auto` dependencies to `enabled`, and we explicitly disable
those that we can't build.

This means in particular that `gst-plugins-bad` now has vastly more integrations
(namely all for which nixpkgs has libraries available).
2019-06-20 13:36:11 +02:00

55 lines
2 KiB
Nix

{ stdenv, fetchurl, fetchpatch, meson, ninja, pkgconfig, python3, gobject-introspection, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, gupnp-igd, gst_all_1, gnutls }:
stdenv.mkDerivation rec {
name = "libnice-0.1.16";
outputs = [ "bin" "out" "dev" "devdoc" ];
src = fetchurl {
url = "https://nice.freedesktop.org/releases/${name}.tar.gz";
sha256 = "1pzgxq0qrqlrhd78qnvpfgp8bl5c4znqh599ljaybpcldw37idh6";
};
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 pkgconfig python3 gobject-introspection
gtk-doc
# Without these, enabling the 'gtk_doc' gives us `FAILED: meson-install`
docbook_xsl docbook_xml_dtd_412
];
buildInputs = [ gst_all_1.gstreamer gst_all_1.gst-plugins-base gnutls ];
propagatedBuildInputs = [ glib gupnp-igd ];
mesonFlags = [
# Enables all features, so that we know when new dependencies are necessary.
"-Dauto_features=enabled"
"-Dgtk_doc=enabled" # Disabled by default as of libnice-0.1.15
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
];
# TODO; see #53293 etc.
#doCheck = true;
meta = with stdenv.lib; {
homepage = https://nice.freedesktop.org/wiki/;
description = "The 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.'';
platforms = platforms.linux;
license = with licenses; [ lgpl21 mpl11 ];
};
}