depot/third_party/nixpkgs/pkgs/build-support/dlang/dub-to-nix/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

26 lines
440 B
Nix

{
lib,
runCommand,
makeWrapper,
python3,
nix,
nix-prefetch-git,
}:
let
binPath = lib.makeBinPath [
nix
nix-prefetch-git
];
in
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 : ${binPath}
''