summary refs log tree commit diff
path: root/pkgs/applications/misc/k3b
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2014-03-25 17:25:37 -0500
committerThomas Tuegel <ttuegel@gmail.com>2014-03-25 17:25:37 -0500
commit3d08732d128c8106a0ee66d042617353820b2c2d (patch)
tree2ff6b51f729f454f7b762851fee30dcb1cef81f5 /pkgs/applications/misc/k3b
parent84fba566f148543f06255e447225fae554b6a2c2 (diff)
downloadnixlib-3d08732d128c8106a0ee66d042617353820b2c2d.tar
nixlib-3d08732d128c8106a0ee66d042617353820b2c2d.tar.gz
nixlib-3d08732d128c8106a0ee66d042617353820b2c2d.tar.bz2
nixlib-3d08732d128c8106a0ee66d042617353820b2c2d.tar.lz
nixlib-3d08732d128c8106a0ee66d042617353820b2c2d.tar.xz
nixlib-3d08732d128c8106a0ee66d042617353820b2c2d.tar.zst
nixlib-3d08732d128c8106a0ee66d042617353820b2c2d.zip
Wrap k3b with PATH to required tools
Diffstat (limited to 'pkgs/applications/misc/k3b')
-rw-r--r--pkgs/applications/misc/k3b/default.nix20
1 files changed, 18 insertions, 2 deletions
diff --git a/pkgs/applications/misc/k3b/default.nix b/pkgs/applications/misc/k3b/default.nix
index 06565065ce54..9f9e29f537e9 100644
--- a/pkgs/applications/misc/k3b/default.nix
+++ b/pkgs/applications/misc/k3b/default.nix
@@ -1,8 +1,12 @@
 { stdenv, fetchurl, cmake, qt4, perl, shared_mime_info, libvorbis, taglib
 , flac, libsamplerate, libdvdread, lame, libsndfile, libmad, gettext
 , kdelibs, kdemultimedia, automoc4, phonon, libkcddb ? null
+, makeWrapper, cdrkit, cdrdao, dvdplusrwtools
 }:
 
+let
+  runtimeDeps = [ cdrkit cdrdao dvdplusrwtools ];
+in
 stdenv.mkDerivation rec {
   name = "k3b-2.0.2";
   
@@ -16,10 +20,22 @@ stdenv.mkDerivation rec {
       flac libsamplerate libdvdread lame libsndfile
       libmad gettext stdenv.gcc.libc
       kdelibs kdemultimedia automoc4 phonon
-      libkcddb
-    ];
+      libkcddb makeWrapper
+    ]
+    # Runtime dependencies are *not* propagated so they are easy to override.
+    ++ runtimeDeps;
 
   enableParallelBuilding = true;
+
+  postInstall =
+    # Wrap k3b with PATH to required tools, so they can be found without being
+    # installed in a profile. The PATH is suffixed so that profile-installed
+    # tools take preference.
+    let extraPath = stdenv.lib.makeSearchPath "bin" runtimeDeps;
+    in ''
+      wrapProgram "$out/bin/k3b" --suffix PATH : ${extraPath}
+      wrapProgram "$out/bin/k3bsetup" --suffix PATH : ${extraPath}
+    '';
                   
   meta = with stdenv.lib; {
     description = "CD/DVD Burning Application for KDE";