mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
deadbeef-with-plugins: use symlinkJoin
This commit is contained in:
parent
dfe608c8a2
commit
5690c6ca07
@ -1,22 +1,14 @@
|
||||
{ stdenv, buildEnv, deadbeef, makeWrapper, plugins }:
|
||||
{ stdenv, symlinkJoin, deadbeef, makeWrapper, plugins }:
|
||||
|
||||
let
|
||||
drv = buildEnv {
|
||||
name = "deadbeef-with-plugins-" + (builtins.parseDrvName deadbeef.name).version;
|
||||
symlinkJoin {
|
||||
name = "deadbeef-with-plugins-${deadbeef.version}";
|
||||
|
||||
paths = [ deadbeef ] ++ plugins;
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
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 \
|
||||
--set DEADBEEF_PLUGIN_DIR "$out/lib/deadbeef"
|
||||
'';
|
||||
};
|
||||
in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user