avidemux: use symlinkJoin

This commit is contained in:
Nikolay Amiantov 2016-04-26 15:27:25 +03:00
parent 1f89dbd46b
commit 7b4fc0f5a9

View File

@ -1,4 +1,4 @@
{ buildEnv, avidemux_unwrapped, makeWrapper { symlinkJoin, avidemux_unwrapped, makeWrapper
# GTK version is broken upstream, see https://bugzilla.redhat.com/show_bug.cgi?id=1244340 # GTK version is broken upstream, see https://bugzilla.redhat.com/show_bug.cgi?id=1244340
, withUi ? "qt4" , withUi ? "qt4"
}: }:
@ -7,24 +7,14 @@ let ui = builtins.getAttr "avidemux_${withUi}" avidemux_unwrapped; in
assert ui.isUi; assert ui.isUi;
buildEnv { symlinkJoin {
name = "avidemux-${withUi}-" + ui.version; name = "avidemux-${withUi}-${ui.version}";
paths = [ ui avidemux_unwrapped.avidemux_common avidemux_unwrapped.avidemux_settings ]; paths = [ ui avidemux_unwrapped.avidemux_common avidemux_unwrapped.avidemux_settings ];
ignoreCollisions = true;
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];
postBuild = '' postBuild = ''
# TODO: This could be avoided if buildEnv could be forced to create all directories
if [ -L $out/bin ]; then
rm $out/bin
mkdir $out/bin
for i in ${ui}/bin/*; do
ln -s $i $out/bin
done
fi
for i in $out/bin/*; do for i in $out/bin/*; do
wrapProgram $i --set ADM_ROOT_DIR $out wrapProgram $i --set ADM_ROOT_DIR $out
done done