2016-06-09 22:10:40 +00:00
|
|
|
{ stdenv, buildGoPackage, go-bindata, goimports, nix-prefetch-git, git, makeWrapper,
|
|
|
|
fetchFromGitHub }:
|
2016-06-05 14:41:51 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "go2nix-${version}";
|
2016-09-10 10:04:13 +00:00
|
|
|
version = "1.1.0";
|
2016-06-09 22:10:40 +00:00
|
|
|
rev = "v${version}";
|
2016-06-05 14:41:51 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/kamilchm/go2nix";
|
|
|
|
|
2016-06-09 22:10:40 +00:00
|
|
|
src = fetchFromGitHub {
|
2016-06-05 14:41:51 +00:00
|
|
|
inherit rev;
|
2016-06-09 22:10:40 +00:00
|
|
|
owner = "kamilchm";
|
|
|
|
repo = "go2nix";
|
2016-09-10 10:04:13 +00:00
|
|
|
sha256 = "0asbbcyf1hh8khakych0y09rjarjiywr8pyy1v8ghpr1vvg43a09";
|
2016-06-05 14:41:51 +00:00
|
|
|
};
|
|
|
|
|
2016-09-10 10:04:13 +00:00
|
|
|
goDeps = ./deps.nix;
|
2016-06-05 14:41:51 +00:00
|
|
|
|
|
|
|
buildInputs = [ go-bindata goimports makeWrapper ];
|
|
|
|
preBuild = ''go generate ./...'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $bin/bin/go2nix \
|
|
|
|
--prefix PATH : ${nix-prefetch-git}/bin \
|
|
|
|
--prefix PATH : ${git}/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
allowGoReference = true;
|
|
|
|
}
|