2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
runCommand,
|
|
|
|
makeWrapper,
|
|
|
|
python3,
|
|
|
|
nix,
|
2024-05-15 15:35:15 +00:00
|
|
|
nix-prefetch-git,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
let
|
|
|
|
binPath = lib.makeBinPath [
|
|
|
|
nix
|
|
|
|
nix-prefetch-git
|
|
|
|
];
|
|
|
|
in
|
2024-04-21 15:54:59 +00:00
|
|
|
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" \
|
2024-05-15 15:35:15 +00:00
|
|
|
--prefix PATH : ${binPath}
|
2024-04-21 15:54:59 +00:00
|
|
|
''
|