From 11aa06c57454cefc0eef057974dd793984b9afd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Mon, 19 Jan 2015 22:49:22 +0100 Subject: [PATCH] gstreamer: wrap gst-{launch,inspect,typefind} with GST_PLUGIN_SYSTEM_PATH So that the tools become useable. The cool thing about wrapping them like this (looping over $NIX_PROFILES) is that they will work on non-NixOS systems too, given that $NIX_PROFILES is set correctly. If you want the old (pure?) behaviour, just run gst-launch etc. with empty $NIX_PROFILES. --- pkgs/development/libraries/gstreamer/core/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index 78d3c3f1a233..5e306f5500fc 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, perl, bison, flex, python, gobjectIntrospection -, glib +, glib, makeWrapper }: stdenv.mkDerivation rec { @@ -19,10 +19,16 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ - pkgconfig perl bison flex python gobjectIntrospection + pkgconfig perl bison flex python gobjectIntrospection makeWrapper ]; propagatedBuildInputs = [ glib ]; + postInstall = '' + for prog in "$out/bin/"*; do + wrapProgram "$prog" --prefix GST_PLUGIN_SYSTEM_PATH : "\$(unset _tmp; for profile in \$NIX_PROFILES; do _tmp="\$profile/lib/gstreamer-1.0''$\{_tmp:+:\}\$_tmp"; done; printf "\$_tmp")" + done + ''; + setupHook = ./setup-hook.sh; }