diff options
author | Nikolay Amiantov <ab@fmap.me> | 2015-08-17 01:17:53 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2015-08-17 21:05:52 +0300 |
commit | 1a22ad6b1805d5b90dbe632aae6d91692464db6b (patch) | |
tree | 3a516244298a7f087bfb238e3450ea4374ce4c36 /pkgs/applications/audio/deadbeef/wrapper.nix | |
parent | 4a12ff77cc4374a9dfceb974615d1863025623b8 (diff) |
deadbeef: add -with-plugins wrapper and a necessary patch
Diffstat (limited to 'pkgs/applications/audio/deadbeef/wrapper.nix')
-rw-r--r-- | pkgs/applications/audio/deadbeef/wrapper.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/applications/audio/deadbeef/wrapper.nix b/pkgs/applications/audio/deadbeef/wrapper.nix new file mode 100644 index 0000000000000..b612f195af3f5 --- /dev/null +++ b/pkgs/applications/audio/deadbeef/wrapper.nix @@ -0,0 +1,22 @@ +{ 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 ]; }) |