summary refs log tree commit diff
path: root/pkgs/applications/audio/deadbeef/wrapper.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2015-08-17 01:17:53 +0300
committerNikolay Amiantov <ab@fmap.me>2015-08-17 21:05:52 +0300
commit1a22ad6b1805d5b90dbe632aae6d91692464db6b (patch)
tree3a516244298a7f087bfb238e3450ea4374ce4c36 /pkgs/applications/audio/deadbeef/wrapper.nix
parent4a12ff77cc4374a9dfceb974615d1863025623b8 (diff)
downloadnixpkgs-1a22ad6b1805d5b90dbe632aae6d91692464db6b.tar
nixpkgs-1a22ad6b1805d5b90dbe632aae6d91692464db6b.tar.gz
nixpkgs-1a22ad6b1805d5b90dbe632aae6d91692464db6b.tar.bz2
nixpkgs-1a22ad6b1805d5b90dbe632aae6d91692464db6b.tar.lz
nixpkgs-1a22ad6b1805d5b90dbe632aae6d91692464db6b.tar.xz
nixpkgs-1a22ad6b1805d5b90dbe632aae6d91692464db6b.tar.zst
nixpkgs-1a22ad6b1805d5b90dbe632aae6d91692464db6b.zip
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.nix22
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 00000000000..b612f195af3
--- /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 ]; })