brasero: move cdrtools dependency to a wrapper

This commit is contained in:
Nikolay Amiantov 2016-04-23 04:14:28 +03:00
parent e690c3a8dd
commit ef9175c5fb
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,23 @@
{ lib, buildEnv, brasero-original, cdrtools, makeWrapper }:
let
binPath = lib.makeBinPath [ cdrtools ];
in buildEnv {
name = "brasero-${brasero-original.version}";
paths = [ brasero-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 ${brasero-original}/bin/*; do
ln -s $i $out/bin
done
fi
wrapProgram $out/bin/brasero \
--prefix PATH ':' ${binPath}
'';
}

View File

@ -609,7 +609,9 @@ in
boxfs = callPackage ../tools/filesystems/boxfs { };
brasero = callPackage ../tools/cd-dvd/brasero { };
brasero-original = lowPrio (callPackage ../tools/cd-dvd/brasero { });
brasero = callPackage ../tools/cd-dvd/brasero/wrapper.nix { };
brltty = callPackage ../tools/misc/brltty {
alsaSupport = (!stdenv.isDarwin);