37 , gtkSupport ? false, gtk3
38 , qt5Support ? false, qt5
39 , qt6Support ? false, qt6
40 , raspiCameraSupport ? false, libraspberrypi
41 , enableJack ? true, libjack2
42 , enableX11 ? stdenv.hostPlatform.isLinux, xorg
44 , enableWayland ? stdenv.hostPlatform.isLinux
51 # Checks meson.is_cross_build(), so even canExecute isn't enough.
52 , enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
55 # MMAL is not supported on aarch64, see:
56 # https://github.com/raspberrypi/userland/issues/688
57 assert raspiCameraSupport -> (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch32);
59 stdenv.mkDerivation rec {
60 pname = "gst-plugins-good";
63 outputs = [ "out" "dev" ];
66 url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
67 hash = "sha256-/OdI+mbXqO4fsmFInlnQHj+nh2I9bVw1BoQW/nzQrLM=";
71 # Reenable dynamic loading of libsoup on Darwin and use a different approach to do it.
72 ./souploader-darwin.diff
73 # dlopen libsoup_3 with an absolute path
75 src = ./souploader.diff;
76 nixLibSoup3Path = "${lib.getLib libsoup_3}/lib";
82 depsBuildBuild = [ pkg-config ];
94 ] ++ lib.optionals enableDocumentation [
96 ] ++ lib.optionals qt5Support (with qt5; [
99 ]) ++ lib.optionals qt6Support (with qt6; [
102 ]) ++ lib.optionals enableWayland [
130 ] ++ lib.optionals raspiCameraSupport [
132 ] ++ lib.optionals enableX11 [
138 ] ++ lib.optionals gtkSupport [
141 ] ++ lib.optionals qt5Support (with qt5; [
146 ]) ++ lib.optionals qt6Support (with qt6; [
150 ]) ++ lib.optionals stdenv.hostPlatform.isDarwin [
152 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
160 ] ++ lib.optionals enableWayland [
162 ] ++ lib.optionals enableJack [
167 "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
168 "-Dglib-asserts=disabled" # asserts should be disabled on stable releases
169 (lib.mesonEnable "doc" enableDocumentation)
170 ] ++ lib.optionals (!qt5Support) [
172 ] ++ lib.optionals (!qt6Support) [
174 ] ++ lib.optionals (!gtkSupport) [
176 ] ++ lib.optionals (!enableX11) [
177 "-Dximagesrc=disabled" # Linux-only
178 ] ++ lib.optionals (!enableJack) [
180 ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [
181 "-Ddv1394=disabled" # Linux only
182 "-Doss4=disabled" # Linux only
183 "-Doss=disabled" # Linux only
184 "-Dpulse=disabled" # TODO check if we can keep this enabled
185 "-Dv4l2-gudev=disabled" # Linux-only
186 "-Dv4l2=disabled" # Linux-only
187 ] ++ (if raspiCameraSupport then [
188 "-Drpi-lib-dir=${libraspberrypi}/lib"
190 "-Drpicamsrc=disabled"
195 scripts/extract-release-date-from-doap-file.py
199 # linking error on Darwin
200 # https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553694896
204 # fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''"
207 # must be explicitly set since 5590e365
208 dontWrapQtApps = true;
211 description = "GStreamer Good Plugins";
212 homepage = "https://gstreamer.freedesktop.org";
214 a set of plug-ins that we consider to have good quality code,
215 correct functionality, our preferred license (LGPL for the plug-in
216 code, LGPL or LGPL-compatible for the supporting library).
218 license = licenses.lgpl2Plus;
219 platforms = platforms.linux ++ platforms.darwin;
220 maintainers = with maintainers; [ matthewbauer ];