Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gstreamer-1.16.0 #54398

Merged
merged 4 commits into from
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 118 additions & 12 deletions pkgs/development/libraries/gstreamer/bad/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,42 @@
{ 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
, gsm
, libaom
, libdc1394
, libde265
, libdrm
, libdvdnav
, libdvdread
, libgudev
, libofa
, libsndfile
, libusb1
, neon
, openal
, opencv3
, openexr
, openh264
, pango
, rtmpdump
, sbc
, soundtouch
, spandsp
, srtp
, zbar
, wayland-protocols
, wildmidi, fluidsynth, libvdpau, wayland
, libwebp, xvidcore, gnutls, mjpegtools
, libGLU_combined, libintl, libgme
Expand All @@ -15,11 +47,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.16.0";

meta = with stdenv.lib; {
description = "Gstreamer Bad Plugins";
Expand All @@ -40,27 +72,32 @@ 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://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370409";
sha256 = "0hy0rcn35alq65yqwri4fqjz2hf3nyyg5c7rnndk51msmqjxpprk";
url = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/99790eaad9083cce5ab2b1646489e1a1c0faad1e.patch";
sha256 = "11bqy4sl05qq5mj4bx5s09rq106s3j0vnpjl4np058im32j69lr3";
})
./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";
# 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/gst-plugins-bad/${name}.tar.xz";
sha256 = "1r8dma3x127rbx42yab7kwq7q1bhkmvz2ykn0rnqnzl95q74w2wi";
sha256 = "019b0yqjrcg6jmfd4cc336h1bz5p4wxl58yz1c4sdb96avirs4r2";
};

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
Expand All @@ -71,6 +108,35 @@ stdenv.mkDerivation rec {
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
neon
openal
opencv3
openexr
openh264
rtmpdump
pango
sbc
soundtouch
spandsp
srtp
zbar
fluidsynth libvdpau
libwebp xvidcore gnutls libGLU_combined
libgme openssl x265 libxml2
Expand All @@ -85,6 +151,46 @@ 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"}"
"-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
"-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
Expand Down
50 changes: 39 additions & 11 deletions pkgs/development/libraries/gstreamer/base/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -10,7 +15,7 @@

stdenv.mkDerivation rec {
name = "gst-plugins-base-${version}";
version = "1.14.4";
version = "1.16.0";

meta = with lib; {
description = "Base plugins and helper libraries";
Expand All @@ -22,28 +27,55 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "${meta.homepage}/src/gst-plugins-base/${name}.tar.xz";
sha256 = "0qbllw4kphchwhy4p7ivdysigx69i97gyw6q0rvkx1j81r4kjqfa";
sha256 = "1bmmdwbyy89ayb85xc48y217f6wdmpz96f30zm6v53z2a5xsm4s0";
};

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"}"
nh2 marked this conversation as resolved.
Show resolved Hide resolved
"--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")}]"
# 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?
++ 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
Expand All @@ -61,10 +93,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
];
}
40 changes: 30 additions & 10 deletions pkgs/development/libraries/gstreamer/core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.16.0";

meta = with lib ;{
description = "Open source multimedia framework";
Expand All @@ -19,14 +23,10 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "${meta.homepage}/src/gstreamer/${name}.tar.xz";
sha256 = "1izzhnlsy83rgr4zl3jcl1sryxqbbigrrqw3j4x3nnphqnb6ckzr";
sha256 = "003wy1p1in85p9sr5jsyhbnwqaiwz069flwkhyx7qhxy31qjz3hf";
};

patches = [
(fetchpatch {
url = "https://bug794856.bugzilla-attachments.gnome.org/attachment.cgi?id=370411";
sha256 = "16plzzmkk906k4892zq68j3c9z8vdma5nxzlviq20jfv04ykhmk2";
})
./fix_pkgconfig_includedir.patch
];

Expand All @@ -35,23 +35,43 @@ 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"
"-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
];

postInstall = ''
for prog in "$dev/bin/"*; do
# We can't use --suffix here due to quoting so we craft the export command by hand
wrapProgram "$prog" --run "export GST_PLUGIN_SYSTEM_PATH=\$GST_PLUGIN_SYSTEM_PATH"$\{GST_PLUGIN_SYSTEM_PATH:+:\}"\$(unset _tmp; for profile in \$NIX_PROFILES; do _tmp="\$profile/lib/gstreamer-1.0''$\{_tmp:+:\}\$_tmp"; done; printf "\$_tmp")"
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"
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/gstreamer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; };

Expand Down
8 changes: 2 additions & 6 deletions pkgs/development/libraries/gstreamer/ges/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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" ];
Expand All @@ -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
];

Expand Down
Loading