2018-10-22 08:43:49 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildGoPackage
|
|
|
|
, go
|
|
|
|
, makeWrapper
|
|
|
|
, nix-prefetch-git
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
buildGoPackage {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "vgo2nix";
|
2019-03-12 10:37:09 +00:00
|
|
|
version = "unstable-2019-02-06";
|
2018-10-22 08:43:49 +01:00
|
|
|
goPackagePath = "github.com/adisbladis/vgo2nix";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "adisbladis";
|
|
|
|
repo = "vgo2nix";
|
2019-03-12 10:37:09 +00:00
|
|
|
rev = "f2694cd352830f0561bc00bbcaa08cefb2e36439";
|
|
|
|
sha256 = "10cwi67cyhqjq1pwhry2n1v8z7wybl4cawzmjmfgs5mbsvqp0h78";
|
2018-10-22 08:43:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
|
|
|
allowGoReference = true;
|
|
|
|
|
|
|
|
postInstall = with stdenv; let
|
|
|
|
binPath = lib.makeBinPath [ nix-prefetch-git go ];
|
|
|
|
in ''
|
|
|
|
wrapProgram $bin/bin/vgo2nix --prefix PATH : ${binPath}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Convert go.mod files to nixpkgs buildGoPackage compatible deps.nix files";
|
|
|
|
homepage = https://github.com/adisbladis/vgo2nix;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ adisbladis ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|