gomod2nix/default.nix
2021-01-12 17:55:00 +01:00

20 lines
487 B
Nix

{ buildGoApplication, lib, makeWrapper, nix-prefetch-git }:
buildGoApplication {
pname = "gomod2nix";
version = "0.1";
src = lib.cleanSourceWith {
filter = name: type: ! lib.hasSuffix "tests" name;
src = lib.cleanSource ./.;
};
modules = ./gomod2nix.toml;
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/gomod2nix --prefix PATH : ${lib.makeBinPath [ nix-prefetch-git ]}
rm -f $out/bin/builder
'';
}