mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 06:31:20 +00:00
add gstreamer 1.0 setup-hook and use it where appropriate
This commit is contained in:
parent
0e58538fa8
commit
e9f3199973
@ -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" ];
|
||||
|
@ -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
|
||||
'';
|
||||
|
||||
|
@ -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 = {
|
||||
|
@ -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
|
||||
'';
|
||||
|
||||
|
@ -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 = {
|
||||
|
@ -23,4 +23,6 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ glib ];
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
}
|
||||
|
9
pkgs/development/libraries/gstreamer/core/setup-hook.sh
Normal file
9
pkgs/development/libraries/gstreamer/core/setup-hook.sh
Normal file
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user