vgo2nix: init at unstable-2018-10-14

This commit is contained in:
adisbladis 2018-10-22 15:43:49 +08:00
parent 5cd6c65054
commit 5f33fbbc7b
No known key found for this signature in database
GPG Key ID: ED58F95069B004F5
3 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,41 @@
{ stdenv
, lib
, buildGoPackage
, go
, makeWrapper
, nix-prefetch-git
, fetchFromGitHub
}:
buildGoPackage rec {
name = "vgo2nix-${version}";
version = "unstable-2018-10-14";
goPackagePath = "github.com/adisbladis/vgo2nix";
nativeBuildInputs = [ makeWrapper ];
src = fetchFromGitHub {
owner = "adisbladis";
repo = "vgo2nix";
rev = "a36137a2b9675f5e9b7e0a7840bc9fe9f2414d4e";
sha256 = "1658hr1535v8w3s41q0bcgk8hmisjn8gcw7i3n2d2igszn1dp0q4";
};
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 ];
};
}

12
pkgs/development/tools/vgo2nix/deps.nix generated Normal file
View File

@ -0,0 +1,12 @@
[
{
goPackagePath = "golang.org/x/tools";
fetch = {
type = "git";
url = "https://go.googlesource.com/tools";
rev = "ded554d0681e";
sha256 = "04rlq9hc3ccww9sbsrl48fl6wbjprb136rqxyr7dmgfj444aml56";
};
}
]

View File

@ -12907,6 +12907,8 @@ with pkgs;
leaps = callPackage ../development/tools/leaps { };
vgo2nix = callPackage ../development/tools/vgo2nix { };
ws = callPackage ../development/tools/ws { };
### DEVELOPMENT / JAVA MODULES