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";
|
2020-05-05 13:20:06 +01:00
|
|
|
version = "unstable-2020-05-05";
|
2018-10-22 08:43:49 +01:00
|
|
|
goPackagePath = "github.com/adisbladis/vgo2nix";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-05-05 13:20:06 +01:00
|
|
|
owner = "nix-community";
|
2018-10-22 08:43:49 +01:00
|
|
|
repo = "vgo2nix";
|
2020-05-05 13:20:06 +01:00
|
|
|
rev = "71e59bf268d5257a0f89b2f59cd20fd468c8c6ac";
|
|
|
|
sha256 = "1pcdkknq2v7nrs0siqcvvq2x0qqz5snwdz2lpjnad8i33rwhmayh";
|
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 ''
|
2020-04-28 02:50:57 +01:00
|
|
|
wrapProgram $out/bin/vgo2nix --prefix PATH : ${binPath}
|
2018-10-22 08:43:49 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Convert go.mod files to nixpkgs buildGoPackage compatible deps.nix files";
|
2020-05-05 13:20:06 +01:00
|
|
|
homepage = "https://github.com/nix-community/vgo2nix";
|
2018-10-22 08:43:49 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ adisbladis ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|