add gstreamer 1.0 setup-hook and use it where appropriate

This commit is contained in:
Domen Kožar
2014-02-28 02:03:07 +01:00
parent 0e58538fa8
commit e9f3199973
8 changed files with 21 additions and 23 deletions

View File

@@ -23,4 +23,6 @@ stdenv.mkDerivation rec {
];
propagatedBuildInputs = [ glib ];
setupHook = ./setup-hook.sh;
}

View 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)

View File

@@ -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
}