2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2019-10-02 18:04:13 +01:00
|
|
|
, fetchurl
|
|
|
|
, meson
|
2020-10-01 23:31:58 +01:00
|
|
|
, nasm
|
2019-10-02 18:04:13 +01:00
|
|
|
, ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-12-14 21:18:51 +00:00
|
|
|
, python3
|
2019-10-02 18:04:13 +01:00
|
|
|
, gst-plugins-base
|
|
|
|
, orc
|
|
|
|
, bzip2
|
|
|
|
, gettext
|
|
|
|
, libv4l
|
|
|
|
, libdv
|
|
|
|
, libavc1394
|
|
|
|
, libiec61883
|
|
|
|
, libvpx
|
|
|
|
, speex
|
|
|
|
, flac
|
|
|
|
, taglib
|
|
|
|
, libshout
|
|
|
|
, cairo
|
|
|
|
, gdk-pixbuf
|
|
|
|
, aalib
|
|
|
|
, libcaca
|
|
|
|
, libsoup
|
|
|
|
, libpulseaudio
|
|
|
|
, libintl
|
|
|
|
, darwin
|
|
|
|
, lame
|
|
|
|
, mpg123
|
|
|
|
, twolame
|
2018-04-04 16:43:36 +01:00
|
|
|
, gtkSupport ? false, gtk3 ? null
|
2020-11-30 20:31:13 +00:00
|
|
|
, raspiCameraSupport ? false, libraspberrypi ? null
|
2020-04-11 18:26:26 +01:00
|
|
|
, enableJack ? true, libjack2
|
2019-01-22 11:57:56 +00:00
|
|
|
, libXdamage
|
|
|
|
, libXext
|
|
|
|
, libXfixes
|
2018-04-25 00:35:54 +01:00
|
|
|
, ncurses
|
2020-10-01 23:31:58 +01:00
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
2019-01-21 01:48:04 +00:00
|
|
|
, xorg
|
|
|
|
, libgudev
|
|
|
|
, wavpack
|
2013-12-23 15:36:37 +00:00
|
|
|
}:
|
|
|
|
|
2018-04-04 16:43:36 +01:00
|
|
|
assert gtkSupport -> gtk3 != null;
|
2020-11-30 20:31:13 +00:00
|
|
|
assert raspiCameraSupport -> ((libraspberrypi != null) && stdenv.isLinux && stdenv.isAarch64);
|
2018-04-04 16:43:36 +01:00
|
|
|
|
2015-04-09 02:53:06 +01:00
|
|
|
let
|
2021-01-21 17:00:13 +00:00
|
|
|
inherit (lib) optionals;
|
2015-04-09 02:53:06 +01:00
|
|
|
in
|
2013-12-23 15:36:37 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gst-plugins-good";
|
2020-12-07 01:15:03 +00:00
|
|
|
version = "1.18.2";
|
2013-12-23 15:36:37 +00:00
|
|
|
|
2019-10-02 18:04:13 +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";
|
2020-12-07 01:15:03 +00:00
|
|
|
sha256 = "1929nhjsvbl4bw37nfagnfsnxz737cm2x3ayz9ayrn9lwkfm45zp";
|
2013-12-23 15:36:37 +00:00
|
|
|
};
|
|
|
|
|
2019-10-02 18:04:13 +01:00
|
|
|
nativeBuildInputs = [
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-12-14 21:18:51 +00:00
|
|
|
python3
|
2019-10-02 18:04:13 +01:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
gettext
|
2020-10-01 23:31:58 +01:00
|
|
|
nasm
|
|
|
|
] ++ optionals stdenv.isLinux [
|
|
|
|
wayland-protocols
|
2019-10-02 18:04:13 +01:00
|
|
|
];
|
2018-04-25 00:35:54 +01:00
|
|
|
|
2013-12-23 15:36:37 +00:00
|
|
|
buildInputs = [
|
2019-10-02 18:04:13 +01:00
|
|
|
gst-plugins-base
|
|
|
|
orc
|
|
|
|
bzip2
|
|
|
|
libdv
|
|
|
|
libvpx
|
|
|
|
speex
|
|
|
|
flac
|
|
|
|
taglib
|
|
|
|
cairo
|
|
|
|
gdk-pixbuf
|
|
|
|
aalib
|
|
|
|
libcaca
|
|
|
|
libsoup
|
|
|
|
libshout
|
|
|
|
lame
|
|
|
|
mpg123
|
|
|
|
twolame
|
|
|
|
libintl
|
2019-05-01 15:10:36 +01:00
|
|
|
libXdamage
|
|
|
|
libXext
|
|
|
|
libXfixes
|
2018-04-25 00:35:54 +01:00
|
|
|
ncurses
|
2019-05-01 15:10:36 +01:00
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXdamage
|
2019-01-21 01:48:04 +00:00
|
|
|
wavpack
|
2020-11-30 20:31:13 +00:00
|
|
|
] ++ optionals raspiCameraSupport [
|
|
|
|
libraspberrypi
|
2019-11-27 17:51:03 +00:00
|
|
|
] ++ optionals gtkSupport [
|
2019-10-02 18:04:13 +01:00
|
|
|
# for gtksink
|
|
|
|
gtk3
|
|
|
|
] ++ optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Cocoa
|
|
|
|
] ++ optionals stdenv.isLinux [
|
|
|
|
libv4l
|
|
|
|
libpulseaudio
|
|
|
|
libavc1394
|
|
|
|
libiec61883
|
|
|
|
libgudev
|
2020-10-01 23:31:58 +01:00
|
|
|
wayland
|
2020-04-11 18:26:26 +01:00
|
|
|
] ++ optionals enableJack [
|
|
|
|
libjack2
|
2019-05-01 15:10:36 +01:00
|
|
|
];
|
2019-01-21 01:48:04 +00:00
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
|
2020-10-01 23:31:58 +01:00
|
|
|
"-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing
|
2019-01-21 01:48:04 +00:00
|
|
|
"-Dqt5=disabled" # not clear as of writing how to correctly pass in the required qt5 deps
|
2019-10-02 18:04:13 +01:00
|
|
|
] ++ optionals (!gtkSupport) [
|
|
|
|
"-Dgtk3=disabled"
|
2020-04-11 18:26:26 +01:00
|
|
|
] ++ optionals (!enableJack) [
|
|
|
|
"-Djack=disabled"
|
2019-10-02 18:04:13 +01:00
|
|
|
] ++ optionals (!stdenv.isLinux) [
|
2019-05-01 17:44:08 +01:00
|
|
|
"-Ddv1394=disabled" # Linux only
|
|
|
|
"-Doss4=disabled" # Linux only
|
|
|
|
"-Doss=disabled" # Linux only
|
|
|
|
"-Dpulse=disabled" # TODO check if we can keep this enabled
|
|
|
|
"-Dv4l2-gudev=disabled" # Linux-only
|
|
|
|
"-Dv4l2=disabled" # Linux-only
|
|
|
|
"-Dximagesrc=disabled" # Linux-only
|
|
|
|
"-Dpulse=disabled" # TODO check if we can keep this enabled
|
2020-11-30 20:31:13 +00:00
|
|
|
] ++ optionals (!raspiCameraSupport) [
|
|
|
|
"-Drpicamsrc=disabled"
|
2019-01-21 01:48:04 +00:00
|
|
|
];
|
2015-04-09 02:53:06 +01:00
|
|
|
|
2020-10-01 23:31:58 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs \
|
|
|
|
scripts/extract-release-date-from-doap-file.py
|
|
|
|
'';
|
2019-10-02 18:04:13 +01:00
|
|
|
|
|
|
|
NIX_LDFLAGS = [
|
|
|
|
# linking error on Darwin
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553694896
|
|
|
|
"-lncurses"
|
|
|
|
];
|
|
|
|
|
2018-08-08 19:34:10 +01:00
|
|
|
# fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''"
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-10-02 18:04:13 +01:00
|
|
|
description = "GStreamer Good Plugins";
|
|
|
|
homepage = "https://gstreamer.freedesktop.org";
|
|
|
|
longDescription = ''
|
|
|
|
a set of plug-ins that we consider to have good quality code,
|
|
|
|
correct functionality, our preferred license (LGPL for the plug-in
|
|
|
|
code, LGPL or LGPL-compatible for the supporting library).
|
|
|
|
'';
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ matthewbauer ];
|
|
|
|
};
|
2013-12-23 15:36:37 +00:00
|
|
|
}
|