summary refs log tree commit diff
path: root/pkgs/applications/misc/k3b/wrapper.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/k3b/wrapper.nix')
-rw-r--r--pkgs/applications/misc/k3b/wrapper.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/applications/misc/k3b/wrapper.nix b/pkgs/applications/misc/k3b/wrapper.nix
new file mode 100644
index 000000000000..d5c98a2affa7
--- /dev/null
+++ b/pkgs/applications/misc/k3b/wrapper.nix
@@ -0,0 +1,23 @@
+{ lib, buildEnv, k3b-original, cdrtools, makeWrapper }:
+
+let
+  binPath = lib.makeBinPath [ cdrtools ];
+in buildEnv {
+  name = "k3b-${k3b-original.version}";
+
+  paths = [ k3b-original ];
+  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 ${k3b-original}/bin/*; do
+        ln -s $i $out/bin
+      done
+    fi
+    wrapProgram $out/bin/k3b \
+      --prefix PATH ':' ${binPath}
+  '';
+}