From 1e8f092557f318a2afeef73246a842ba86bf6b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Mon, 21 Jan 2019 02:48:04 +0100 Subject: [PATCH 1/5] 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). --- .../libraries/gstreamer/bad/default.nix | 122 ++++++++++++++++-- .../libraries/gstreamer/base/default.nix | 43 ++++-- .../libraries/gstreamer/core/default.nix | 25 +++- .../libraries/gstreamer/default.nix | 2 +- .../libraries/gstreamer/good/default.nix | 27 +++- .../libraries/gstreamer/libav/default.nix | 10 +- .../gstreamer/rtsp-server/default.nix | 16 ++- .../libraries/gstreamer/ugly/default.nix | 13 +- .../libraries/gstreamer/vaapi/default.nix | 10 +- .../libraries/gstreamer/validate/default.nix | 9 +- .../development/libraries/libnice/default.nix | 18 +-- pkgs/top-level/all-packages.nix | 2 +- 12 files changed, 240 insertions(+), 57 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 8179806859c97..a3f2233b9bc65 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -1,10 +1,40 @@ { stdenv, fetchurl, fetchpatch, meson, ninja, gettext +, config , pkgconfig, python3, gst-plugins-base, orc +, gobject-introspection , faacSupport ? false, faac ? null , faad2, libass, libkate, libmms, librdf, ladspaH , libnice, webrtc-audio-processing, lilv, lv2, serd, sord, sratom , libbs2b, libmodplug, mpeg2dec , openjpeg, libopus, librsvg +, bluez +, chromaprint +, curl +, directfb +, fdk_aac +, flite +, libaom +, libdc1394 +, libde265 +, libdrm +, libdvdnav +, libdvdread +, libgudev +, libofa +, libsndfile +, libusb1 +, neon +, openal +, opencv3 +, openexr +, openh264 +, pango +, sbc +, soundtouch +, spandsp +, srtp +, zbar +, wayland-protocols , wildmidi, fluidsynth, libvdpau, wayland , libwebp, xvidcore, gnutls, mjpegtools , libGLU_combined, libintl, libgme @@ -15,11 +45,11 @@ assert faacSupport -> faac != null; let - inherit (stdenv.lib) optional; + inherit (stdenv.lib) optional optionals; in stdenv.mkDerivation rec { name = "gst-plugins-bad-${version}"; - version = "1.14.4"; + version = "1.15.1"; meta = with stdenv.lib; { description = "Gstreamer Bad Plugins"; @@ -40,27 +70,22 @@ stdenv.mkDerivation rec { ''; patches = [ - (fetchpatch { - url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370409"; - sha256 = "0hy0rcn35alq65yqwri4fqjz2hf3nyyg5c7rnndk51msmqjxpprk"; - }) ./fix_pkgconfig_includedir.patch - # Enable bs2b compilation - # https://bugzilla.gnome.org/show_bug.cgi?id=794346 - (fetchurl { - url = https://bugzilla.gnome.org/attachment.cgi?id=369724; - sha256 = "1716mp0h2866ab33w607isvfhv1zwyj71qb4jrkx5v0h276v1pwr"; - }) ]; src = fetchurl { url = "${meta.homepage}/src/gst-plugins-bad/${name}.tar.xz"; - sha256 = "1r8dma3x127rbx42yab7kwq7q1bhkmvz2ykn0rnqnzl95q74w2wi"; + sha256 = "0dpky8a0pbwwkc5r8hawi5yizdqk65j9liwvhxkjwbnpv53n5y10"; }; outputs = [ "out" "dev" ]; - nativeBuildInputs = [ meson ninja pkgconfig python3 gettext ]; + nativeBuildInputs = [ + meson ninja pkgconfig python3 gettext gobject-introspection + ] + ++ optionals stdenv.isLinux [ + wayland-protocols + ]; buildInputs = [ gst-plugins-base orc @@ -71,6 +96,33 @@ stdenv.mkDerivation rec { lilv lv2 serd sord sratom # lv2 plug-in libmodplug mpeg2dec openjpeg libopus librsvg + bluez + chromaprint + curl.dev + directfb + fdk_aac + flite + libaom + libdc1394 + libde265 + libdrm + libdvdnav + libdvdread + libgudev + libofa + libsndfile + libusb1 + neon + openal + opencv3 + openexr + openh264 + pango + sbc + soundtouch + spandsp + srtp + zbar fluidsynth libvdpau libwebp xvidcore gnutls libGLU_combined libgme openssl x265 libxml2 @@ -85,6 +137,48 @@ stdenv.mkDerivation rec { # TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin ++ optional (!stdenv.isDarwin) mjpegtools; + mesonFlags = [ + # Enables all features, so that we know when new dependencies are necessary. + "-Dauto_features=enabled" + + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + + "-Ddts=disabled" # required `libdca` library not packaged in nixpkgs as of writing, and marked as "BIG FAT WARNING: libdca is still in early development" + "-Dfaac=${if faacSupport then "enabled" else "disabled"}" + "-Dgsm=disabled" # as of writing, with `gsm` in `buildInputs` we get "GSM plugin is enabled: found libgsm but no headers"; gsm packaging problem? + "-Diqa=disabled" # required `dssim` library not packaging in nixpkgs as of writing + "-Dmsdk=disabled" # not packaged in nixpkgs as of writing / no Windows support + # As of writing, with `libmpcdec` in `buildInputs` we get + # "Could not find libmpcdec header files, but Musepack was enabled via options" + # This is likely because nixpkgs has the header in libmpc/mpcdec.h + # instead of mpc/mpcdec.h, like Arch does. The situation is not trivial. + # There are apparently 2 things called `libmpcdec` from the same author: + # * http://svn.musepack.net/libmpcdec/trunk/src/ + # * http://svn.musepack.net/libmpc/trunk/include/mpc/ + # Fixing it likely requires to first figure out with upstream which one + # is needed, and then patching upstream to find it (though it probably + # already works on Arch?). + "-Dmusepack=disabled" + "-Dopenmpt=disabled" # `libopenmpt` not packaged in nixpkgs as of writing + "-Dopenni2=disabled" # not packaged in nixpkgs as of writing + "-Dopensles=disabled" # not packaged in nixpkgs as of writing + "-Drtmp=disabled" # `librtmp` not packaged in nixpkgs as of writing + "-Dsctp=disabled" # required `usrsctp` library not packaged in nixpkgs as of writing + "-Dteletext=disabled" # required `zvbi` library not packaged in nixpkgs as of writing + "-Dtinyalsa=disabled" # not packaged in nixpkgs as of writing + "-Dvoaacenc=disabled" # required `vo-aacenc` library not packaged in nixpkgs as of writing + "-Dvoamrwbenc=disabled" # required `vo-amrwbenc` library not packaged in nixpkgs as of writing + "-Dvulkan=disabled" # Linux-only, and we haven't figured out yet which of the vulkan nixpkgs it needs + "-Dwasapi=disabled" # not packaged in nixpkgs as of writing / no Windows support + "-Dwpe=disabled" # required `wpe-webkit` library not packaged in nixpkgs as of writing + + # Requires CUDA and we haven't figured out how to make Meson find CUDA yet; + # it probably searches via pkgconfig, for which we have no .pc files, + # see https://github.com/NixOS/nixpkgs/issues/54395 + "-Dnvdec=disabled" + "-Dnvenc=disabled" + ]; + enableParallelBuilding = true; doCheck = false; # fails 20 out of 58 tests, expensive diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 0acdf71fb72fc..31396e67e8c4a 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -2,6 +2,11 @@ , pkgconfig, meson, ninja, gettext, gobject-introspection , python3, gstreamer, orc, pango, libtheora , libintl, libopus +, isocodes +, libjpeg +, libvisual +, tremor # provides 'virbisidec' +, gtk-doc, docbook_xsl, docbook_xml_dtd_412 , enableX11 ? stdenv.isLinux, libXv , enableWayland ? stdenv.isLinux, wayland , enableAlsa ? stdenv.isLinux, alsaLib @@ -10,7 +15,7 @@ stdenv.mkDerivation rec { name = "gst-plugins-base-${version}"; - version = "1.14.4"; + version = "1.15.1"; meta = with lib; { description = "Base plugins and helper libraries"; @@ -22,28 +27,48 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-plugins-base/${name}.tar.xz"; - sha256 = "0qbllw4kphchwhy4p7ivdysigx69i97gyw6q0rvkx1j81r4kjqfa"; + sha256 = "0qvyx9gs7z2ryhdxxzynn9r1gphfk4xfkhd6dma02sbda9c5jckf"; }; outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkgconfig python3 gettext gobject-introspection ] - + nativeBuildInputs = [ + pkgconfig python3 gettext gobject-introspection + gtk-doc + # Without these, enabling the 'gtk_doc' gives us `FAILED: meson-install` + docbook_xsl docbook_xml_dtd_412 + ] # Broken meson with Darwin. Should hopefully be fixed soon. Tracking # in https://bugzilla.gnome.org/show_bug.cgi?id=781148. ++ lib.optionals (!stdenv.isDarwin) [ meson ninja ]; + # On Darwin, we currently use autoconf, on all other systems Meson + # TODO Switch to Meson on Darwin as well + # TODO How to pass these to Meson? - configureFlags = [ + configureFlags = lib.optionals stdenv.isDarwin [ "--enable-x11=${if enableX11 then "yes" else "no"}" "--enable-wayland=${if enableWayland then "yes" else "no"}" "--enable-cocoa=${if enableCocoa then "yes" else "no"}" ] - # Introspection fails on my MacBook currently ++ lib.optional stdenv.isDarwin "--disable-introspection"; - buildInputs = [ orc libtheora libintl libopus ] + mesonFlags = lib.optionals (!stdenv.isDarwin) [ + # Enables all features, so that we know when new dependencies are necessary. + "-Dauto_features=enabled" + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + "-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing + # See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices + "-Dgl_winsys=[${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}]" + ] + ++ lib.optional (!enableX11) "-Dx11=disabled" + # TODO How to disable Wayland? + ++ lib.optional (!enableAlsa) "-Dalsa=disabled" + ++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled" + ; + + buildInputs = [ orc libtheora libintl libopus isocodes libjpeg libvisual tremor ] ++ lib.optional enableAlsa alsaLib ++ lib.optionals enableX11 [ libXv pango ] ++ lib.optional enableWayland wayland @@ -61,10 +86,6 @@ stdenv.mkDerivation rec { doCheck = false; # fails, wants DRI access for OpenGL patches = [ - (fetchpatch { - url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370414"; - sha256 = "07x43xis0sr0hfchf36ap0cibx0lkfpqyszb3r3w9dzz301fk04z"; - }) ./fix_pkgconfig_includedir.patch ]; } diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index b69ab89df24d0..fc1722e5d6a97 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -2,12 +2,16 @@ , pkgconfig, gettext, gobject-introspection , bison, flex, python3, glib, makeWrapper , libcap,libunwind, darwin +, elfutils # for libdw +, bash-completion +, docbook_xsl, docbook_xml_dtd_412 +, gtk-doc , lib }: stdenv.mkDerivation rec { name = "gstreamer-${version}"; - version = "1.14.4"; + version = "1.15.1"; meta = with lib ;{ description = "Open source multimedia framework"; @@ -19,14 +23,10 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gstreamer/${name}.tar.xz"; - sha256 = "1izzhnlsy83rgr4zl3jcl1sryxqbbigrrqw3j4x3nnphqnb6ckzr"; + sha256 = "05ri9y37qkgvkb2xjywf32c3k9479b0af0m6cjigx04pgwsf42kq"; }; patches = [ - (fetchpatch { - url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370411"; - sha256 = "16plzzmkk906k4892zq68j3c9z8vdma5nxzlviq20jfv04ykhmk2"; - }) ./fix_pkgconfig_includedir.patch ]; @@ -35,13 +35,24 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ meson ninja pkgconfig gettext bison flex python3 makeWrapper gobject-introspection + bash-completion + gtk-doc + # Without these, enabling the 'gtk_doc' gives us `FAILED: meson-install` + docbook_xsl docbook_xml_dtd_412 ]; + buildInputs = - lib.optionals stdenv.isLinux [ libcap libunwind ] + lib.optionals stdenv.isLinux [ libcap libunwind elfutils ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreServices; propagatedBuildInputs = [ glib ]; + mesonFlags = [ + # Enables all features, so that we know when new dependencies are necessary. + "-Dauto_features=enabled" + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + ]; + postInstall = '' for prog in "$dev/bin/"*; do # We can't use --suffix here due to quoting so we craft the export command by hand diff --git a/pkgs/development/libraries/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/default.nix index 9aec876340409..767ef8c6afdc4 100644 --- a/pkgs/development/libraries/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/default.nix @@ -13,7 +13,7 @@ rec { gst-plugins-ugly = callPackage ./ugly { inherit gst-plugins-base; }; - gst-rtsp-server = callPackage ./rtsp-server { inherit gst-plugins-base; }; + gst-rtsp-server = callPackage ./rtsp-server { inherit gst-plugins-base gst-plugins-bad; }; gst-libav = callPackage ./libav { inherit gst-plugins-base; }; diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 247a74e3a325f..5234836413cc7 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -10,6 +10,10 @@ , libXext , libXfixes , ncurses +, xorg +, libgudev +, wavpack +, jack2 }: assert gtkSupport -> gtk3 != null; @@ -19,7 +23,7 @@ let in stdenv.mkDerivation rec { name = "gst-plugins-good-${version}"; - version = "1.14.4"; + version = "1.15.1"; meta = with stdenv.lib; { description = "Gstreamer Good Plugins"; @@ -36,7 +40,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-plugins-good/${name}.tar.xz"; - sha256 = "0y89qynb4b6fry3h43z1r99qslmi3m8xhlq0i5baq2nbc0r5b2sz"; + sha256 = "15f6klr7wg6jlcyx0qspi13s8wmc9fij1bx1bbvy90a9a72v97rb"; }; outputs = [ "out" "dev" ]; @@ -58,10 +62,27 @@ stdenv.mkDerivation rec { libXext # present feature but undeclared in meson_options.txt, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/553 libXfixes # present feature but undeclared in meson_options.txt, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/553 ncurses + xorg.libXfixes # present feature but undeclared in meson_options.txt, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/553 + xorg.libXdamage # present feature but undeclared in meson_options.txt, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/553 + wavpack ] ++ optional gtkSupport gtk3 # for gtksink ++ optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ] - ++ optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 ]; + ++ optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 libgudev jack2 ]; + + mesonFlags = [ + # Enables all features, so that we know when new dependencies are necessary. + "-Dauto_features=enabled" + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + "-Dqt5=disabled" # not clear as of writing how to correctly pass in the required qt5 deps + ] + ++ optional (!gtkSupport) "-Dgtk3=disabled" + ++ optionals (!stdenv.isLinux) [ + "-Djack=disabled" # unclear whether Jack works on Darwin + ] + ++ optionals (!stdenv.isLinux) [ + "-Dv4l2-gudev=disabled" + ]; # fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''" doCheck = false; diff --git a/pkgs/development/libraries/gstreamer/libav/default.nix b/pkgs/development/libraries/gstreamer/libav/default.nix index 7f7393bba28ef..5a3b6020aefbe 100644 --- a/pkgs/development/libraries/gstreamer/libav/default.nix +++ b/pkgs/development/libraries/gstreamer/libav/default.nix @@ -10,7 +10,7 @@ assert withSystemLibav -> libav != null; stdenv.mkDerivation rec { name = "gst-libav-${version}"; - version = "1.14.4"; + version = "1.15.1"; meta = { homepage = https://gstreamer.freedesktop.org; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-libav/${name}.tar.xz"; - sha256 = "1nk5g24z2xx5kaw5cg8dv8skdc516inahmkymcz8bxqxj28qbmyz"; + sha256 = "0hq5y8zg6a3fliwip7k85hg6s6amsmbqgrjl6axzrr3y6akcvslk"; }; outputs = [ "out" "dev" ]; @@ -34,4 +34,10 @@ stdenv.mkDerivation rec { [ gst-plugins-base orc bzip2 ] ++ optional withSystemLibav libav ; + + mesonFlags = [ + # Enables all features, so that we know when new dependencies are necessary. + "-Dauto_features=enabled" + ]; + } diff --git a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix index 6236edec6a400..5dc678cf0ab02 100644 --- a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix +++ b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix @@ -1,10 +1,12 @@ { stdenv, fetchurl, meson, ninja, pkgconfig -, gst-plugins-base, gettext, gobject-introspection +, gettext, gobject-introspection +, gst-plugins-base +, gst-plugins-bad }: stdenv.mkDerivation rec { name = "gst-rtsp-server-${version}"; - version = "1.14.4"; + version = "1.15.1"; meta = with stdenv.lib; { description = "Gstreamer RTSP server"; @@ -19,12 +21,18 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-rtsp-server/${name}.tar.xz"; - sha256 = "1wc4d0y57hpfvv9sykjg8mxj86dw60mf696fbqbiqq6dzlmcw3ix"; + sha256 = "0d0jaf7ir40dxpxs41wyb7m7riyl7wsqcb5qvd4vhwpz0dwxhpvl"; }; outputs = [ "out" "dev" ]; nativeBuildInputs = [ meson ninja gettext gobject-introspection pkgconfig ]; - buildInputs = [ gst-plugins-base ]; + buildInputs = [ gst-plugins-base gst-plugins-bad ]; + + mesonFlags = [ + # Enables all features, so that we know when new dependencies are necessary. + "-Dauto_features=enabled" + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + ]; } diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index 0cdfd1f4a7b69..19d84cbd349cf 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -2,12 +2,13 @@ , gst-plugins-base, orc, gettext , a52dec, libcdio, libdvdread , libmad, libmpeg2, x264, libintl, lib +, opencore-amr , darwin }: stdenv.mkDerivation rec { name = "gst-plugins-ugly-${version}"; - version = "1.14.4"; + version = "1.15.1"; meta = with lib; { description = "Gstreamer Ugly Plugins"; @@ -25,7 +26,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-plugins-ugly/${name}.tar.xz"; - sha256 = "08vd1xgwmapnviah47zv5h2r02qdd20y4f07rvv5zhv6y4vxh0mc"; + sha256 = "17p9x30ywanz1lbk061kzd8bypcv5hkin6iyaqffp8alrwiak3qp"; }; outputs = [ "out" "dev" ]; @@ -37,8 +38,16 @@ stdenv.mkDerivation rec { a52dec libcdio libdvdread libmad libmpeg2 x264 libintl + opencore-amr ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit CoreFoundation DiskArbitration ]); + mesonFlags = [ + # Enables all features, so that we know when new dependencies are necessary. + "-Dauto_features=enabled" + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + "-Dsidplay=disabled" # sidplay / sidplay/player.h isn't packaged in nixpkgs as of writing + ]; + NIX_LDFLAGS = [ "-lm" ]; } diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index e84f8dce91252..ae5a6b1c97c95 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { name = "gst-vaapi-${version}"; - version = "1.14.4"; + version = "1.15.1"; src = fetchurl { url = "${meta.homepage}/src/gstreamer-vaapi/gstreamer-vaapi-${version}.tar.xz"; - sha256 = "18yha6119v7mwz47idv2vykzfssqfmh6hc824wqqsshwjvzdn66f"; + sha256 = "1aazan6r6p5aabb671znjkh8kmpxkz68wvaickqwzb1bz0ijcivc"; }; outputs = [ "out" "dev" ]; @@ -27,6 +27,12 @@ stdenv.mkDerivation rec { mkdir -p $GST_PLUGIN_PATH_1_0 ''; + mesonFlags = [ + # Enables all features, so that we know when new dependencies are necessary. + "-Dauto_features=enabled" + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + ]; + meta = { homepage = https://gstreamer.freedesktop.org; license = stdenv.lib.licenses.lgpl21Plus; diff --git a/pkgs/development/libraries/gstreamer/validate/default.nix b/pkgs/development/libraries/gstreamer/validate/default.nix index 916185bf7ecf6..869001e792080 100644 --- a/pkgs/development/libraries/gstreamer/validate/default.nix +++ b/pkgs/development/libraries/gstreamer/validate/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { name = "gst-validate-${version}"; - version = "1.14.4"; + version = "1.15.1"; meta = { description = "Integration testing infrastructure for the GStreamer framework"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-validate/${name}.tar.xz"; - sha256 = "1ismv4i7ldi04swq76pcpd5apxqd52yify5hvlyan2yw9flwrp0q"; + sha256 = "195hwblagfsnq1xn858al3f32jn5nynr4j5x395dpg3vl3c4k5v4"; }; outputs = [ "out" "dev" ]; @@ -31,4 +31,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gstreamer gst-plugins-base ]; enableParallelBuilding = true; + + mesonFlags = [ + # Enables all features, so that we know when new dependencies are necessary. + "-Dauto_features=enabled" + ]; } diff --git a/pkgs/development/libraries/libnice/default.nix b/pkgs/development/libraries/libnice/default.nix index e71bcd0e36802..2bd04c65caab7 100644 --- a/pkgs/development/libraries/libnice/default.nix +++ b/pkgs/development/libraries/libnice/default.nix @@ -33,18 +33,20 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ meson ninja pkgconfig python3 gobject-introspection gtk-doc docbook_xsl docbook_xml_dtd_412 ]; + 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 = [ - "-Dgupnp=enabled" - "-Dgstreamer=enabled" - "-Dignored-network-interface-prefix=enabled" - "-Dexamples=enabled" - "-Dtests=enabled" - "-Dgtk_doc=enabled" - "-Dintrospection=enabled" + # 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. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 904fc2a01a7bf..0fbf0a20c60eb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10429,7 +10429,7 @@ in gsettings-qt = libsForQt5.callPackage ../development/libraries/gsettings-qt { }; gst_all_1 = recurseIntoAttrs(callPackage ../development/libraries/gstreamer { - callPackage = pkgs.newScope (pkgs // { libav = pkgs.ffmpeg; }); + callPackage = pkgs.newScope (pkgs // { libav = pkgs.ffmpeg_4; }); }); gstreamer = callPackage ../development/libraries/gstreamer/legacy/gstreamer { From 5e5f97494a4756646f862e125ac31f9212f9be7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 1 May 2019 16:10:36 +0200 Subject: [PATCH 2/5] gstreamer: 1.15.1 -> 1.16.0 Changes needed: * core: dbghelp disabled as it's not needed * core: Fixed script not being executable and skipped by patchShebangs * base: gtk_doc disabled because of wayland symbol error * ges: Patch removed that was merged upstream: https://bugzilla.gnome.org/show_bug.cgi?id=794856#c16 --- .../libraries/gstreamer/bad/default.nix | 4 ++-- .../libraries/gstreamer/base/default.nix | 11 +++++++++-- .../libraries/gstreamer/core/default.nix | 19 ++++++++++++++----- .../libraries/gstreamer/ges/default.nix | 8 ++------ .../libraries/gstreamer/good/default.nix | 16 +++++++--------- .../libraries/gstreamer/libav/default.nix | 4 ++-- .../gstreamer/rtsp-server/default.nix | 4 ++-- .../libraries/gstreamer/ugly/default.nix | 4 ++-- .../libraries/gstreamer/vaapi/default.nix | 4 ++-- .../libraries/gstreamer/validate/default.nix | 4 ++-- 10 files changed, 44 insertions(+), 34 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index a3f2233b9bc65..cff909c3cf326 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -49,7 +49,7 @@ let in stdenv.mkDerivation rec { name = "gst-plugins-bad-${version}"; - version = "1.15.1"; + version = "1.16.0"; meta = with stdenv.lib; { description = "Gstreamer Bad Plugins"; @@ -75,7 +75,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-plugins-bad/${name}.tar.xz"; - sha256 = "0dpky8a0pbwwkc5r8hawi5yizdqk65j9liwvhxkjwbnpv53n5y10"; + sha256 = "019b0yqjrcg6jmfd4cc336h1bz5p4wxl58yz1c4sdb96avirs4r2"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 31396e67e8c4a..16c3155a95c34 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { name = "gst-plugins-base-${version}"; - version = "1.15.1"; + version = "1.16.0"; meta = with lib; { description = "Base plugins and helper libraries"; @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-plugins-base/${name}.tar.xz"; - sha256 = "0qvyx9gs7z2ryhdxxzynn9r1gphfk4xfkhd6dma02sbda9c5jckf"; + sha256 = "1bmmdwbyy89ayb85xc48y217f6wdmpz96f30zm6v53z2a5xsm4s0"; }; outputs = [ "out" "dev" ]; @@ -61,6 +61,13 @@ stdenv.mkDerivation rec { "-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing # See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices "-Dgl_winsys=[${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}]" + # We must currently disable gtk_doc API docs generation, + # because it is not compatible with some features being disabled. + # See for example + # https://gitlab.gnome.org/GNOME/gnome-build-meta/issues/38 + # for it failing because some Wayland symbols are missing. + # This problem appeared between 1.15.1 and 1.16.0. + "-Dgtk_doc=disabled" ] ++ lib.optional (!enableX11) "-Dx11=disabled" # TODO How to disable Wayland? diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index fc1722e5d6a97..9869e1eddbdd1 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { name = "gstreamer-${version}"; - version = "1.15.1"; + version = "1.16.0"; meta = with lib ;{ description = "Open source multimedia framework"; @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gstreamer/${name}.tar.xz"; - sha256 = "05ri9y37qkgvkb2xjywf32c3k9479b0af0m6cjigx04pgwsf42kq"; + sha256 = "003wy1p1in85p9sr5jsyhbnwqaiwz069flwkhyx7qhxy31qjz3hf"; }; patches = [ @@ -50,6 +50,7 @@ stdenv.mkDerivation rec { mesonFlags = [ # Enables all features, so that we know when new dependencies are necessary. "-Dauto_features=enabled" + "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those "-Dexamples=disabled" # requires many dependencies and probably not useful for our users ]; @@ -60,9 +61,17 @@ stdenv.mkDerivation rec { done ''; - preConfigure= '' - patchShebangs . - ''; + preConfigure= + # These files are not executable upstream, so we need to + # make them executable for `patchShebangs` to pick them up. + # Can be removed when this is merged and available: + # https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/141 + '' + chmod +x gst/parse/get_flex_version.py + '' + + '' + patchShebangs . + ''; preFixup = '' moveToOutput "share/bash-completion" "$dev" diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix index fb7a37a4f4480..61d39bc963694 100644 --- a/pkgs/development/libraries/gstreamer/ges/default.nix +++ b/pkgs/development/libraries/gstreamer/ges/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { name = "gstreamer-editing-services-${version}"; - version = "1.14.4"; + version = "1.16.0"; meta = with stdenv.lib; { description = "Library for creation of audio/video non-linear editors"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gstreamer-editing-services/${name}.tar.xz"; - sha256 = "0pxk65jib3mqszjkyvlzklwia4kbdj6j2b6jw1d502b06mdx5lak"; + sha256 = "1las94jkx83sxmzi5w6b0xm89dqqwzpdsb6h9w9ixndhnbpzm8w2"; }; outputs = [ "out" "dev" ]; @@ -26,10 +26,6 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gst-plugins-base libxml2 ]; patches = [ - (fetchpatch { - url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370413"; - sha256 = "1xcgbs18g6n5p7z7kqj7ffakwmkxq7ijajyvhyl7p3zvqll9dc7x"; - }) ./fix_pkgconfig_includedir.patch ]; diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 5234836413cc7..01b83eb0ded47 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -23,7 +23,7 @@ let in stdenv.mkDerivation rec { name = "gst-plugins-good-${version}"; - version = "1.15.1"; + version = "1.16.0"; meta = with stdenv.lib; { description = "Gstreamer Good Plugins"; @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-plugins-good/${name}.tar.xz"; - sha256 = "15f6klr7wg6jlcyx0qspi13s8wmc9fij1bx1bbvy90a9a72v97rb"; + sha256 = "1zdhif1mhf0ihkjpjyrh65g2iz2cawkjjb3h5w8h9ml06grxwjk5"; }; outputs = [ "out" "dev" ]; @@ -56,14 +56,12 @@ stdenv.mkDerivation rec { libdv libvpx speex flac taglib cairo gdk_pixbuf aalib libcaca libsoup libshout lame mpg123 twolame libintl - # TODO: Remove the comments once https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/commit/e234932dc703e51a0e1aa3b9c408f12758b12335 - # is merged and available in nixpkgs. - libXdamage # present feature but undeclared in meson_options.txt, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/553 - libXext # present feature but undeclared in meson_options.txt, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/553 - libXfixes # present feature but undeclared in meson_options.txt, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/553 + libXdamage + libXext + libXfixes ncurses - xorg.libXfixes # present feature but undeclared in meson_options.txt, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/553 - xorg.libXdamage # present feature but undeclared in meson_options.txt, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/553 + xorg.libXfixes + xorg.libXdamage wavpack ] ++ optional gtkSupport gtk3 # for gtksink diff --git a/pkgs/development/libraries/gstreamer/libav/default.nix b/pkgs/development/libraries/gstreamer/libav/default.nix index 5a3b6020aefbe..297c8ada884ee 100644 --- a/pkgs/development/libraries/gstreamer/libav/default.nix +++ b/pkgs/development/libraries/gstreamer/libav/default.nix @@ -10,7 +10,7 @@ assert withSystemLibav -> libav != null; stdenv.mkDerivation rec { name = "gst-libav-${version}"; - version = "1.15.1"; + version = "1.16.0"; meta = { homepage = https://gstreamer.freedesktop.org; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-libav/${name}.tar.xz"; - sha256 = "0hq5y8zg6a3fliwip7k85hg6s6amsmbqgrjl6axzrr3y6akcvslk"; + sha256 = "16ixqpfrr7plaaz14n3vagr2q5xbfkv7gpmcsyndrkx98f813b6z"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix index 5dc678cf0ab02..c4620a29e9458 100644 --- a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix +++ b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { name = "gst-rtsp-server-${version}"; - version = "1.15.1"; + version = "1.16.0"; meta = with stdenv.lib; { description = "Gstreamer RTSP server"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-rtsp-server/${name}.tar.xz"; - sha256 = "0d0jaf7ir40dxpxs41wyb7m7riyl7wsqcb5qvd4vhwpz0dwxhpvl"; + sha256 = "069zy159izy50blci9fli1i2r8jh91qkmgrz1n0xqciy3bn9x3hr"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index 19d84cbd349cf..5c3a56814bad8 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { name = "gst-plugins-ugly-${version}"; - version = "1.15.1"; + version = "1.16.0"; meta = with lib; { description = "Gstreamer Ugly Plugins"; @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-plugins-ugly/${name}.tar.xz"; - sha256 = "17p9x30ywanz1lbk061kzd8bypcv5hkin6iyaqffp8alrwiak3qp"; + sha256 = "1hm46c1fy9vl1wfwipsj41zp79cm7in1fpmjw24j5hriy32n82g3"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index ae5a6b1c97c95..c0541857e8b7a 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { name = "gst-vaapi-${version}"; - version = "1.15.1"; + version = "1.16.0"; src = fetchurl { url = "${meta.homepage}/src/gstreamer-vaapi/gstreamer-vaapi-${version}.tar.xz"; - sha256 = "1aazan6r6p5aabb671znjkh8kmpxkz68wvaickqwzb1bz0ijcivc"; + sha256 = "07qpynamiz0lniqajcaijh3n7ixs4lfk9a5mfk50sng0dricwzsf"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/gstreamer/validate/default.nix b/pkgs/development/libraries/gstreamer/validate/default.nix index 869001e792080..06d275078f30b 100644 --- a/pkgs/development/libraries/gstreamer/validate/default.nix +++ b/pkgs/development/libraries/gstreamer/validate/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { name = "gst-validate-${version}"; - version = "1.15.1"; + version = "1.16.0"; meta = { description = "Integration testing infrastructure for the GStreamer framework"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}/src/gst-validate/${name}.tar.xz"; - sha256 = "195hwblagfsnq1xn858al3f32jn5nynr4j5x395dpg3vl3c4k5v4"; + sha256 = "1jfnd0g9hmdbqfxsx96yc9vpf1w6m33hqwrr6lj4i83kl54awcck"; }; outputs = [ "out" "dev" ]; From 81762b99ef4132b414075ae9a328a517a32e0202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 1 May 2019 19:47:53 +0200 Subject: [PATCH 3/5] gst_all_1.gst-plugins-bad: Fix gsm dependency --- .../development/libraries/gstreamer/bad/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index cff909c3cf326..0945dccde814e 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -13,6 +13,7 @@ , directfb , fdk_aac , flite +, gsm , libaom , libdc1394 , libde265 @@ -71,6 +72,16 @@ stdenv.mkDerivation rec { patches = [ ./fix_pkgconfig_includedir.patch + # Remove when https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/312 is merged and available to us + (fetchpatch { + url = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/99790eaad9083cce5ab2b1646489e1a1c0faad1e.patch"; + sha256 = "11bqy4sl05qq5mj4bx5s09rq106s3j0vnpjl4np058im32j69lr3"; + }) + # Remove when https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/312 is merged and available to us + (fetchpatch { + url = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/1872da81c48d3a719bd39955fd97deac7d037d74.patch"; + sha256 = "11zwrr5ggflmvr0qfssj7dmhgd3ybiadmy79b4zh24022zgw3xpz"; + }) ]; src = fetchurl { @@ -102,6 +113,7 @@ stdenv.mkDerivation rec { directfb fdk_aac flite + gsm libaom libdc1394 libde265 @@ -145,7 +157,6 @@ stdenv.mkDerivation rec { "-Ddts=disabled" # required `libdca` library not packaged in nixpkgs as of writing, and marked as "BIG FAT WARNING: libdca is still in early development" "-Dfaac=${if faacSupport then "enabled" else "disabled"}" - "-Dgsm=disabled" # as of writing, with `gsm` in `buildInputs` we get "GSM plugin is enabled: found libgsm but no headers"; gsm packaging problem? "-Diqa=disabled" # required `dssim` library not packaging in nixpkgs as of writing "-Dmsdk=disabled" # not packaged in nixpkgs as of writing / no Windows support # As of writing, with `libmpcdec` in `buildInputs` we get From d5637570912e7cd062d8def5acdf9bfa391e28bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 1 May 2019 19:48:38 +0200 Subject: [PATCH 4/5] gst_all_1.gst-plugins-bad: Fix rtmp dependency --- pkgs/development/libraries/gstreamer/bad/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 0945dccde814e..ba59a25143754 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -30,6 +30,7 @@ , openexr , openh264 , pango +, rtmpdump , sbc , soundtouch , spandsp @@ -129,6 +130,7 @@ stdenv.mkDerivation rec { opencv3 openexr openh264 + rtmpdump pango sbc soundtouch @@ -173,7 +175,6 @@ stdenv.mkDerivation rec { "-Dopenmpt=disabled" # `libopenmpt` not packaged in nixpkgs as of writing "-Dopenni2=disabled" # not packaged in nixpkgs as of writing "-Dopensles=disabled" # not packaged in nixpkgs as of writing - "-Drtmp=disabled" # `librtmp` not packaged in nixpkgs as of writing "-Dsctp=disabled" # required `usrsctp` library not packaged in nixpkgs as of writing "-Dteletext=disabled" # required `zvbi` library not packaged in nixpkgs as of writing "-Dtinyalsa=disabled" # not packaged in nixpkgs as of writing From e795745ff5f3f4958a56e61dee6cafe7bb5a2e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 1 May 2019 18:44:08 +0200 Subject: [PATCH 5/5] gst_all_1.gst-plugins-bad: Fix evaluation on Darwin, fix gstreamer builds. Commit be382109ad01d0aa8660f2b19a20e345c86d246b broke evaluation on Darwin because it added these unconditional buildInputs that don't evaluate on Darwin: libnice librdf lilv lv2 serd sord sratom This commit fixes it, and also fixes recently-added new dependencies for other packages accordingly. It further fixes the build of many gstreamer packages on Darwin. --- .../libraries/gstreamer/bad/default.nix | 76 +++++++++++++++---- .../libraries/gstreamer/base/default.nix | 64 +++++++++++----- .../libraries/gstreamer/core/default.nix | 3 + .../libraries/gstreamer/good/default.nix | 35 +++++++-- .../libraries/gstreamer/validate/default.nix | 12 ++- 5 files changed, 149 insertions(+), 41 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index ba59a25143754..675771b08a929 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -10,6 +10,7 @@ , bluez , chromaprint , curl +, darwin , directfb , fdk_aac , flite @@ -102,29 +103,22 @@ stdenv.mkDerivation rec { buildInputs = [ gst-plugins-base orc faad2 libass libkate libmms - libnice webrtc-audio-processing # webrtc + webrtc-audio-processing # webrtc libbs2b - ladspaH librdf # ladspa plug-in - lilv lv2 serd sord sratom # lv2 plug-in + ladspaH # ladspa plug-in libmodplug mpeg2dec openjpeg libopus librsvg - bluez - chromaprint curl.dev - directfb fdk_aac - flite gsm libaom libdc1394 libde265 - libdrm libdvdnav libdvdread - libgudev - libofa libsndfile libusb1 + mjpegtools neon openal opencv3 @@ -132,9 +126,7 @@ stdenv.mkDerivation rec { openh264 rtmpdump pango - sbc soundtouch - spandsp srtp zbar fluidsynth libvdpau @@ -144,12 +136,39 @@ stdenv.mkDerivation rec { srt ] ++ optional faacSupport faac + ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + # For unknown reasons the order is important, e.g. if + # VideoToolbox is last, we get: + # fatal error: 'VideoToolbox/VideoToolbox.h' file not found + VideoToolbox + AudioToolbox + AVFoundation + CoreMedia + CoreVideo + Foundation + MediaToolbox + ]) + # These currently do not evaluate on darwin + ++ optionals (!stdenv.isDarwin) [ + bluez + chromaprint + directfb + flite + flite + libdrm + libgudev + libnice + libofa + librdf + lilv lv2 serd sord sratom # lv2 plug-in + sbc + spandsp + ] ++ optional stdenv.isLinux wayland # wildmidi requires apple's OpenAL # TODO: package apple's OpenAL, fix wildmidi, include on Darwin ++ optional (!stdenv.isDarwin) wildmidi - # TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin - ++ optional (!stdenv.isDarwin) mjpegtools; + ; mesonFlags = [ # Enables all features, so that we know when new dependencies are necessary. @@ -189,7 +208,34 @@ stdenv.mkDerivation rec { # see https://github.com/NixOS/nixpkgs/issues/54395 "-Dnvdec=disabled" "-Dnvenc=disabled" - ]; + ] + ++ optionals stdenv.isDarwin [ + "-Dbluez=disabled" + "-Dchromaprint=disabled" + "-Ddirectfb=disabled" + "-Dflite=disabled" + "-Dkms=disabled" # renders to libdrm output + "-Dofa=disabled" + "-Dlv2=disabled" + "-Dsbc=disabled" + "-Dspandsp=disabled" + "-Ddvb=disabled" + "-Dfbdev=disabled" + "-Duvch264=disabled" # requires gudev + "-Dladspa=disabled" # requires lrdf + "-Dwebrtc=disabled" # requires libnice, which as of writing doesn't work on Darwin in nixpkgs + "-Dwildmidi=disabled" # see dependencies above + ] + ++ optional (!gst-plugins-base.glEnabled) "-Dgl=disabled" + ++ optional (!gst-plugins-base.waylandEnabled) "-Dwayland=disabled" + # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`, + # but its meson build system does not declare the dependency. + ++ optional (!gst-plugins-base.glEnabled) "-Dapplemedia=disabled" + ; + + # This package has some `_("string literal")` string formats + # that trip up clang with format security enabled. + hardeningDisable = [ "format" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 16c3155a95c34..50a77a746c482 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -4,13 +4,19 @@ , libintl, libopus , isocodes , libjpeg +, libpng , libvisual , tremor # provides 'virbisidec' , gtk-doc, docbook_xsl, docbook_xml_dtd_412 , enableX11 ? stdenv.isLinux, libXv , enableWayland ? stdenv.isLinux, wayland , enableAlsa ? stdenv.isLinux, alsaLib -, enableCocoa ? false, darwin +# Enabling Cocoa seems to currently not work, giving compile +# errors. Suspected is that a newer version than clang +# is needed than 5.0 but it is not clear. +, enableCocoa ? false +, darwin +, enableGl ? (enableX11 || enableWayland || enableCocoa) , enableCdparanoia ? (!stdenv.isDarwin), cdparanoia }: stdenv.mkDerivation rec { @@ -34,31 +40,19 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig python3 gettext gobject-introspection + meson + ninja gtk-doc # Without these, enabling the 'gtk_doc' gives us `FAILED: meson-install` docbook_xsl docbook_xml_dtd_412 - ] - # Broken meson with Darwin. Should hopefully be fixed soon. Tracking - # in https://bugzilla.gnome.org/show_bug.cgi?id=781148. - ++ lib.optionals (!stdenv.isDarwin) [ meson ninja ]; - - # On Darwin, we currently use autoconf, on all other systems Meson - # TODO Switch to Meson on Darwin as well - - # TODO How to pass these to Meson? - configureFlags = lib.optionals stdenv.isDarwin [ - "--enable-x11=${if enableX11 then "yes" else "no"}" - "--enable-wayland=${if enableWayland then "yes" else "no"}" - "--enable-cocoa=${if enableCocoa then "yes" else "no"}" - ] - # Introspection fails on my MacBook currently - ++ lib.optional stdenv.isDarwin "--disable-introspection"; + ]; - mesonFlags = lib.optionals (!stdenv.isDarwin) [ + mesonFlags = [ # Enables all features, so that we know when new dependencies are necessary. "-Dauto_features=enabled" "-Dexamples=disabled" # requires many dependencies and probably not useful for our users "-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing + "-Dgl_platform=[${lib.optionalString (enableX11 || enableWayland || enableCocoa) "auto"}]" # See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices "-Dgl_winsys=[${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}]" # We must currently disable gtk_doc API docs generation, @@ -71,13 +65,24 @@ stdenv.mkDerivation rec { ] ++ lib.optional (!enableX11) "-Dx11=disabled" # TODO How to disable Wayland? + ++ lib.optional (!enableGl) "-Dgl=disabled" ++ lib.optional (!enableAlsa) "-Dalsa=disabled" ++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled" + ++ lib.optionals stdenv.isDarwin [ + "-Dlibvisual=disabled" + ] ; - buildInputs = [ orc libtheora libintl libopus isocodes libjpeg libvisual tremor ] + buildInputs = [ orc libtheora libintl libopus isocodes libjpeg libpng tremor ] ++ lib.optional enableAlsa alsaLib + ++ lib.optionals (!stdenv.isDarwin) [ + libvisual + ] ++ lib.optionals enableX11 [ libXv pango ] + ++ lib.optionals stdenv.isDarwin [ + pango + darwin.apple_sdk.frameworks.OpenGL + ] ++ lib.optional enableWayland wayland ++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa ++ lib.optional enableCdparanoia cdparanoia; @@ -88,6 +93,10 @@ stdenv.mkDerivation rec { patchShebangs . ''; + # This package has some `_("string literal")` string formats + # that trip up clang with format security enabled. + hardeningDisable = [ "format" ]; + enableParallelBuilding = true; doCheck = false; # fails, wants DRI access for OpenGL @@ -95,4 +104,21 @@ stdenv.mkDerivation rec { patches = [ ./fix_pkgconfig_includedir.patch ]; + + passthru = { + # Downstream `gst-*` packages depending on `gst-plugins-base` + # have meson build options like 'gl' etc. that depend + # on these features being built in `-base`. + # If they are not built here, then the downstream builds + # will fail, as they, too, use `-Dauto_features=enabled` + # which would enable these options unconditionally. + # That means we must communicate to these downstream packages + # if the `-base` enabled these options or not, so that + # the can enable/disable those features accordingly. + # The naming `*Enabled` vs `enable*` is intentional to + # distinguish inputs from outputs (what is to be built + # vs what was built) and to make them easier to search for. + glEnabled = enableGl; + waylandEnabled = enableWayland; + }; } diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index 9869e1eddbdd1..23b4d3675f65b 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -52,6 +52,9 @@ stdenv.mkDerivation rec { "-Dauto_features=enabled" "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + ] ++ lib.optionals (stdenv.isDarwin) [ + "-Dlibunwind=disabled" + "-Dlibdw=disabled" ]; postInstall = '' diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 01b83eb0ded47..affc8ae1ac8ec 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -6,6 +6,9 @@ , libsoup, libpulseaudio, libintl , darwin, lame, mpg123, twolame , gtkSupport ? false, gtk3 ? null +# As of writing, jack2 incurs a Qt dependency (big!) via `ffado`. +# In the fuure we should probably split `ffado`. +, enableJack ? false , libXdamage , libXext , libXfixes @@ -43,7 +46,7 @@ stdenv.mkDerivation rec { sha256 = "1zdhif1mhf0ihkjpjyrh65g2iz2cawkjjb3h5w8h9ml06grxwjk5"; }; - outputs = [ "out" "dev" ]; + outputs = [ "out" ]; patches = [ ./fix_pkgconfig_includedir.patch ]; @@ -65,8 +68,21 @@ stdenv.mkDerivation rec { wavpack ] ++ optional gtkSupport gtk3 # for gtksink - ++ optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ] - ++ optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 libgudev jack2 ]; + ++ optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Cocoa + # Needed for NSDefaultRunLoopMode symbols. + darwin.cf-private + ] + ++ optionals stdenv.isLinux [ + libavc1394 + libgudev + libiec61883 + libpulseaudio + libv4l + ] + ++ optionals (stdenv.isLinux && enableJack) [ + jack2 + ]; mesonFlags = [ # Enables all features, so that we know when new dependencies are necessary. @@ -76,10 +92,17 @@ stdenv.mkDerivation rec { ] ++ optional (!gtkSupport) "-Dgtk3=disabled" ++ optionals (!stdenv.isLinux) [ - "-Djack=disabled" # unclear whether Jack works on Darwin + "-Ddv1394=disabled" # Linux only + "-Doss4=disabled" # Linux only + "-Doss=disabled" # Linux only + "-Dpulse=disabled" # TODO check if we can keep this enabled + "-Dv4l2-gudev=disabled" # Linux-only + "-Dv4l2=disabled" # Linux-only + "-Dximagesrc=disabled" # Linux-only + "-Dpulse=disabled" # TODO check if we can keep this enabled ] - ++ optionals (!stdenv.isLinux) [ - "-Dv4l2-gudev=disabled" + ++ optionals (!stdenv.isLinux || !enableJack) [ + "-Djack=disabled" # unclear whether Jack works on Darwin ]; # fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''" diff --git a/pkgs/development/libraries/gstreamer/validate/default.nix b/pkgs/development/libraries/gstreamer/validate/default.nix index 06d275078f30b..2ce2e751df87b 100644 --- a/pkgs/development/libraries/gstreamer/validate/default.nix +++ b/pkgs/development/libraries/gstreamer/validate/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, gstreamer, gst-plugins-base +{ stdenv, fetchurl, fetchpatch, pkgconfig, gstreamer, gst-plugins-base , python, gobject-introspection, json-glib }: @@ -18,6 +18,16 @@ stdenv.mkDerivation rec { sha256 = "1jfnd0g9hmdbqfxsx96yc9vpf1w6m33hqwrr6lj4i83kl54awcck"; }; + patches = [ + # Fixes a duplicate symbol compilation error on Darwin. + # TODO Remove when https://gitlab.freedesktop.org/gstreamer/gst-devtools/commit/22e179cbc1acf8e4bcbc8173c833ea5f086fa28c is available in nixpkgs, likely for 1.18. + (fetchpatch { + url = "https://gitlab.freedesktop.org/gstreamer/gst-devtools/commit/751a6d756c0f7c3a721a235ced74fec17f038185.patch"; + sha256 = "05pzjn63pcsf3y153r7azy8dbr0cmn10d10r11cdprgw2bv5hlha"; + stripLen = 1; # gst-validate is a subdir of the `gst-devtools` git repo + }) + ]; + outputs = [ "out" "dev" ]; nativeBuildInputs = [