2020-10-29 12:56:41 +00:00
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
2020-07-23 09:34:26 +00:00
|
|
|
|
2020-10-29 12:56:41 +00:00
|
|
|
let
|
|
|
|
buildGoApplication = pkgs.buildGoApplication or pkgs.callPackage ./builder { };
|
2020-07-23 09:34:26 +00:00
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
2020-10-29 12:56:41 +00:00
|
|
|
in buildGoApplication {
|
2020-07-23 09:34:26 +00:00
|
|
|
pname = "gomod2nix";
|
|
|
|
version = "0.1";
|
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
modules = ./gomod2nix.toml;
|
2020-07-24 09:37:14 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgs.makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/gomod2nix --prefix PATH : ${lib.makeBinPath [ pkgs.nix-prefetch-git ]}
|
|
|
|
rm -f $out/bin/builder
|
|
|
|
'';
|
2020-07-23 09:34:26 +00:00
|
|
|
}
|