depot/third_party/nixpkgs/pkgs/development/tools/vgo2nix/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

41 lines
941 B
Nix

{ stdenv
, lib
, buildGoPackage
, go
, makeWrapper
, nix-prefetch-git
, fetchFromGitHub
}:
buildGoPackage {
pname = "vgo2nix";
version = "unstable-2019-02-06";
goPackagePath = "github.com/adisbladis/vgo2nix";
nativeBuildInputs = [ makeWrapper ];
src = fetchFromGitHub {
owner = "adisbladis";
repo = "vgo2nix";
rev = "f2694cd352830f0561bc00bbcaa08cefb2e36439";
sha256 = "10cwi67cyhqjq1pwhry2n1v8z7wybl4cawzmjmfgs5mbsvqp0h78";
};
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 ];
};
}