3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/go2nix/default.nix

38 lines
910 B
Nix
Raw Normal View History

2016-06-09 23:10:40 +01:00
{ stdenv, buildGoPackage, go-bindata, goimports, nix-prefetch-git, git, makeWrapper,
fetchFromGitHub }:
2016-06-05 15:41:51 +01:00
buildGoPackage rec {
name = "go2nix-${version}";
2016-09-27 03:25:45 +01:00
version = "1.1.1";
2016-06-09 23:10:40 +01:00
rev = "v${version}";
2016-06-05 15:41:51 +01:00
goPackagePath = "github.com/kamilchm/go2nix";
2016-06-09 23:10:40 +01:00
src = fetchFromGitHub {
2016-06-05 15:41:51 +01:00
inherit rev;
2016-06-09 23:10:40 +01:00
owner = "kamilchm";
repo = "go2nix";
2016-09-27 03:25:45 +01:00
sha256 = "1idxgn9yf8shw4mq4d7rhf8fvb2s1lli4r4ck0h8ddf1s9q8p63s";
2016-06-05 15:41:51 +01:00
};
goDeps = ./deps.nix;
2016-06-05 15:41:51 +01: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;
2016-09-27 03:25:45 +01:00
meta = with stdenv.lib; {
description = "Go apps packaging for Nix";
homepage = https://github.com/kamilchm/go2nix;
license = licenses.mit;
maintainers = with maintainers; [ kamilchm ];
};
2016-06-05 15:41:51 +01:00
}