1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/vgo2nix/default.nix

42 lines
953 B
Nix
Raw Normal View History

2018-10-22 08:43:49 +01:00
{ stdenv
, lib
, buildGoPackage
, go
, makeWrapper
, nix-prefetch-git
, fetchFromGitHub
}:
buildGoPackage rec {
name = "vgo2nix-${version}";
version = "unstable-2019-02-01";
2018-10-22 08:43:49 +01:00
goPackagePath = "github.com/adisbladis/vgo2nix";
nativeBuildInputs = [ makeWrapper ];
src = fetchFromGitHub {
owner = "adisbladis";
repo = "vgo2nix";
rev = "8213e1ffe9e59b1f92df15a995eafd96b66da472";
sha256 = "1djwsw7zbprz4czaqsimpwccmmnk8wn38ksj7dis8xdvqrfy7h0g";
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 ];
};
}