deadbeef-with-plugins: use symlinkJoin

This commit is contained in:
Nikolay Amiantov 2016-04-26 15:26:15 +03:00
parent dfe608c8a2
commit 5690c6ca07

View File

@ -1,22 +1,14 @@
{ stdenv, buildEnv, deadbeef, makeWrapper, plugins }: { stdenv, symlinkJoin, deadbeef, makeWrapper, plugins }:
let symlinkJoin {
drv = buildEnv { name = "deadbeef-with-plugins-${deadbeef.version}";
name = "deadbeef-with-plugins-" + (builtins.parseDrvName deadbeef.name).version;
paths = [ deadbeef ] ++ plugins; paths = [ deadbeef ] ++ plugins;
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 ${deadbeef}/bin/*; do
ln -s $i $out/bin
done
fi
wrapProgram $out/bin/deadbeef \ wrapProgram $out/bin/deadbeef \
--set DEADBEEF_PLUGIN_DIR "$out/lib/deadbeef" --set DEADBEEF_PLUGIN_DIR "$out/lib/deadbeef"
''; '';
}; }
in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; })