gomod2nix/default.nix

24 lines
524 B
Nix
Raw Normal View History

2022-05-28 13:50:18 +00:00
{ buildGoApplication, go, nix, lib, makeWrapper, nix-prefetch-git }:
2020-07-23 09:34:26 +00:00
buildGoApplication {
2022-05-28 13:50:18 +00:00
inherit go;
2020-07-23 09:34:26 +00:00
pname = "gomod2nix";
version = "0.1";
2021-01-12 16:55:00 +00:00
src = lib.cleanSourceWith {
filter = name: type: ! lib.hasSuffix "tests" name;
src = lib.cleanSource ./.;
};
2020-07-23 09:34:26 +00:00
modules = ./gomod2nix.toml;
2020-07-24 09:37:14 +00:00
2022-05-28 13:50:18 +00:00
allowGoReference = true;
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
2020-07-24 09:37:14 +00:00
postInstall = ''
2022-05-28 13:50:18 +00:00
wrapProgram $out/bin/gomod2nix --prefix PATH : ${lib.makeBinPath [ go ]}
2020-07-24 09:37:14 +00:00
rm -f $out/bin/builder
'';
2020-07-23 09:34:26 +00:00
}