gstreamer: fix plugin detection

The `--suffix` option escapes it's arguments. This leads to the
`GST_PLUGIN_SYTEM_PATH` variable to be not correctly expanded with the embedded
bash script.

Switching to `--run` and crafting the required export by hand bypasses the issue.
This commit is contained in:
Pascal Bach 2019-01-19 22:05:58 +01:00
parent 0f3758b5e6
commit 9b7742eefc

View File

@ -44,7 +44,8 @@ stdenv.mkDerivation rec {
postInstall = ''
for prog in "$dev/bin/"*; do
wrapProgram "$prog" --suffix GST_PLUGIN_SYSTEM_PATH : "\$(unset _tmp; for profile in \$NIX_PROFILES; do _tmp="\$profile/lib/gstreamer-1.0''$\{_tmp:+:\}\$_tmp"; done; printf "\$_tmp")"
# We can't use --suffix here due to quoting so we craft the export command by hand
wrapProgram "$prog" --run "export GST_PLUGIN_SYSTEM_PATH=\$GST_PLUGIN_SYSTEM_PATH"$\{GST_PLUGIN_SYSTEM_PATH:+:\}"\$(unset _tmp; for profile in \$NIX_PROFILES; do _tmp="\$profile/lib/gstreamer-1.0''$\{_tmp:+:\}\$_tmp"; done; printf "\$_tmp")"
done
'';