From 1f6d0f00a025e8ae36c64c3fd5cbe47518bf41de Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 11:59:16 -0500 Subject: [PATCH 01/15] gst_all_1: pname-ification --- pkgs/development/libraries/gstreamer/bad/default.nix | 2 +- pkgs/development/libraries/gstreamer/base/default.nix | 2 +- pkgs/development/libraries/gstreamer/core/default.nix | 2 +- pkgs/development/libraries/gstreamer/ges/default.nix | 2 +- pkgs/development/libraries/gstreamer/good/default.nix | 2 +- pkgs/development/libraries/gstreamer/libav/default.nix | 2 +- pkgs/development/libraries/gstreamer/rtsp-server/default.nix | 2 +- pkgs/development/libraries/gstreamer/ugly/default.nix | 2 +- pkgs/development/libraries/gstreamer/vaapi/default.nix | 4 ++-- pkgs/development/libraries/gstreamer/validate/default.nix | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 735ab4e6e18..4ed0f15576a 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -87,7 +87,7 @@ stdenv.mkDerivation rec { ]; src = fetchurl { - url = "${meta.homepage}/src/gst-plugins-bad/${pname}-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "019b0yqjrcg6jmfd4cc336h1bz5p4wxl58yz1c4sdb96avirs4r2"; }; diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 81d91458132..f09b8d0ed24 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { }; src = fetchurl { - url = "${meta.homepage}/src/gst-plugins-base/${pname}-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1bmmdwbyy89ayb85xc48y217f6wdmpz96f30zm6v53z2a5xsm4s0"; }; diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index f0f01a977fd..764de70c919 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { }; src = fetchurl { - url = "${meta.homepage}/src/gstreamer/${pname}-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "003wy1p1in85p9sr5jsyhbnwqaiwz069flwkhyx7qhxy31qjz3hf"; }; diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix index 810cee650ca..eec5fe60ec4 100644 --- a/pkgs/development/libraries/gstreamer/ges/default.nix +++ b/pkgs/development/libraries/gstreamer/ges/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; src = fetchurl { - url = "${meta.homepage}/src/gstreamer-editing-services/${pname}-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1las94jkx83sxmzi5w6b0xm89dqqwzpdsb6h9w9ixndhnbpzm8w2"; }; diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index c801684b065..949736a38fc 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { }; src = fetchurl { - url = "${meta.homepage}/src/gst-plugins-good/${pname}-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1zdhif1mhf0ihkjpjyrh65g2iz2cawkjjb3h5w8h9ml06grxwjk5"; }; diff --git a/pkgs/development/libraries/gstreamer/libav/default.nix b/pkgs/development/libraries/gstreamer/libav/default.nix index 1847b8d0c12..db62e57afc2 100644 --- a/pkgs/development/libraries/gstreamer/libav/default.nix +++ b/pkgs/development/libraries/gstreamer/libav/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { }; src = fetchurl { - url = "${meta.homepage}/src/gst-libav/${pname}-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "16ixqpfrr7plaaz14n3vagr2q5xbfkv7gpmcsyndrkx98f813b6z"; }; diff --git a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix index 5c571fa4a1e..2922f2c9214 100644 --- a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix +++ b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { }; src = fetchurl { - url = "${meta.homepage}/src/gst-rtsp-server/${pname}-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "069zy159izy50blci9fli1i2r8jh91qkmgrz1n0xqciy3bn9x3hr"; }; diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index 552ab1ec292..8e1821cbd01 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { }; src = fetchurl { - url = "${meta.homepage}/src/gst-plugins-ugly/${pname}-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1hm46c1fy9vl1wfwipsj41zp79cm7in1fpmjw24j5hriy32n82g3"; }; diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index adb495689e3..95056023ed6 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -4,11 +4,11 @@ }: stdenv.mkDerivation rec { - pname = "gst-vaapi"; + pname = "gstreamer-vaapi"; version = "1.16.0"; src = fetchurl { - url = "${meta.homepage}/src/gstreamer-vaapi/gstreamer-vaapi-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "07qpynamiz0lniqajcaijh3n7ixs4lfk9a5mfk50sng0dricwzsf"; }; diff --git a/pkgs/development/libraries/gstreamer/validate/default.nix b/pkgs/development/libraries/gstreamer/validate/default.nix index ad013d1570e..74c58cd4c80 100644 --- a/pkgs/development/libraries/gstreamer/validate/default.nix +++ b/pkgs/development/libraries/gstreamer/validate/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; src = fetchurl { - url = "${meta.homepage}/src/gst-validate/${pname}-${version}.tar.xz"; + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; sha256 = "1jfnd0g9hmdbqfxsx96yc9vpf1w6m33hqwrr6lj4i83kl54awcck"; }; From b32481a6873b514f3d2432f3e8d3af0c3e637809 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:03:37 -0500 Subject: [PATCH 02/15] gst_all_1.gst-editing-services: 1.16.0 -> 1.16.1 --- .../libraries/gstreamer/ges/default.nix | 73 +++++++++++++------ 1 file changed, 50 insertions(+), 23 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix index eec5fe60ec4..d62af71d3ae 100644 --- a/pkgs/development/libraries/gstreamer/ges/default.nix +++ b/pkgs/development/libraries/gstreamer/ges/default.nix @@ -1,39 +1,66 @@ -{ stdenv, fetchurl, fetchpatch, meson, ninja -, pkgconfig, python, gst-plugins-base, libxml2 -, flex, perl, gettext, gobject-introspection +{ stdenv +, fetchurl +, fetchpatch +, meson +, ninja +, pkgconfig +, python +, gst-plugins-base +, libxml2 +, flex +, perl +, gettext +, gobject-introspection }: stdenv.mkDerivation rec { pname = "gstreamer-editing-services"; - version = "1.16.0"; - - meta = with stdenv.lib; { - description = "Library for creation of audio/video non-linear editors"; - homepage = "https://gstreamer.freedesktop.org"; - license = licenses.lgpl2Plus; - platforms = platforms.unix; - }; - - src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "1las94jkx83sxmzi5w6b0xm89dqqwzpdsb6h9w9ixndhnbpzm8w2"; - }; + version = "1.16.1"; outputs = [ "out" "dev" ]; - nativeBuildInputs = [ meson ninja pkgconfig gettext gobject-introspection python flex perl ]; - - propagatedBuildInputs = [ gst-plugins-base libxml2 ]; - - mesonFlags = [ - "-Dgtk_doc=disabled" - ]; + src = fetchurl { + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "10375z5mc3bwfs07mhmfx943sbp55z8m8ihp9xpcknkdks7qg168"; + }; patches = [ ./fix_pkgconfig_includedir.patch ]; + nativeBuildInputs = [ + meson + ninja + pkgconfig + gettext + gobject-introspection + python + flex + perl + ]; + + buildInputs = [ + libxml2 + ]; + + propagatedBuildInputs = [ + gst-plugins-base + ]; + + mesonFlags = [ + "-Dgtk_doc=disabled" + ]; + postPatch = '' + # for some reason, gst-plugins-bad cannot be found + # fortunately, they are only used by tests, which we do not run sed -i -r -e 's/p(bad|good) = .*/p\1 = pbase/' tests/check/meson.build ''; + + meta = with stdenv.lib; { + description = "Library for creation of audio/video non-linear editors"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + }; } From 9e4fb4c23ceba96f1a1b0e483d6908d2a6698db6 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:03:44 -0500 Subject: [PATCH 03/15] gst_all_1.gst-plugins-base: 1.16.0 -> 1.16.1 --- .../libraries/gstreamer/base/default.nix | 143 ++++++++++-------- 1 file changed, 80 insertions(+), 63 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index f09b8d0ed24..d7d4439d30c 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -1,63 +1,88 @@ -{ stdenv, fetchurl, fetchpatch, lib -, pkgconfig, meson, ninja, gettext, gobject-introspection -, python3, gstreamer, orc, pango, libtheora -, libintl, libopus +{ stdenv +, fetchurl +, lib +, pkgconfig +, meson +, ninja +, gettext +, gobject-introspection +, python3 +, gstreamer +, orc +, pango +, libtheora +, libintl +, libopus , isocodes , libjpeg , libvisual , tremor # provides 'virbisidec' , libGL -, gtk-doc, docbook_xsl, docbook_xml_dtd_412 -, enableX11 ? stdenv.isLinux, libXv -, enableWayland ? stdenv.isLinux, wayland -, enableAlsa ? stdenv.isLinux, alsaLib -, enableCocoa ? false, darwin -, enableCdparanoia ? (!stdenv.isDarwin), cdparanoia }: +, gtk-doc +, docbook_xsl +, docbook_xml_dtd_43 +, enableX11 ? stdenv.isLinux +, libXv +, enableWayland ? stdenv.isLinux +, wayland +, enableAlsa ? stdenv.isLinux +, alsaLib +, enableCocoa ? false +, darwin +, enableCdparanoia ? (!stdenv.isDarwin) +, cdparanoia +}: stdenv.mkDerivation rec { pname = "gst-plugins-base"; - version = "1.16.0"; - - meta = with lib; { - description = "Base plugins and helper libraries"; - homepage = https://gstreamer.freedesktop.org; - license = licenses.lgpl2Plus; - platforms = platforms.unix; - maintainers = with maintainers; [ matthewbauer ]; - }; - - src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "1bmmdwbyy89ayb85xc48y217f6wdmpz96f30zm6v53z2a5xsm4s0"; - }; + version = "1.16.1"; outputs = [ "out" "dev" ]; + src = fetchurl { + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "0aybbwnzm15074smdk2bamj3ssck3hjvmilvgh49f19xjf4w8g2w"; + }; + + patches = [ + ./fix_pkgconfig_includedir.patch + ]; + nativeBuildInputs = [ - pkgconfig python3 gettext gobject-introspection + meson + ninja + pkgconfig + python3 + gettext + gobject-introspection + + # docs 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 ]; + docbook_xsl + docbook_xml_dtd_43 + ]; - # On Darwin, we currently use autoconf, on all other systems Meson - # TODO Switch to Meson on Darwin as well + buildInputs = [ + orc + libtheora + libintl + libopus + isocodes + libjpeg + tremor + libGL + ] ++ lib.optional (!stdenv.isDarwin) libvisual + ++ lib.optional enableAlsa alsaLib + ++ lib.optionals enableX11 [ libXv pango ] + ++ lib.optional enableWayland wayland + ++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa + ++ lib.optional enableCdparanoia cdparanoia; - # 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"; + propagatedBuildInputs = [ + gstreamer + ]; - mesonFlags = lib.optionals (!stdenv.isDarwin) [ - # Enables all features, so that we know when new dependencies are necessary. - "-Dauto_features=enabled" + mesonFlags = [ "-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 @@ -65,36 +90,28 @@ stdenv.mkDerivation rec { # 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 + # https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/564 # for it failing because some Wayland symbols are missing. # This problem appeared between 1.15.1 and 1.16.0. + # In 1.18 they should switch to hotdoc, which should make this issue irrelevant. "-Dgtk_doc=disabled" ] ++ 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 tremor libGL ] - ++ lib.optional (!stdenv.isDarwin) libvisual - ++ lib.optional enableAlsa alsaLib - ++ lib.optionals enableX11 [ libXv pango ] - ++ lib.optional enableWayland wayland - ++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa - ++ lib.optional enableCdparanoia cdparanoia; - - propagatedBuildInputs = [ gstreamer ]; + ++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled"; postPatch = '' - patchShebangs . + patchShebangs common/scangobj-merge.py ''; - enableParallelBuilding = true; - doCheck = false; # fails, wants DRI access for OpenGL - patches = [ - ./fix_pkgconfig_includedir.patch - ]; + meta = with lib; { + description = "Base GStreamer plug-ins and helper libraries"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ matthewbauer ]; + }; } From c6eec8874a8c307a332441b33c1d406e9f9e06df Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:03:51 -0500 Subject: [PATCH 04/15] gst_all_1.gst-rtsp-server: 1.16.0 -> 1.16.1 --- .../gstreamer/rtsp-server/default.nix | 50 ++++++++++++------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix index 2922f2c9214..e602a96291e 100644 --- a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix +++ b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix @@ -1,38 +1,50 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig -, gettext, gobject-introspection +{ stdenv +, fetchurl +, meson +, ninja +, pkgconfig +, gettext +, gobject-introspection , gst-plugins-base , gst-plugins-bad }: stdenv.mkDerivation rec { pname = "gst-rtsp-server"; - version = "1.16.0"; - - meta = with stdenv.lib; { - description = "Gstreamer RTSP server"; - homepage = "https://gstreamer.freedesktop.org"; - longDescription = '' - a library on top of GStreamer for building an RTSP server. - ''; - license = licenses.lgpl2Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ bkchr ]; - }; + version = "1.16.1"; src = fetchurl { url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "069zy159izy50blci9fli1i2r8jh91qkmgrz1n0xqciy3bn9x3hr"; + sha256 = "0i01f1nr0921z6z4nrh8icz76s2n7i228aqxg1ihvxl65ynsraxh"; }; outputs = [ "out" "dev" ]; - nativeBuildInputs = [ meson ninja gettext gobject-introspection pkgconfig ]; + nativeBuildInputs = [ + meson + ninja + gettext + gobject-introspection + pkgconfig + ]; - buildInputs = [ gst-plugins-base gst-plugins-bad ]; + 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 ]; + + meta = with stdenv.lib; { + description = "GStreamer RTSP server"; + homepage = "https://gstreamer.freedesktop.org"; + longDescription = '' + A library on top of GStreamer for building an RTSP server. + ''; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ bkchr ]; + }; } From e8043ce0ab44f449cc36f0d1edb6e61fe5b0e41b Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:03:58 -0500 Subject: [PATCH 05/15] gst_all_1.gstreamer: 1.16.0 -> 1.16.1 --- .../libraries/gstreamer/core/default.nix | 105 +++++++++++------- 1 file changed, 65 insertions(+), 40 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index 764de70c919..bbef0178312 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -1,10 +1,23 @@ -{ stdenv, fetchurl, fetchpatch, meson, ninja -, pkgconfig, gettext, gobject-introspection -, bison, flex, python3, glib, makeWrapper -, libcap,libunwind, darwin +{ stdenv +, fetchurl +, fetchpatch +, meson +, ninja +, pkgconfig +, gettext +, gobject-introspection +, bison +, flex +, python3 +, glib +, makeWrapper +, libcap +, libunwind +, darwin , elfutils # for libdw , bash-completion -, docbook_xsl, docbook_xml_dtd_412 +, docbook_xsl +, docbook_xml_dtd_43 , gtk-doc , lib , CoreServices @@ -12,50 +25,66 @@ stdenv.mkDerivation rec { pname = "gstreamer"; - version = "1.16.0"; + version = "1.16.1"; - meta = with lib ;{ - description = "Open source multimedia framework"; - homepage = https://gstreamer.freedesktop.org; - license = licenses.lgpl2Plus; - platforms = platforms.unix; - maintainers = with maintainers; [ ttuegel matthewbauer ]; - }; + outputs = [ "out" "dev" "devdoc" ]; + outputBin = "dev"; src = fetchurl { url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "003wy1p1in85p9sr5jsyhbnwqaiwz069flwkhyx7qhxy31qjz3hf"; + sha256 = "0z9pyhf6zm1r0spw6zym80bvbyx6h8xg9h6535csbnn48ws1q882"; }; patches = [ ./fix_pkgconfig_includedir.patch ]; - outputs = [ "out" "dev" ]; - outputBin = "dev"; - nativeBuildInputs = [ - meson ninja pkgconfig gettext bison flex python3 makeWrapper gobject-introspection + meson + ninja + pkgconfig + gettext + bison + flex + python3 + makeWrapper + gobject-introspection bash-completion + + # documentation gtk-doc - # Without these, enabling the 'gtk_doc' gives us `FAILED: meson-install` - docbook_xsl docbook_xml_dtd_412 + docbook_xsl + docbook_xml_dtd_43 ]; - buildInputs = - lib.optionals stdenv.isLinux [ libcap libunwind elfutils ] - ++ lib.optional stdenv.isDarwin CoreServices; + buildInputs = lib.optionals stdenv.isLinux [ + libcap + libunwind + elfutils + ] ++ lib.optionals stdenv.isDarwin [ + CoreServices + ]; - propagatedBuildInputs = [ glib ]; + propagatedBuildInputs = [ + glib + ]; 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 - ] + ] ++ lib.optionals stdenv.isDarwin [ # darwin.libunwind doesn't have pkgconfig definitions so meson doesn't detect it. - ++ stdenv.lib.optionals stdenv.isDarwin [ "-Dlibunwind=disabled" "-Dlibdw=disabled" ]; + "-Dlibunwind=disabled" + "-Dlibdw=disabled" + ]; + + postPatch = '' + patchShebangs \ + gst/parse/get_flex_version.py \ + gst/parse/gen_grammar.py.in \ + gst/parse/gen_lex.py.in \ + libs/gst/helpers/ptp_helper_post_install.sh + ''; postInstall = '' for prog in "$dev/bin/"*; do @@ -64,21 +93,17 @@ stdenv.mkDerivation rec { done ''; - 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" ''; setupHook = ./setup-hook.sh; + + meta = with lib ;{ + description = "Open source multimedia framework"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ ttuegel matthewbauer ]; + }; } From ca789d36fff4a2ee0e3316a46ba625e4be576c18 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:04:06 -0500 Subject: [PATCH 06/15] gst_all_1.gst-libav: 1.16.0 -> 1.16.1 --- .../libraries/gstreamer/libav/default.nix | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/libav/default.nix b/pkgs/development/libraries/gstreamer/libav/default.nix index db62e57afc2..5319de255e7 100644 --- a/pkgs/development/libraries/gstreamer/libav/default.nix +++ b/pkgs/development/libraries/gstreamer/libav/default.nix @@ -1,43 +1,46 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig -, python, yasm, gst-plugins-base, orc, bzip2 -, gettext, withSystemLibav ? true, libav ? null +{ stdenv +, lib +, fetchurl +, meson +, ninja +, pkgconfig +, python3 +, gst-plugins-base +, gettext +, libav }: # Note that since gst-libav-1.6, libav is actually ffmpeg. See # https://gstreamer.freedesktop.org/releases/1.6/ for more info. -assert withSystemLibav -> libav != null; - stdenv.mkDerivation rec { pname = "gst-libav"; - version = "1.16.0"; - - meta = { - homepage = https://gstreamer.freedesktop.org; - license = stdenv.lib.licenses.lgpl2Plus; - platforms = stdenv.lib.platforms.unix; - }; + version = "1.16.1"; src = fetchurl { url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "16ixqpfrr7plaaz14n3vagr2q5xbfkv7gpmcsyndrkx98f813b6z"; + sha256 = "1i31ra0l77cfahb6k5xpx45zwvpskzm848aijsbbx9x4x65799g8"; }; outputs = [ "out" "dev" ]; - nativeBuildInputs = with stdenv.lib; - [ meson ninja gettext pkgconfig python ] - ++ optional (!withSystemLibav) yasm - ; - - buildInputs = with stdenv.lib; - [ gst-plugins-base orc bzip2 ] - ++ optional withSystemLibav libav - ; - - mesonFlags = [ - # Enables all features, so that we know when new dependencies are necessary. - "-Dauto_features=enabled" + nativeBuildInputs = [ + meson + ninja + gettext + pkgconfig + python3 ]; + buildInputs = [ + gst-plugins-base + libav + ]; + + meta = with lib; { + description = "FFmpeg/libav plugin for GStreamer"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + }; } From 2ef14fa9eb214c43171ff3aca374903290a22fd4 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:04:13 -0500 Subject: [PATCH 07/15] gst_all_1.gst-plugins-good: 1.16.0 -> 1.16.1 --- .../libraries/gstreamer/good/default.nix | 148 ++++++++++++------ 1 file changed, 99 insertions(+), 49 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 949736a38fc..ff853584d46 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -1,14 +1,37 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, python -, gst-plugins-base, orc, bzip2, gettext -, libv4l, libdv, libavc1394, libiec61883 -, libvpx, speex, flac, taglib, libshout -, cairo, gdk-pixbuf, aalib, libcaca -, libsoup, libpulseaudio, libintl -, darwin, lame, mpg123, twolame +{ stdenv +, fetchurl +, meson +, ninja +, pkgconfig +, python +, gst-plugins-base +, orc +, bzip2 +, gettext +, libv4l +, libdv +, libavc1394 +, libiec61883 +, libvpx +, speex +, flac +, taglib +, libshout +, cairo +, gdk-pixbuf +, aalib +, libcaca +, 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 + # As of writing, jack2 incurs a Qt dependency (big!) via `ffado`. + # In the future we should probably split `ffado`. +, enableJack ? false, jack2 , libXdamage , libXext , libXfixes @@ -16,7 +39,6 @@ , xorg , libgudev , wavpack -, jack2 }: assert gtkSupport -> gtk3 != null; @@ -26,39 +48,44 @@ let in stdenv.mkDerivation rec { pname = "gst-plugins-good"; - version = "1.16.0"; - - meta = with stdenv.lib; { - description = "Gstreamer Good Plugins"; - homepage = "https://gstreamer.freedesktop.org"; - longDescription = '' - a set of plug-ins that we consider to have good quality code, - correct functionality, our preferred license (LGPL for the plug-in - code, LGPL or LGPL-compatible for the supporting library). - ''; - license = licenses.lgpl2Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ matthewbauer ]; - }; - - src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "1zdhif1mhf0ihkjpjyrh65g2iz2cawkjjb3h5w8h9ml06grxwjk5"; - }; + version = "1.16.1"; outputs = [ "out" "dev" ]; + src = fetchurl { + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "07wgz9anf4ram2snp8n1wv6l0q3pd00iaw8bvw3wgklg05lvxflz"; + }; + patches = [ ./fix_pkgconfig_includedir.patch ]; - nativeBuildInputs = [ pkgconfig python meson ninja gettext ]; - - NIX_LDFLAGS = "-lncurses"; + nativeBuildInputs = [ + pkgconfig + python + meson + ninja + gettext + ]; buildInputs = [ - gst-plugins-base orc bzip2 - libdv libvpx speex flac taglib - cairo gdk-pixbuf aalib libcaca - libsoup libshout lame mpg123 twolame libintl + gst-plugins-base + orc + bzip2 + libdv + libvpx + speex + flac + taglib + cairo + gdk-pixbuf + aalib + libcaca + libsoup + libshout + lame + mpg123 + twolame + libintl libXdamage libXext libXfixes @@ -66,29 +93,52 @@ stdenv.mkDerivation rec { xorg.libXfixes xorg.libXdamage wavpack - ] - ++ optional gtkSupport gtk3 # for gtksink - ++ optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ] - ++ optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 libgudev ] - ++ optionals (stdenv.isLinux && enableJack) [ + ] ++ optional gtkSupport [ + # for gtksink + gtk3 + ] ++ optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Cocoa + ] ++ optionals stdenv.isLinux [ + libv4l + libpulseaudio + libavc1394 + libiec61883 + libgudev + ] ++ optionals (stdenv.isLinux && enableJack) [ 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 || !enableJack) [ + ] ++ optionals (!gtkSupport) [ + "-Dgtk3=disabled" + ] ++ optionals (!stdenv.isLinux || !enableJack) [ "-Djack=disabled" # unclear whether Jack works on Darwin - ] - ++ optionals (!stdenv.isLinux) [ + ] ++ optionals (!stdenv.isLinux) [ "-Dv4l2-gudev=disabled" ]; + + NIX_LDFLAGS = [ + # linking error on Darwin + # https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553694896 + "-lncurses" + ]; + # fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''" doCheck = false; + meta = with stdenv.lib; { + description = "GStreamer Good Plugins"; + homepage = "https://gstreamer.freedesktop.org"; + longDescription = '' + a set of plug-ins that we consider to have good quality code, + correct functionality, our preferred license (LGPL for the plug-in + code, LGPL or LGPL-compatible for the supporting library). + ''; + license = licenses.lgpl2Plus; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ matthewbauer ]; + }; } From 7dff4003ba1a0d3cd35b8eedf3cb959e91de717c Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:04:19 -0500 Subject: [PATCH 08/15] gst_all_1.gst-vaapi: 1.16.0 -> 1.16.1 --- .../libraries/gstreamer/vaapi/default.nix | 79 ++++++++++++------- 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index 95056023ed6..bfa5abc7b53 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -1,49 +1,70 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, gst-plugins-base, bzip2, libva, wayland -, libdrm, udev, xorg, libGLU_combined, gstreamer, gst-plugins-bad, nasm -, libvpx, python, fetchpatch +{ stdenv +, fetchurl +, meson +, ninja +, pkgconfig +, gst-plugins-base +, bzip2 +, libva +, wayland +, libdrm +, udev +, xorg +, libGLU_combined +, gstreamer +, gst-plugins-bad +, nasm +, libvpx +, python }: stdenv.mkDerivation rec { pname = "gstreamer-vaapi"; - version = "1.16.0"; + version = "1.16.1"; src = fetchurl { url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "07qpynamiz0lniqajcaijh3n7ixs4lfk9a5mfk50sng0dricwzsf"; + sha256 = "0fk0nymvbfc04fv63fj2r6q9vvi431svhkrwpr7kdjvq3rphymyb"; }; - patches = [ - # See: https://mail.gnome.org/archives/distributor-list/2019-September/msg00000.html - # Note that the patch has now been actually accepted upstream. - (fetchpatch { - url = "https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/commit/a90daabb84f983d2fa05ff3159f7ad59aa648b55.patch"; - sha256 = "0p2qygq6b5h6nxjdfnlzbsyih43hjq5c94ag8sbyyb8pmnids9rb"; - }) - ]; - outputs = [ "out" "dev" ]; - nativeBuildInputs = [ meson ninja pkgconfig bzip2 ]; - - buildInputs = [ - gstreamer gst-plugins-base gst-plugins-bad libva wayland libdrm udev - xorg.libX11 xorg.libXext xorg.libXv xorg.libXrandr xorg.libSM - xorg.libICE libGLU_combined nasm libvpx python + nativeBuildInputs = [ + meson + ninja + pkgconfig + bzip2 ]; - preConfigure = '' - export GST_PLUGIN_PATH_1_0=$out/lib/gstreamer-1.0 - mkdir -p $GST_PLUGIN_PATH_1_0 - ''; + buildInputs = [ + gstreamer + gst-plugins-base + gst-plugins-bad + libva + wayland + libdrm + udev + xorg.libX11 + xorg.libXext + xorg.libXv + xorg.libXrandr + xorg.libSM + xorg.libICE + libGLU_combined + nasm + libvpx + python + ]; mesonFlags = [ "-Dexamples=disabled" # requires many dependencies and probably not useful for our users ]; - meta = { - homepage = https://gstreamer.freedesktop.org; - license = stdenv.lib.licenses.lgpl21Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ tstrobel ]; + meta = with stdenv.lib; { + description = "Set of VAAPI GStreamer Plug-ins"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ tstrobel ]; + platforms = platforms.linux; }; } From 32680d9aaa39c95c2cb033766e0b5a363d05bb6e Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:04:26 -0500 Subject: [PATCH 09/15] gst_all_1.gst-plugins-bad: 1.16.0 -> 1.16.1 --- .../libraries/gstreamer/bad/default.nix | 194 +++++++++++------- 1 file changed, 117 insertions(+), 77 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 4ed0f15576a..5039d962cc5 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -1,13 +1,36 @@ -{ stdenv, fetchurl, fetchpatch, meson, ninja, gettext +{ stdenv +, fetchurl +, meson +, ninja +, gettext , config -, pkgconfig, python3, gst-plugins-base, orc +, pkgconfig +, python3 +, gst-plugins-base +, orc , gobject-introspection , enableZbar ? true -, 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 +, 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 @@ -27,7 +50,7 @@ , libusb1 , neon , openal -, opencv3 +, opencv4 , openexr , openh264 , pango @@ -38,10 +61,20 @@ , srtp , zbar , wayland-protocols -, wildmidi, fluidsynth, libvdpau, wayland -, libwebp, xvidcore, gnutls, mjpegtools -, libGLU_combined, libintl, libgme -, openssl, x265, libxml2 +, wildmidi +, fluidsynth +, libvdpau +, wayland +, libwebp +, xvidcore +, gnutls +, mjpegtools +, libGLU_combined +, libintl +, libgme +, openssl +, x265 +, libxml2 , srt }: @@ -49,66 +82,54 @@ assert faacSupport -> faac != null; let inherit (stdenv.lib) optional optionals; -in -stdenv.mkDerivation rec { +in stdenv.mkDerivation rec { pname = "gst-plugins-bad"; - version = "1.16.0"; - - meta = with stdenv.lib; { - description = "Gstreamer Bad Plugins"; - homepage = "https://gstreamer.freedesktop.org"; - longDescription = '' - a set of plug-ins that aren't up to par compared to the - rest. They might be close to being good quality, but they're missing - something - be it a good code review, some documentation, a set of tests, - a real live maintainer, or some actual wide use. - ''; - license = licenses.lgpl2Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ matthewbauer ]; - }; - - preConfigure = '' - patchShebangs . - ''; - - 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 { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "019b0yqjrcg6jmfd4cc336h1bz5p4wxl58yz1c4sdb96avirs4r2"; - }; + version = "1.16.1"; outputs = [ "out" "dev" ]; + src = fetchurl { + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "1dddqacxgp77f3nl153x5a6139wdphc9phds2fpqb2cv6faiqj2n"; + }; + + patches = [ + ./fix_pkgconfig_includedir.patch + ]; + nativeBuildInputs = [ - meson ninja pkgconfig python3 gettext gobject-introspection - ] - ++ optionals stdenv.isLinux [ + meson + ninja + pkgconfig + python3 + gettext + gobject-introspection + ] ++ optionals stdenv.isLinux [ wayland-protocols ]; buildInputs = [ - gst-plugins-base orc - faad2 libass libkate libmms - libnice webrtc-audio-processing # webrtc + gst-plugins-base + orc + faad2 + libass + libkate + libmms + libnice + webrtc-audio-processing # webrtc libbs2b - ladspaH librdf # ladspa plug-in - lilv lv2 serd sord sratom # lv2 plug-in - libmodplug mpeg2dec - openjpeg libopus librsvg + ladspaH + librdf # ladspa plug-in + lilv + lv2 + serd + sord + sratom # lv2 plug-in + libmodplug + mpeg2dec + openjpeg + libopus + librsvg bluez chromaprint curl.dev @@ -128,7 +149,7 @@ stdenv.mkDerivation rec { libusb1 neon openal - opencv3 + opencv4 openexr openh264 rtmpdump @@ -137,25 +158,33 @@ stdenv.mkDerivation rec { soundtouch spandsp srtp - fluidsynth libvdpau - libwebp xvidcore gnutls libGLU_combined - libgme openssl x265 libxml2 + fluidsynth + libvdpau + libwebp + xvidcore + gnutls + libGLU_combined + libgme + openssl + x265 + libxml2 libintl srt - ] - ++ optional enableZbar zbar - ++ optional faacSupport faac - ++ optional stdenv.isLinux wayland + ] ++ optionals enableZbar [ + zbar + ] ++ optionals faacSupport [ + faac + ] ++ optionals stdenv.isLinux [ + wayland + ] ++ optionals (!stdenv.isDarwin) [ # wildmidi requires apple's OpenAL # TODO: package apple's OpenAL, fix wildmidi, include on Darwin - ++ optional (!stdenv.isDarwin) wildmidi + wildmidi # TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin - ++ optional (!stdenv.isDarwin) mjpegtools; + 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" @@ -193,8 +222,19 @@ stdenv.mkDerivation rec { "-Dnvenc=disabled" ]; - enableParallelBuilding = true; - doCheck = false; # fails 20 out of 58 tests, expensive + meta = with stdenv.lib; { + description = "GStreamer Bad Plugins"; + homepage = "https://gstreamer.freedesktop.org"; + longDescription = '' + a set of plug-ins that aren't up to par compared to the + rest. They might be close to being good quality, but they're missing + something - be it a good code review, some documentation, a set of tests, + a real live maintainer, or some actual wide use. + ''; + license = licenses.lgpl2Plus; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ matthewbauer ]; + }; } From 56a60bf216af7830620297b301f1b2797bcd7b3f Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:04:33 -0500 Subject: [PATCH 10/15] gst_all_1.gst-plugins-ugly: 1.16.0 -> 1.16.1 --- .../libraries/gstreamer/ugly/default.nix | 93 ++++++++++++------- 1 file changed, 58 insertions(+), 35 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index 8e1821cbd01..a117190a9e1 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -1,53 +1,76 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, python -, gst-plugins-base, orc, gettext -, a52dec, libcdio, libdvdread -, libmad, libmpeg2, x264, libintl, lib +{ stdenv +, fetchurl +, meson +, ninja +, pkgconfig +, python +, gst-plugins-base +, orc +, gettext +, a52dec +, libcdio +, libdvdread +, libmad +, libmpeg2 +, x264 +, libintl +, lib , opencore-amr , darwin }: stdenv.mkDerivation rec { pname = "gst-plugins-ugly"; - version = "1.16.0"; + version = "1.16.1"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "07cajqjs8pqchpf2sm87hljx4ibwvkiavqxmacxsr5airar17yab"; + }; + + nativeBuildInputs = [ + meson + ninja + gettext + pkgconfig + python + ]; + + buildInputs = [ + gst-plugins-base + orc + a52dec + libcdio + libdvdread + libmad + libmpeg2 + x264 + libintl + opencore-amr + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + IOKit + CoreFoundation + DiskArbitration + ]); + + mesonFlags = [ + "-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 + ]; meta = with lib; { description = "Gstreamer Ugly Plugins"; - homepage = "https://gstreamer.freedesktop.org"; + homepage = "https://gstreamer.freedesktop.org"; longDescription = '' a set of plug-ins that have good quality and correct functionality, but distributing them might pose problems. The license on either the plug-ins or the supporting libraries might not be how we'd like. The code might be widely known to present patent problems. ''; - license = licenses.lgpl2Plus; - platforms = platforms.unix; + license = licenses.lgpl2Plus; + platforms = platforms.unix; maintainers = with maintainers; [ matthewbauer ]; }; - - src = fetchurl { - url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "1hm46c1fy9vl1wfwipsj41zp79cm7in1fpmjw24j5hriy32n82g3"; - }; - - outputs = [ "out" "dev" ]; - - nativeBuildInputs = [ meson ninja gettext pkgconfig python ]; - - buildInputs = [ - gst-plugins-base orc - 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" ]; } From 5b1920fd0672a4d30fb3914eccc1257c2bf0bb90 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 2 Oct 2019 12:04:39 -0500 Subject: [PATCH 11/15] gst_all_1.gst-validate: 1.16.0 -> 1.16.1 --- .../libraries/gstreamer/validate/default.nix | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/validate/default.nix b/pkgs/development/libraries/gstreamer/validate/default.nix index 74c58cd4c80..ad424641b81 100644 --- a/pkgs/development/libraries/gstreamer/validate/default.nix +++ b/pkgs/development/libraries/gstreamer/validate/default.nix @@ -1,39 +1,43 @@ -{ stdenv, fetchurl, pkgconfig, gstreamer, gst-plugins-base -, python, gobject-introspection, json-glib +{ stdenv +, fetchurl +, pkgconfig +, gstreamer +, gst-plugins-base +, python +, gobject-introspection +, json-glib }: stdenv.mkDerivation rec { pname = "gst-validate"; - version = "1.16.0"; - - meta = { - description = "Integration testing infrastructure for the GStreamer framework"; - homepage = https://gstreamer.freedesktop.org; - license = stdenv.lib.licenses.lgpl2Plus; - platforms = stdenv.lib.platforms.unix; - }; + version = "1.16.1"; src = fetchurl { url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "1jfnd0g9hmdbqfxsx96yc9vpf1w6m33hqwrr6lj4i83kl54awcck"; + sha256 = "1698arvmpb0cvyi8ll1brvs51vs7i3f3fw19iswh8xhj5adrn1vz"; }; outputs = [ "out" "dev" ]; nativeBuildInputs = [ - pkgconfig gobject-introspection + pkgconfig + gobject-introspection ]; buildInputs = [ - python json-glib + python + json-glib ]; - propagatedBuildInputs = [ gstreamer gst-plugins-base ]; - - enableParallelBuilding = true; - - mesonFlags = [ - # Enables all features, so that we know when new dependencies are necessary. - "-Dauto_features=enabled" + propagatedBuildInputs = [ + gstreamer + gst-plugins-base ]; + + meta = with stdenv.lib; { + description = "Integration testing infrastructure for the GStreamer framework"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + }; } From c14398f8717abad1a04deca8f0b36b12ea1dae22 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 13 Nov 2019 21:52:55 +0100 Subject: [PATCH 12/15] libnice: clean up * format withn nixpkgs-fmt * drop unnecessary flags * do not propagate gupnp-igd (it is only in Requires.private) --- .../development/libraries/libnice/default.nix | 53 ++++++++++++++----- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/libnice/default.nix b/pkgs/development/libraries/libnice/default.nix index f4ce1f6eea0..90bdb06bb7f 100644 --- a/pkgs/development/libraries/libnice/default.nix +++ b/pkgs/development/libraries/libnice/default.nix @@ -1,4 +1,19 @@ -{ 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 +, 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"; @@ -21,27 +36,40 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ - meson ninja pkgconfig python3 gobject-introspection + meson + ninja + pkgconfig + python3 + gobject-introspection + + # documentation gtk-doc - # Without these, enabling the 'gtk_doc' gives us `FAILED: meson-install` - docbook_xsl docbook_xml_dtd_412 + docbook_xsl + docbook_xml_dtd_412 + ]; + + buildInputs = [ + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gnutls + gupnp-igd + ]; + + propagatedBuildInputs = [ + glib ]; - 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; + # Tests are flaky + # see https://github.com/NixOS/nixpkgs/pull/53293#issuecomment-453739295 + doCheck = false; meta = with stdenv.lib; { - homepage = https://nice.freedesktop.org/wiki/; - description = "The GLib ICE implementation"; + description = "GLib ICE implementation"; longDescription = '' Libnice is an implementation of the IETF's Interactice Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal @@ -49,6 +77,7 @@ stdenv.mkDerivation rec { It provides a GLib-based library, libnice and a Glib-free library, libstun as well as GStreamer elements.''; + homepage = "https://nice.freedesktop.org/wiki/"; platforms = platforms.linux; license = with licenses; [ lgpl21 mpl11 ]; }; From ffc9bdea32339de7aef905e17cfe9c1bb643462e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 13 Nov 2019 23:28:12 +0100 Subject: [PATCH 13/15] libpsl: fix darwin build tests are failing there FAIL: test-is-public ==================== valgrind: mmap-FIXED(0x7fff5f400000, 8388608) failed in UME (load_unixthread1) with error 22 (Invalid argument). FAIL test-is-public (exit status: 1) FAIL: test-is-public-all ======================== valgrind: mmap-FIXED(0x7fff5f400000, 8388608) failed in UME (load_unixthread1) with error 22 (Invalid argument). FAIL test-is-public-all (exit status: 1) FAIL: test-is-cookie-domain-acceptable ====================================== valgrind: mmap-FIXED(0x7fff5f400000, 8388608) failed in UME (load_unixthread1) with error 22 (Invalid argument). FAIL test-is-cookie-domain-acceptable (exit status: 1) FAIL: test-is-public-builtin ============================ valgrind: mmap-FIXED(0x7fff5f400000, 8388608) failed in UME (load_unixthread1) with error 22 (Invalid argument). FAIL test-is-public-builtin (exit status: 1) FAIL: test-registrable-domain ============================= valgrind: mmap-FIXED(0x7fff5f400000, 8388608) failed in UME (load_unixthread1) with error 22 (Invalid argument). FAIL test-registrable-domain (exit status: 1) --- pkgs/development/libraries/libpsl/default.nix | 42 +++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libpsl/default.nix b/pkgs/development/libraries/libpsl/default.nix index 15aa7c9e22d..d2012760dcf 100644 --- a/pkgs/development/libraries/libpsl/default.nix +++ b/pkgs/development/libraries/libpsl/default.nix @@ -1,5 +1,16 @@ -{ stdenv, fetchurl, autoreconfHook, docbook_xsl, docbook_xml_dtd_43, gtk-doc, lzip -, libidn2, libunistring, libxslt, pkgconfig, python3, valgrind +{ stdenv +, fetchurl +, autoreconfHook +, docbook_xsl +, docbook_xml_dtd_43 +, gtk-doc +, lzip +, libidn2 +, libunistring +, libxslt +, pkgconfig +, python3 +, valgrind , publicsuffix-list }: @@ -12,9 +23,26 @@ stdenv.mkDerivation rec { sha256 = "183hadbira0d2zvv8272lspy31dgm9x26z35c61s5axcd5wd9g9i"; }; - nativeBuildInputs = [ autoreconfHook docbook_xsl docbook_xml_dtd_43 gtk-doc lzip pkgconfig python3 valgrind ]; - buildInputs = [ libidn2 libunistring libxslt ]; - propagatedBuildInputs = [ publicsuffix-list ]; + nativeBuildInputs = [ + autoreconfHook + docbook_xsl + docbook_xml_dtd_43 + gtk-doc + lzip + pkgconfig + python3 + valgrind + ]; + + buildInputs = [ + libidn2 + libunistring + libxslt + ]; + + propagatedBuildInputs = [ + publicsuffix-list + ]; postPatch = '' patchShebangs src/psl-make-dafsa @@ -25,7 +53,7 @@ stdenv.mkDerivation rec { ''; configureFlags = [ -# "--enable-gtk-doc" + # "--enable-gtk-doc" "--enable-man" "--enable-valgrind-tests" "--with-psl-distfile=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat" @@ -35,7 +63,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - doCheck = true; + doCheck = !stdenv.isDarwin; meta = with stdenv.lib; { description = "C library for the Publix Suffix List"; From 2c800ed685c7cd23f2415a776fef6e91a440537a 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 14/15] gst_all_1: 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 | 84 +++++++++++++++---- .../libraries/gstreamer/base/default.nix | 42 +++++++++- .../libraries/gstreamer/good/default.nix | 9 +- 3 files changed, 113 insertions(+), 22 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 5039d962cc5..de8556ccc96 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -34,6 +34,7 @@ , bluez , chromaprint , curl +, darwin , directfb , fdk_aac , flite @@ -115,38 +116,24 @@ in stdenv.mkDerivation rec { libass libkate libmms - libnice webrtc-audio-processing # webrtc libbs2b - ladspaH - librdf # ladspa plug-in - lilv - lv2 - serd - sord - sratom # lv2 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 opencv4 @@ -154,9 +141,7 @@ in stdenv.mkDerivation rec { openh264 rtmpdump pango - sbc soundtouch - spandsp srtp fluidsynth libvdpau @@ -175,6 +160,7 @@ in stdenv.mkDerivation rec { ] ++ optionals faacSupport [ faac ] ++ optionals stdenv.isLinux [ + bluez wayland ] ++ optionals (!stdenv.isDarwin) [ # wildmidi requires apple's OpenAL @@ -182,7 +168,40 @@ in stdenv.mkDerivation rec { wildmidi # TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin mjpegtools - ]; + + chromaprint + directfb + flite + libdrm + libgudev + libnice + libofa + librdf + sbc + spandsp + + # ladspa plug-in + ladspaH + librdf # TODO: make build on Darwin + + # lv2 plug-in + lilv + lv2 + serd + sord + sratom + ] ++ 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 + ]); mesonFlags = [ "-Dexamples=disabled" # requires many dependencies and probably not useful for our users @@ -220,8 +239,37 @@ in 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 + ] ++ optionals (!gst-plugins-base.glEnabled) [ + "-Dgl=disabled"] + ++ optionals (!gst-plugins-base.waylandEnabled) [ + "-Dwayland=disabled" + ] ++ optionals (!gst-plugins-base.glEnabled) [ + # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`, + # but its meson build system does not declare the dependency. + "-Dapplemedia=disabled" ]; + # This package has some `_("string literal")` string formats + # that trip up clang with format security enabled. + hardeningDisable = [ "format" ]; + doCheck = false; # fails 20 out of 58 tests, expensive meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index d7d4439d30c..d38199cf787 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -15,6 +15,7 @@ , libopus , isocodes , libjpeg +, libpng , libvisual , tremor # provides 'virbisidec' , libGL @@ -27,8 +28,12 @@ , wayland , enableAlsa ? stdenv.isLinux , alsaLib +# 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 }: @@ -68,11 +73,16 @@ stdenv.mkDerivation rec { libintl libopus isocodes + libpng libjpeg tremor libGL - ] ++ lib.optional (!stdenv.isDarwin) libvisual - ++ lib.optional enableAlsa alsaLib + ] ++ lib.optional (!stdenv.isDarwin) [ + libvisual + ] ++ lib.optionals stdenv.isDarwin [ + pango + darwin.apple_sdk.frameworks.OpenGL + ] ++ lib.optional enableAlsa alsaLib ++ lib.optionals enableX11 [ libXv pango ] ++ lib.optional enableWayland wayland ++ lib.optional enableCocoa darwin.apple_sdk.frameworks.Cocoa @@ -85,6 +95,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-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, @@ -98,15 +109,40 @@ 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.optional (!enableCdparanoia) "-Dcdparanoia=disabled" + ++ lib.optionals stdenv.isDarwin [ + "-Dlibvisual=disabled" + ]; postPatch = '' patchShebangs common/scangobj-merge.py ''; + # This package has some `_("string literal")` string formats + # that trip up clang with format security enabled. + hardeningDisable = [ "format" ]; + doCheck = false; # fails, wants DRI access for OpenGL + 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; + }; + meta = with lib; { description = "Base GStreamer plug-ins and helper libraries"; homepage = "https://gstreamer.freedesktop.org"; diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index ff853584d46..1c7107e50fa 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -116,7 +116,14 @@ stdenv.mkDerivation rec { ] ++ optionals (!stdenv.isLinux || !enableJack) [ "-Djack=disabled" # unclear whether Jack works on Darwin ] ++ optionals (!stdenv.isLinux) [ - "-Dv4l2-gudev=disabled" + "-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 ]; From 071d25afc796803a6ac98439a960541cd64d2fa8 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 14 Nov 2019 12:04:24 +0100 Subject: [PATCH 15/15] meson: fix darwin framework lookup Fixes building gst_all_1.gst-plugins-good. Patch backported from 0.52.0. --- .../tools/build-managers/meson/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index fad5bc9e630..9722c26ad64 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -1,4 +1,11 @@ -{ lib, python3Packages, stdenv, writeTextDir, substituteAll, targetPackages }: +{ lib +, python3Packages +, fetchpatch +, stdenv +, writeTextDir +, substituteAll +, targetPackages +}: let # See https://mesonbuild.com/Reference-tables.html#cpu-families @@ -62,6 +69,15 @@ python3Packages.buildPythonApplication rec { # https://github.com/mesonbuild/meson/issues/4784 # Should be fixed in 0.52 ./fix-objc-linking.patch + + # Fixes error finding some frameworks + # https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553704175 + # https://github.com/mesonbuild/meson/pull/5980 + # Should be fixed in 0.52 + (fetchpatch { + url = "https://github.com/mesonbuild/meson/pull/5980.patch"; + sha256 = "0g95gl662mribnnz5jcyn1jaaw8w7r1vgbg2jbm91dcrr5zji5ng"; + }) ]; setupHook = ./setup-hook.sh;