2019-10-02 18:03:44 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, lib
|
|
|
|
, pkgconfig
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, gettext
|
|
|
|
, gobject-introspection
|
|
|
|
, python3
|
|
|
|
, gstreamer
|
|
|
|
, orc
|
|
|
|
, pango
|
|
|
|
, libtheora
|
|
|
|
, libintl
|
|
|
|
, libopus
|
2019-01-21 01:48:04 +00:00
|
|
|
, isocodes
|
|
|
|
, libjpeg
|
|
|
|
, libvisual
|
|
|
|
, tremor # provides 'virbisidec'
|
2019-08-18 20:18:40 +01:00
|
|
|
, libGL
|
2019-10-02 18:03:44 +01:00
|
|
|
, 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
|
|
|
|
}:
|
2013-12-23 15:36:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gst-plugins-base";
|
2019-10-02 18:03:44 +01:00
|
|
|
version = "1.16.1";
|
2013-12-23 15:36:37 +00:00
|
|
|
|
2019-10-02 18:03:44 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2013-12-23 15:36:37 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-10-02 17:59:16 +01:00
|
|
|
url = "${meta.homepage}/src/${pname}/${pname}-${version}.tar.xz";
|
2019-10-02 18:03:44 +01:00
|
|
|
sha256 = "0aybbwnzm15074smdk2bamj3ssck3hjvmilvgh49f19xjf4w8g2w";
|
2013-12-23 15:36:37 +00:00
|
|
|
};
|
|
|
|
|
2019-10-02 18:03:44 +01:00
|
|
|
patches = [
|
|
|
|
./fix_pkgconfig_includedir.patch
|
|
|
|
];
|
2016-04-24 13:39:30 +01:00
|
|
|
|
2019-01-21 01:48:04 +00:00
|
|
|
nativeBuildInputs = [
|
2019-10-02 18:03:44 +01:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkgconfig
|
|
|
|
python3
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
|
|
|
|
# docs
|
2019-01-21 01:48:04 +00:00
|
|
|
gtk-doc
|
2019-10-02 18:03:44 +01:00
|
|
|
docbook_xsl
|
|
|
|
docbook_xml_dtd_43
|
|
|
|
];
|
2013-12-23 15:36:37 +00:00
|
|
|
|
2019-10-02 18:03:44 +01:00
|
|
|
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;
|
2019-01-21 01:48:04 +00:00
|
|
|
|
2019-10-02 18:03:44 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
gstreamer
|
|
|
|
];
|
2018-04-23 18:32:37 +01:00
|
|
|
|
2019-10-02 18:03:44 +01:00
|
|
|
mesonFlags = [
|
2019-01-21 01:48:04 +00:00
|
|
|
"-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")}]"
|
2019-05-01 15:10:36 +01:00
|
|
|
# We must currently disable gtk_doc API docs generation,
|
|
|
|
# because it is not compatible with some features being disabled.
|
|
|
|
# See for example
|
2019-10-02 18:03:44 +01:00
|
|
|
# https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/564
|
2019-05-01 15:10:36 +01:00
|
|
|
# for it failing because some Wayland symbols are missing.
|
|
|
|
# This problem appeared between 1.15.1 and 1.16.0.
|
2019-10-02 18:03:44 +01:00
|
|
|
# In 1.18 they should switch to hotdoc, which should make this issue irrelevant.
|
2019-05-01 15:10:36 +01:00
|
|
|
"-Dgtk_doc=disabled"
|
2019-01-21 01:48:04 +00:00
|
|
|
]
|
|
|
|
++ lib.optional (!enableX11) "-Dx11=disabled"
|
|
|
|
# TODO How to disable Wayland?
|
|
|
|
++ lib.optional (!enableAlsa) "-Dalsa=disabled"
|
2019-10-02 18:03:44 +01:00
|
|
|
++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled";
|
2014-08-12 21:17:38 +01:00
|
|
|
|
2018-04-23 18:32:37 +01:00
|
|
|
postPatch = ''
|
2019-10-02 18:03:44 +01:00
|
|
|
patchShebangs common/scangobj-merge.py
|
2018-03-31 14:16:56 +01:00
|
|
|
'';
|
2015-04-09 02:47:56 +01:00
|
|
|
|
2018-08-08 19:33:51 +01:00
|
|
|
doCheck = false; # fails, wants DRI access for OpenGL
|
|
|
|
|
2019-10-02 18:03:44 +01:00
|
|
|
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 ];
|
|
|
|
};
|
2013-12-23 15:36:37 +00:00
|
|
|
}
|