nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix

187 lines
5.7 KiB
Nix
Raw Normal View History

{ 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
2013-12-23 15:36:37 +00:00
, 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
2018-03-14 19:15:06 +00:00
, libGLU_combined, libintl, libgme
, openssl, x265, libxml2
, srt
2013-12-23 15:36:37 +00:00
}:
assert faacSupport -> faac != null;
2015-04-09 01:54:51 +00:00
let
inherit (stdenv.lib) optional optionals;
2015-04-09 01:54:51 +00:00
in
2013-12-23 15:36:37 +00:00
stdenv.mkDerivation rec {
name = "gst-plugins-bad-${version}";
version = "1.16.0";
2013-12-23 15:36:37 +00:00
meta = with stdenv.lib; {
description = "Gstreamer Bad Plugins";
2017-09-16 19:28:31 +00:00
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;
2018-04-24 23:35:54 +00:00
maintainers = with maintainers; [ matthewbauer ];
2013-12-23 15:36:37 +00:00
};
preConfigure = ''
patchShebangs .
'';
patches = [
./fix_pkgconfig_includedir.patch
];
2013-12-23 15:36:37 +00:00
src = fetchurl {
url = "${meta.homepage}/src/gst-plugins-bad/${name}.tar.xz";
sha256 = "019b0yqjrcg6jmfd4cc336h1bz5p4wxl58yz1c4sdb96avirs4r2";
2013-12-23 15:36:37 +00:00
};
outputs = [ "out" "dev" ];
2016-04-24 12:39:30 +00:00
nativeBuildInputs = [
meson ninja pkgconfig python3 gettext gobject-introspection
]
++ optionals stdenv.isLinux [
wayland-protocols
];
2013-12-23 15:36:37 +00:00
buildInputs = [
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
2013-12-23 15:36:37 +00:00
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
2015-04-09 01:54:51 +00:00
fluidsynth libvdpau
libwebp xvidcore gnutls libGLU_combined
libgme openssl x265 libxml2
2018-03-14 19:15:06 +00:00
libintl
srt
2015-04-09 01:54:51 +00:00
]
++ optional faacSupport faac
++ 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;
2015-04-09 01:54:51 +00:00
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
2013-12-23 15:36:37 +00:00
}