forked from mirrors/nixpkgs
42 lines
953 B
Nix
42 lines
953 B
Nix
{ 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 ];
|
|
};
|
|
|
|
}
|