k3b: use symlinkJoin

This commit is contained in:
Nikolay Amiantov 2016-04-26 15:26:55 +03:00
parent d04dafd64e
commit d40e636bdc

View File

@ -1,22 +1,14 @@
{ lib, buildEnv, k3b-original, cdrtools, makeWrapper }: { lib, symlinkJoin, k3b-original, cdrtools, makeWrapper }:
let let
binPath = lib.makeBinPath [ cdrtools ]; binPath = lib.makeBinPath [ cdrtools ];
in buildEnv { in symlinkJoin {
name = "k3b-${k3b-original.version}"; name = "k3b-${k3b-original.version}";
paths = [ k3b-original ]; paths = [ k3b-original ];
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];
postBuild = '' 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 \ wrapProgram $out/bin/k3b \
--prefix PATH ':' ${binPath} --prefix PATH ':' ${binPath}
''; '';