2016-06-10 00:10:40 +02:00
|
|
|
{ stdenv, buildGoPackage, go-bindata, goimports, nix-prefetch-git, git, makeWrapper,
|
|
|
|
fetchFromGitHub }:
|
2016-06-05 16:41:51 +02:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "go2nix-${version}";
|
2016-06-10 00:10:40 +02:00
|
|
|
version = "0.1.0";
|
|
|
|
rev = "v${version}";
|
2016-06-05 16:41:51 +02:00
|
|
|
|
|
|
|
goPackagePath = "github.com/kamilchm/go2nix";
|
|
|
|
|
2016-06-10 00:10:40 +02:00
|
|
|
src = fetchFromGitHub {
|
2016-06-05 16:41:51 +02:00
|
|
|
inherit rev;
|
2016-06-10 00:10:40 +02:00
|
|
|
owner = "kamilchm";
|
|
|
|
repo = "go2nix";
|
|
|
|
sha256 = "10nz7gva3n6wk01wphrjjb31sy33kf9ji03zr849x21a669fnmjf";
|
2016-06-05 16:41:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
goDeps = ./deps.json;
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|