about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2014-02-28 02:03:07 +0100
committerDomen Kožar <domen@dev.si>2014-02-28 02:03:07 +0100
commite9f3199973ea5c7ad5507d928d2f315117a2c0a7 (patch)
treef6a49d60e92d10447dab6009053f21ad01c6d7fa
parent0e58538fa86fb33ec264f1c3a8eb82fed90c36a3 (diff)
downloadnixlib-e9f3199973ea5c7ad5507d928d2f315117a2c0a7.tar
nixlib-e9f3199973ea5c7ad5507d928d2f315117a2c0a7.tar.gz
nixlib-e9f3199973ea5c7ad5507d928d2f315117a2c0a7.tar.bz2
nixlib-e9f3199973ea5c7ad5507d928d2f315117a2c0a7.tar.lz
nixlib-e9f3199973ea5c7ad5507d928d2f315117a2c0a7.tar.xz
nixlib-e9f3199973ea5c7ad5507d928d2f315117a2c0a7.tar.zst
nixlib-e9f3199973ea5c7ad5507d928d2f315117a2c0a7.zip
add gstreamer 1.0 setup-hook and use it where appropriate
-rw-r--r--nixos/modules/programs/environment.nix2
-rw-r--r--pkgs/applications/audio/mopidy/default.nix5
-rw-r--r--pkgs/applications/audio/quodlibet/default.nix9
-rw-r--r--pkgs/applications/video/gnash/default.nix4
-rw-r--r--pkgs/desktops/xfce/applications/parole.nix11
-rw-r--r--pkgs/development/libraries/gstreamer/core/default.nix2
-rw-r--r--pkgs/development/libraries/gstreamer/core/setup-hook.sh9
-rw-r--r--pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh2
8 files changed, 21 insertions, 23 deletions
diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix
index 7c1922cdfd89..489a7a4d269a 100644
--- a/nixos/modules/programs/environment.nix
+++ b/nixos/modules/programs/environment.nix
@@ -45,7 +45,7 @@ in
         TERMINFO_DIRS = [ "${i}/share/terminfo" ];
         PERL5LIB = [ "${i}/lib/perl5/site_perl" ];
         ALSA_PLUGIN_DIRS = [ "${i}/lib/alsa-lib" ];
-        GST_PLUGIN_PATH = [ "${i}/lib/gstreamer-0.10" ];
+        GST_PLUGIN_SYSTEM_PATH = [ "${i}/lib/gstreamer-0.10" ];
         KDEDIRS = [ "${i}" ];
         STRIGI_PLUGIN_PATH = [ "${i}/lib/strigi/" ];
         QT_PLUGIN_PATH = [ "${i}/lib/qt4/plugins" "${i}/lib/kde4/plugins" ];
diff --git a/pkgs/applications/audio/mopidy/default.nix b/pkgs/applications/audio/mopidy/default.nix
index b684fee37d56..04393372cf30 100644
--- a/pkgs/applications/audio/mopidy/default.nix
+++ b/pkgs/applications/audio/mopidy/default.nix
@@ -13,7 +13,7 @@ pythonPackages.buildPythonPackage rec {
   };
 
   propagatedBuildInputs = with pythonPackages; [
-   gst_python pygobject pykka pyspotify pylast cherrypy ws4py
+   gst_python pygobject pykka pyspotify pylast cherrypy ws4py gst_plugins_base gst_plugins_good
   ];
 
   # python zip complains about old timestamps
@@ -27,8 +27,7 @@ pythonPackages.buildPythonPackage rec {
   postInstall = ''
     for p in $out/bin/mopidy $out/bin/mopidy-scan; do
       wrapProgram $p \
-        --prefix GST_PLUGIN_PATH : ${gst_plugins_good}/lib/gstreamer-0.10 \
-        --prefix GST_PLUGIN_PATH : ${gst_plugins_base}/lib/gstreamer-0.10
+        --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
     done
   '';
 
diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix
index fa63c9f654ad..de1aba2a7f6f 100644
--- a/pkgs/applications/audio/quodlibet/default.nix
+++ b/pkgs/applications/audio/quodlibet/default.nix
@@ -52,13 +52,8 @@ buildPythonPackage {
 
   postInstall = stdenv.lib.optionalString withGstPlugins ''
     # Wrap quodlibet so it finds the GStreamer plug-ins
-    wrapProgram "$out/bin/quodlibet" --prefix                                 \
-      GST_PLUGIN_PATH ":"                                                     \
-      ${ stdenv.lib.concatStringsSep ":"
-         (map (s: s+"/lib/gstreamer-0.10")
-           (stdenv.lib.filter (s: s != null) [
-             gst_plugins_base gst_plugins_good gst_plugins_ugly gst_plugins_bad
-           ])) }
+    wrapProgram "$out/bin/quodlibet" --prefix \
+      GST_PLUGIN_SYSTEM_PATH ":" "$GST_PLUGIN_SYSTEM_PATH"                                                     \
   '';
 
   meta = {
diff --git a/pkgs/applications/video/gnash/default.nix b/pkgs/applications/video/gnash/default.nix
index c3b78b64d932..ef40d614a397 100644
--- a/pkgs/applications/video/gnash/default.nix
+++ b/pkgs/applications/video/gnash/default.nix
@@ -97,9 +97,7 @@ stdenv.mkDerivation rec {
     # (e.g., gst-ffmpeg is needed to watch movies such as YouTube's).
     for prog in "$out/bin/"*
     do
-      wrapProgram "$prog" --prefix                                            \
-        GST_PLUGIN_PATH ":"                                                     \
-        "${gst_plugins_base}/lib/gstreamer-0.10:${gst_plugins_good}/lib/gstreamer-0.10:${gst_ffmpeg}/lib/gstreamer-0.10"
+      wrapProgram "$prog" --prefix GST_PLUGIN_SYSTEM_PATH ":" "$GST_PLUGIN_SYSTEM_PATH"
     done
   '';
 
diff --git a/pkgs/desktops/xfce/applications/parole.nix b/pkgs/desktops/xfce/applications/parole.nix
index c1a4ecd787d8..491bb0112d95 100644
--- a/pkgs/desktops/xfce/applications/parole.nix
+++ b/pkgs/desktops/xfce/applications/parole.nix
@@ -18,21 +18,16 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig intltool ];
 
   buildInputs = [
-    makeWrapper gst_all_1.gst-plugins-base
+    makeWrapper 
     gtk dbus_glib libxfce4ui libxfce4util xfconf
     taglib libnotify
-  ];
+  ] ++ with gst_all_1; [ gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav];
 
   configureFlags = [ "--with-gstreamer=1.0" ];
 
   postInstall = stdenv.lib.optionalString withGstPlugins ''
     wrapProgram "$out/bin/parole" --prefix \
-      GST_PLUGIN_PATH ":" ${stdenv.lib.concatStringsSep ":"
-        (map (s: s+"/lib/gstreamer-1.0") (with gst_all_1; [
-          gst-plugins-base gst-plugins-good
-          gst-plugins-bad gst-plugins-ugly
-          gst-libav
-        ])) }
+      GST_PLUGIN_SYSTEM_PATH_1_0 ":" "$GST_PLUGIN_SYSTEM_PATH_1_0"
   '';
 
   meta = {
diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix
index 85730c1bf259..881f31c66a6a 100644
--- a/pkgs/development/libraries/gstreamer/core/default.nix
+++ b/pkgs/development/libraries/gstreamer/core/default.nix
@@ -23,4 +23,6 @@ stdenv.mkDerivation rec {
   ];
 
   propagatedBuildInputs = [ glib ];
+
+  setupHook = ./setup-hook.sh;
 }
diff --git a/pkgs/development/libraries/gstreamer/core/setup-hook.sh b/pkgs/development/libraries/gstreamer/core/setup-hook.sh
new file mode 100644
index 000000000000..4e75044e732a
--- /dev/null
+++ b/pkgs/development/libraries/gstreamer/core/setup-hook.sh
@@ -0,0 +1,9 @@
+addGstreamerLibPath () {
+    if test -d "$1/lib/gstreamer-1.0"
+    then
+        export GST_PLUGIN_SYSTEM_PATH_1_0="${GST_PLUGIN_SYSTEM_PATH_1_0}${GST_PLUGIN_SYSTEM_PATH_1_0:+:}$1/lib/gstreamer-1.0"
+    fi
+}
+
+envHooks=(${envHooks[@]} addGstreamerLibPath)
+
diff --git a/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh b/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh
index ad184dc21e99..10671f9d227c 100644
--- a/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh
+++ b/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh
@@ -1,7 +1,7 @@
 addGstreamerLibPath () {
     if test -d "$1/lib/gstreamer-0.10"
     then
-        export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}${GST_PLUGIN_PATH:+:}$1/lib/gstreamer-0.10"
+        export GST_PLUGIN_SYSTEM_PATH="${GST_PLUGIN_SYSTEM_PATH}${GST_PLUGIN_SYSTEM_PATH:+:}$1/lib/gstreamer-0.10"
     fi
 }