git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #23504 from ttuegel/phonon-gstreamer

phonon-gstreamer-backend: Hardcode GStreamer plugin paths

commit290c096a1611c471e16b70b9444e57b3d1231236 authorThomas Tuegel <ttuegel@secure.mailbox.org> dateFri 10 Mar 2017, 08:02 (10 years ago) parent7dcc40b64b88c3
3 files changed+35−15
nixos/modules/services/x11/desktop-managers/plasma5.nix−10 pkgs/development/libraries/phonon/backends/gst-plugin-paths.patch+13 pkgs/development/libraries/phonon/backends/gstreamer.nix+22−5
nixos/modules/services/x11/desktop-managers/plasma5.nix−10
@@ -182,16 +182,6 @@ in
182182
183183 environment.variables = {
184184 # Enable GTK applications to load SVG icons
185− GST_PLUGIN_SYSTEM_PATH_1_0 =
186− lib.makeSearchPath "/lib/gstreamer-1.0"
187− (builtins.map (pkg: pkg.out) (with pkgs.gst_all_1; [
188− gstreamer
189− gst-plugins-base
190− gst-plugins-good
191− gst-plugins-ugly
192− gst-plugins-bad
193− gst-libav # for mp3 playback
194− ]));
195185 GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache";
196186 };
197187
pkgs/development/libraries/phonon/backends/gst-plugin-paths.patchnew file+13
@@ -0,0 +1,13 @@
1+Index: phonon-gstreamer-4.9.0/gstreamer/backend.cpp
2+===================================================================
3+--- phonon-gstreamer-4.9.0.orig/gstreamer/backend.cpp
4++++ phonon-gstreamer-4.9.0/gstreamer/backend.cpp
5+@@ -85,6 +85,8 @@ Backend::Backend(QObject *parent, const
6+ "--gst-debug-no-color"
7+ };
8+
9++ qputenv("GST_PLUGIN_PATH_1_0", GST_PLUGIN_PATH_1_0);
10++
11+ int argc = sizeof(args) / sizeof(*args);
12+ char **argv = const_cast<char**>(args);
13+ GError *err = 0;
pkgs/development/libraries/phonon/backends/gstreamer.nix+22−5
@@ -29,15 +29,32 @@ stdenv.mkDerivation rec {
2929 sha256 = "1wc5p1rqglf0n1avp55s50k7fjdzdrhg0gind15k8796w7nfbhyf";
3030 };
3131
32+ # Hardcode paths to useful plugins so the backend doesn't depend
33+ # on system paths being set.
34+ patches = [ ./gst-plugin-paths.patch ];
35+
36+ NIX_CFLAGS_COMPILE =
37+ let gstPluginPaths =
38+ lib.makeSearchPathOutput "lib" "/lib/gstreamer-1.0"
39+ (with gst_all_1; [
40+ gstreamer
41+ gst-plugins-base
42+ gst-plugins-good
43+ gst-plugins-ugly
44+ gst-plugins-bad
45+ gst-libav
46+ ]);
47+ in [
48+ # This flag should be picked up through pkgconfig, but it isn't.
49+ "-I${gst_all_1.gstreamer.dev}/lib/gstreamer-1.0/include"
50+
51+ ''-DGST_PLUGIN_PATH_1_0="${gstPluginPaths}"''
52+ ];
53+
3254 buildInputs = with gst_all_1;
3355 [ gstreamer gst-plugins-base phonon ]
3456 ++ (if withQt5 then [ qtbase qtx11extras ] else [ qt4 ]);
3557
36− NIX_CFLAGS_COMPILE = [
37− # This flag should be picked up through pkgconfig, but it isn't.
38− "-I${gst_all_1.gstreamer.dev}/lib/gstreamer-1.0/include"
39− ];
40−
4158 # cleanup: the build system creates (empty) $out/$out/share/icons (double prefix)
4259 # if DESTDIR is unset
4360 DESTDIR="/";