1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 03:48:57 +00:00
nixpkgs/pkgs/applications/audio/deadbeef/wrapper.nix

23 lines
644 B
Nix

{ stdenv, buildEnv, deadbeef, makeWrapper, plugins }:
let
drv = buildEnv {
name = "deadbeef-with-plugins-" + (builtins.parseDrvName deadbeef.name).version;
paths = [ deadbeef ] ++ plugins;
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 ]; })