2018-04-23 10:32:37 -07:00
|
|
|
{ stdenv, fetchurl, fetchpatch, lib
|
2018-12-02 03:41:15 -08:00
|
|
|
, pkgconfig, meson, ninja, gettext, gobject-introspection
|
2018-09-03 13:43:55 -07:00
|
|
|
, python3, gstreamer, orc, pango, libtheora
|
2018-05-01 11:29:23 -07:00
|
|
|
, libintl, libopus
|
2019-01-20 17:48:04 -08:00
|
|
|
, isocodes
|
|
|
|
, libjpeg
|
|
|
|
, libvisual
|
|
|
|
, tremor # provides 'virbisidec'
|
|
|
|
, gtk-doc, docbook_xsl, docbook_xml_dtd_412
|
2018-04-23 10:32:37 -07:00
|
|
|
, enableX11 ? stdenv.isLinux, libXv
|
|
|
|
, enableWayland ? stdenv.isLinux, wayland
|
|
|
|
, enableAlsa ? stdenv.isLinux, alsaLib
|
|
|
|
, enableCocoa ? false, darwin
|
|
|
|
, enableCdparanoia ? (!stdenv.isDarwin), cdparanoia }:
|
2013-12-23 07:36:37 -08:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-08-30 04:29:12 -07:00
|
|
|
name = "gst-plugins-base-${version}";
|
2019-01-20 17:48:04 -08:00
|
|
|
version = "1.15.1";
|
2013-12-23 07:36:37 -08:00
|
|
|
|
2018-04-23 10:32:37 -07:00
|
|
|
meta = with lib; {
|
2013-12-23 07:36:37 -08:00
|
|
|
description = "Base plugins and helper libraries";
|
2017-09-16 12:28:31 -07:00
|
|
|
homepage = https://gstreamer.freedesktop.org;
|
2018-04-23 10:32:37 -07:00
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
2013-12-23 07:36:37 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}/src/gst-plugins-base/${name}.tar.xz";
|
2019-01-20 17:48:04 -08:00
|
|
|
sha256 = "0qvyx9gs7z2ryhdxxzynn9r1gphfk4xfkhd6dma02sbda9c5jckf";
|
2013-12-23 07:36:37 -08:00
|
|
|
};
|
|
|
|
|
2016-08-28 17:30:01 -07:00
|
|
|
outputs = [ "out" "dev" ];
|
2016-04-24 05:39:30 -07:00
|
|
|
|
2019-01-20 17:48:04 -08:00
|
|
|
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
|
|
|
|
]
|
2018-04-23 10:32:37 -07:00
|
|
|
# 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 ];
|
2013-12-23 07:36:37 -08:00
|
|
|
|
2019-01-20 17:48:04 -08:00
|
|
|
# On Darwin, we currently use autoconf, on all other systems Meson
|
|
|
|
# TODO Switch to Meson on Darwin as well
|
|
|
|
|
2018-04-23 10:32:37 -07:00
|
|
|
# TODO How to pass these to Meson?
|
2019-01-20 17:48:04 -08:00
|
|
|
configureFlags = lib.optionals stdenv.isDarwin [
|
2018-04-23 10:32:37 -07:00
|
|
|
"--enable-x11=${if enableX11 then "yes" else "no"}"
|
|
|
|
"--enable-wayland=${if enableWayland then "yes" else "no"}"
|
|
|
|
"--enable-cocoa=${if enableCocoa then "yes" else "no"}"
|
2015-04-08 18:47:56 -07:00
|
|
|
]
|
2018-04-23 10:32:37 -07:00
|
|
|
# Introspection fails on my MacBook currently
|
|
|
|
++ lib.optional stdenv.isDarwin "--disable-introspection";
|
|
|
|
|
2019-01-20 17:48:04 -08:00
|
|
|
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 ]
|
2018-04-23 10:32:37 -07:00
|
|
|
++ 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;
|
2013-12-23 07:36:37 -08:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ gstreamer ];
|
2014-08-12 13:17:38 -07:00
|
|
|
|
2018-04-23 10:32:37 -07:00
|
|
|
postPatch = ''
|
2018-03-31 06:16:56 -07:00
|
|
|
patchShebangs .
|
|
|
|
'';
|
2015-04-08 18:47:56 -07:00
|
|
|
|
2014-08-12 13:17:38 -07:00
|
|
|
enableParallelBuilding = true;
|
2015-04-08 18:47:56 -07:00
|
|
|
|
2018-08-08 11:33:51 -07:00
|
|
|
doCheck = false; # fails, wants DRI access for OpenGL
|
|
|
|
|
2018-03-31 06:16:56 -07:00
|
|
|
patches = [
|
|
|
|
./fix_pkgconfig_includedir.patch
|
|
|
|
];
|
2013-12-23 07:36:37 -08:00
|
|
|
}
|