summary refs log tree commit diff
path: root/pkgs/tools/cd-dvd/brasero/wrapper.nix
blob: 021e0da0e72490331854191ea7e00f9de98701fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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}
  '';
}