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

82 lines
2.5 KiB
Nix
Raw Normal View History

2013-12-23 16:36:37 +01:00
{ stdenv, fetchurl, pkgconfig, python, gst-plugins-base, orc
, faacSupport ? false, faac ? null
, gtkSupport ? false, gtk3 ? null
, faad2, libass, libkate, libmms
, libmodplug, mpeg2dec, mpg123
2013-12-23 16:36:37 +01:00
, openjpeg, libopus, librsvg
, wildmidi, fluidsynth, libvdpau, wayland
, libwebp, xvidcore, gnutls, mjpegtools
, libGLU_combined, libintlOrEmpty, libgme
, openssl, x265, libxml2
2013-12-23 16:36:37 +01:00
}:
assert faacSupport -> faac != null;
assert gtkSupport -> gtk3 != null;
2015-04-09 03:54:51 +02:00
let
inherit (stdenv.lib) optional optionalString;
# OpenJPEG version is hardcoded in package source
openJpegVersion = with stdenv;
lib.concatStringsSep "." (lib.lists.take 2
(lib.splitString "." (lib.getVersion openjpeg)));
2015-04-09 03:54:51 +02:00
in
2013-12-23 16:36:37 +01:00
stdenv.mkDerivation rec {
2018-03-30 21:10:30 +02:00
name = "gst-plugins-bad-1.14.0";
2013-12-23 16:36:37 +01:00
meta = with stdenv.lib; {
description = "Gstreamer Bad Plugins";
2017-09-16 21:28:31 +02: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;
2013-12-23 16:36:37 +01:00
};
# TODO: Fix Cocoa build. The problem was ARC, which might be related to too
# old version of Apple SDK's.
configureFlags = optional stdenv.isDarwin "--disable-cocoa";
patchPhase = ''
2017-12-07 14:03:36 +01:00
sed -i 's/openjpeg-2.2/openjpeg-${openJpegVersion}/' ext/openjpeg/*
'';
2013-12-23 16:36:37 +01:00
src = fetchurl {
url = "${meta.homepage}/src/gst-plugins-bad/${name}.tar.xz";
2018-03-30 21:10:30 +02:00
sha256 = "17sgzgx1c54k5rzz7ljyz3is0n7yj56k74vv05h8z1gjnsnjnppd";
2013-12-23 16:36:37 +01:00
};
outputs = [ "out" "dev" ];
2016-04-24 14:39:30 +02:00
2013-12-23 16:36:37 +01:00
nativeBuildInputs = [ pkgconfig python ];
buildInputs = [
gst-plugins-base orc
faad2 gtk3 libass libkate libmms
libmodplug mpeg2dec mpg123
2013-12-23 16:36:37 +01:00
openjpeg libopus librsvg
2015-04-09 03:54:51 +02:00
fluidsynth libvdpau
libwebp xvidcore gnutls libGLU_combined
libgme openssl x265 libxml2
2015-04-09 03:54:51 +02:00
]
++ libintlOrEmpty
++ optional faacSupport faac
# for gtksink
++ optional gtkSupport gtk3
2015-04-09 03:54:51 +02:00
++ 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 03:54:51 +02:00
LDFLAGS = optionalString stdenv.isDarwin "-lintl";
enableParallelBuilding = true;
2013-12-23 16:36:37 +01:00
}