2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
2023-08-10 07:59:29 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, meson
|
2020-11-12 09:05:59 +00:00
|
|
|
, nasm
|
2020-04-24 23:36:52 +00:00
|
|
|
, ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3
|
|
|
|
, gst-plugins-base
|
|
|
|
, orc
|
|
|
|
, bzip2
|
|
|
|
, gettext
|
2023-11-16 04:20:00 +00:00
|
|
|
, libGL
|
2020-04-24 23:36:52 +00:00
|
|
|
, libv4l
|
|
|
|
, libdv
|
|
|
|
, libavc1394
|
|
|
|
, libiec61883
|
|
|
|
, libvpx
|
|
|
|
, speex
|
|
|
|
, flac
|
|
|
|
, taglib
|
|
|
|
, libshout
|
|
|
|
, cairo
|
|
|
|
, gdk-pixbuf
|
|
|
|
, aalib
|
|
|
|
, libcaca
|
|
|
|
, libsoup
|
|
|
|
, libpulseaudio
|
|
|
|
, libintl
|
2021-03-09 03:18:52 +00:00
|
|
|
, Cocoa
|
2020-04-24 23:36:52 +00:00
|
|
|
, lame
|
|
|
|
, mpg123
|
|
|
|
, twolame
|
2021-03-09 03:18:52 +00:00
|
|
|
, gtkSupport ? false, gtk3
|
|
|
|
, qt5Support ? false, qt5
|
2023-04-29 16:46:19 +00:00
|
|
|
, qt6Support ? false, qt6
|
2021-03-09 03:18:52 +00:00
|
|
|
, raspiCameraSupport ? false, libraspberrypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, enableJack ? true, libjack2
|
2023-07-15 17:15:38 +00:00
|
|
|
, enableX11 ? stdenv.isLinux, xorg
|
2020-04-24 23:36:52 +00:00
|
|
|
, ncurses
|
2020-11-12 09:05:59 +00:00
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
2020-04-24 23:36:52 +00:00
|
|
|
, libgudev
|
|
|
|
, wavpack
|
2022-06-16 17:23:12 +00:00
|
|
|
, glib
|
2024-01-02 11:29:13 +00:00
|
|
|
, openssl
|
2023-04-29 16:46:19 +00:00
|
|
|
# Checks meson.is_cross_build(), so even canExecute isn't enough.
|
|
|
|
, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
# MMAL is not supported on aarch64, see:
|
|
|
|
# https://github.com/raspberrypi/userland/issues/688
|
|
|
|
assert raspiCameraSupport -> (stdenv.isLinux && stdenv.isAarch32);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gst-plugins-good";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.22.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-03-09 03:18:52 +00:00
|
|
|
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-JpWfz+v/9jfU6gjvQDFrrzG2G7dymCCwaE6ADDoUeLY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
depsBuildBuild = [ pkg-config ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
gettext
|
2020-11-12 09:05:59 +00:00
|
|
|
nasm
|
2022-06-16 17:23:12 +00:00
|
|
|
orc
|
|
|
|
libshout
|
|
|
|
glib
|
2023-04-29 16:46:19 +00:00
|
|
|
] ++ lib.optionals enableDocumentation [
|
|
|
|
hotdoc
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ lib.optionals qt5Support (with qt5; [
|
|
|
|
qtbase
|
2023-11-16 04:20:00 +00:00
|
|
|
qttools
|
2023-04-29 16:46:19 +00:00
|
|
|
]) ++ lib.optionals qt6Support (with qt6; [
|
|
|
|
qtbase
|
|
|
|
qttools
|
2022-06-16 17:23:12 +00:00
|
|
|
]) ++ lib.optionals stdenv.isLinux [
|
2020-11-12 09:05:59 +00:00
|
|
|
wayland-protocols
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gst-plugins-base
|
|
|
|
orc
|
|
|
|
bzip2
|
|
|
|
libdv
|
|
|
|
libvpx
|
|
|
|
speex
|
|
|
|
flac
|
|
|
|
taglib
|
|
|
|
cairo
|
|
|
|
gdk-pixbuf
|
|
|
|
aalib
|
|
|
|
libcaca
|
|
|
|
libsoup
|
|
|
|
libshout
|
|
|
|
lame
|
|
|
|
mpg123
|
|
|
|
twolame
|
|
|
|
libintl
|
|
|
|
ncurses
|
|
|
|
wavpack
|
2024-01-02 11:29:13 +00:00
|
|
|
openssl
|
2021-03-09 03:18:52 +00:00
|
|
|
] ++ lib.optionals raspiCameraSupport [
|
2020-12-07 07:45:13 +00:00
|
|
|
libraspberrypi
|
2023-07-15 17:15:38 +00:00
|
|
|
] ++ lib.optionals enableX11 [
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXdamage
|
2021-03-09 03:18:52 +00:00
|
|
|
] ++ lib.optionals gtkSupport [
|
2020-04-24 23:36:52 +00:00
|
|
|
# for gtksink
|
|
|
|
gtk3
|
2021-03-09 03:18:52 +00:00
|
|
|
] ++ lib.optionals qt5Support (with qt5; [
|
2021-02-24 18:30:23 +00:00
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
|
|
|
qtwayland
|
|
|
|
qtx11extras
|
2023-04-29 16:46:19 +00:00
|
|
|
]) ++ lib.optionals qt6Support (with qt6; [
|
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
|
|
|
qtwayland
|
2021-03-09 03:18:52 +00:00
|
|
|
]) ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Cocoa
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2023-11-16 04:20:00 +00:00
|
|
|
libGL
|
2020-04-24 23:36:52 +00:00
|
|
|
libv4l
|
|
|
|
libpulseaudio
|
|
|
|
libavc1394
|
|
|
|
libiec61883
|
|
|
|
libgudev
|
2020-11-12 09:05:59 +00:00
|
|
|
wayland
|
2021-03-09 03:18:52 +00:00
|
|
|
] ++ lib.optionals enableJack [
|
2020-04-24 23:36:52 +00:00
|
|
|
libjack2
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
|
2021-10-14 00:43:12 +00:00
|
|
|
"-Dglib-asserts=disabled" # asserts should be disabled on stable releases
|
2023-04-29 16:46:19 +00:00
|
|
|
(lib.mesonEnable "doc" enableDocumentation)
|
2021-03-09 03:18:52 +00:00
|
|
|
] ++ lib.optionals (!qt5Support) [
|
2021-02-24 18:30:23 +00:00
|
|
|
"-Dqt5=disabled"
|
2023-04-29 16:46:19 +00:00
|
|
|
] ++ lib.optionals (!qt6Support) [
|
|
|
|
"-Dqt6=disabled"
|
2021-03-09 03:18:52 +00:00
|
|
|
] ++ lib.optionals (!gtkSupport) [
|
2020-04-24 23:36:52 +00:00
|
|
|
"-Dgtk3=disabled"
|
2023-07-15 17:15:38 +00:00
|
|
|
] ++ lib.optionals (!enableX11) [
|
|
|
|
"-Dximagesrc=disabled" # Linux-only
|
2021-03-09 03:18:52 +00:00
|
|
|
] ++ lib.optionals (!enableJack) [
|
2020-04-24 23:36:52 +00:00
|
|
|
"-Djack=disabled"
|
2021-03-09 03:18:52 +00:00
|
|
|
] ++ lib.optionals (!stdenv.isLinux) [
|
2020-04-24 23:36:52 +00: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
|
2023-08-04 22:07:22 +00:00
|
|
|
] ++ (if raspiCameraSupport then [
|
|
|
|
"-Drpi-lib-dir=${libraspberrypi}/lib"
|
|
|
|
] else [
|
2020-12-07 07:45:13 +00:00
|
|
|
"-Drpicamsrc=disabled"
|
2023-08-04 22:07:22 +00:00
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs \
|
|
|
|
scripts/extract-release-date-from-doap-file.py
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
NIX_LDFLAGS = [
|
|
|
|
# linking error on Darwin
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553694896
|
|
|
|
"-lncurses"
|
|
|
|
];
|
|
|
|
|
|
|
|
# fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''"
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
# must be explicitly set since 5590e365
|
2021-02-24 18:30:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00: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;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ matthewbauer lilyinstarlight ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|