diff --git a/pkgs/tools/cd-dvd/brasero/wrapper.nix b/pkgs/tools/cd-dvd/brasero/wrapper.nix new file mode 100644 index 000000000000..021e0da0e724 --- /dev/null +++ b/pkgs/tools/cd-dvd/brasero/wrapper.nix @@ -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} + ''; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9a7bffe73a5e..c75365bf8fd4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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);