about summary refs log tree commit diff
path: root/pkgs/build-support/dlang/dub-to-nix/default.nix
blob: 53a2e99c18df51a9bcb1327ef051bb368839318b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  lib,
  runCommand,
  makeWrapper,
  python3,
  nix,
}:

runCommand "dub-to-nix"
  {
    nativeBuildInputs = [ makeWrapper ];
    buildInputs = [ python3 ];
  }
  ''
    install -Dm755 ${./dub-to-nix.py} "$out/bin/dub-to-nix"
    patchShebangs "$out/bin/dub-to-nix"
    wrapProgram "$out/bin/dub-to-nix" \
        --prefix PATH : ${lib.makeBinPath [ nix ]}
  ''