summary refs log tree commit diff
path: root/pkgs/development/libraries/phonon
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2017-03-14 00:49:22 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-03-14 00:49:22 +0200
commitaba0b45b86fa5d3bf47bca33c37f3f0211b7e052 (patch)
tree9ec0dfef6dd6253dd329d5eb85da6a52a1470238 /pkgs/development/libraries/phonon
parent8bfa9f528c88243578246798c7c2ddde045e0de0 (diff)
parent46c9eac980e1d879d62c25499544c402feff3066 (diff)
downloadnixpkgs-aba0b45b86fa5d3bf47bca33c37f3f0211b7e052.tar
nixpkgs-aba0b45b86fa5d3bf47bca33c37f3f0211b7e052.tar.gz
nixpkgs-aba0b45b86fa5d3bf47bca33c37f3f0211b7e052.tar.bz2
nixpkgs-aba0b45b86fa5d3bf47bca33c37f3f0211b7e052.tar.lz
nixpkgs-aba0b45b86fa5d3bf47bca33c37f3f0211b7e052.tar.xz
nixpkgs-aba0b45b86fa5d3bf47bca33c37f3f0211b7e052.tar.zst
nixpkgs-aba0b45b86fa5d3bf47bca33c37f3f0211b7e052.zip
Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
      pkgs/development/libraries/qt-5/5.7/qtbase/default.nix
Diffstat (limited to 'pkgs/development/libraries/phonon')
-rw-r--r--pkgs/development/libraries/phonon/backends/gst-plugin-paths.patch13
-rw-r--r--pkgs/development/libraries/phonon/backends/gstreamer.nix27
2 files changed, 35 insertions, 5 deletions
diff --git a/pkgs/development/libraries/phonon/backends/gst-plugin-paths.patch b/pkgs/development/libraries/phonon/backends/gst-plugin-paths.patch
new file mode 100644
index 00000000000..39c1b9c0d29
--- /dev/null
+++ b/pkgs/development/libraries/phonon/backends/gst-plugin-paths.patch
@@ -0,0 +1,13 @@
+Index: phonon-gstreamer-4.9.0/gstreamer/backend.cpp
+===================================================================
+--- phonon-gstreamer-4.9.0.orig/gstreamer/backend.cpp
++++ phonon-gstreamer-4.9.0/gstreamer/backend.cpp
+@@ -85,6 +85,8 @@ Backend::Backend(QObject *parent, const
+         "--gst-debug-no-color"
+     };
+ 
++    qputenv("GST_PLUGIN_PATH_1_0", GST_PLUGIN_PATH_1_0);
++
+     int argc = sizeof(args) / sizeof(*args);
+     char **argv = const_cast<char**>(args);
+     GError *err = 0;
diff --git a/pkgs/development/libraries/phonon/backends/gstreamer.nix b/pkgs/development/libraries/phonon/backends/gstreamer.nix
index d8358757094..e0f24fbc822 100644
--- a/pkgs/development/libraries/phonon/backends/gstreamer.nix
+++ b/pkgs/development/libraries/phonon/backends/gstreamer.nix
@@ -29,15 +29,32 @@ stdenv.mkDerivation rec {
     sha256 = "1wc5p1rqglf0n1avp55s50k7fjdzdrhg0gind15k8796w7nfbhyf";
   };
 
+  # Hardcode paths to useful plugins so the backend doesn't depend
+  # on system paths being set.
+  patches = [ ./gst-plugin-paths.patch ];
+
+  NIX_CFLAGS_COMPILE =
+    let gstPluginPaths =
+          lib.makeSearchPathOutput "lib" "/lib/gstreamer-1.0"
+          (with gst_all_1; [
+            gstreamer
+            gst-plugins-base
+            gst-plugins-good
+            gst-plugins-ugly
+            gst-plugins-bad
+            gst-libav
+          ]);
+    in [
+      # This flag should be picked up through pkgconfig, but it isn't.
+      "-I${gst_all_1.gstreamer.dev}/lib/gstreamer-1.0/include"
+
+      ''-DGST_PLUGIN_PATH_1_0="${gstPluginPaths}"''
+    ];
+
   buildInputs = with gst_all_1;
     [ gstreamer gst-plugins-base phonon ]
     ++ (if withQt5 then [ qtbase qtx11extras ] else [ qt4 ]);
 
-  NIX_CFLAGS_COMPILE = [
-    # This flag should be picked up through pkgconfig, but it isn't.
-    "-I${gst_all_1.gstreamer.dev}/lib/gstreamer-1.0/include"
-  ];
-
   # cleanup: the build system creates (empty) $out/$out/share/icons (double prefix)
   # if DESTDIR is unset
   DESTDIR="/";