forked from mirrors/nixpkgs
914e0e594c
https://github.com/NixOS/nixpkgs/pull/17254#issuecomment-245295541 * update docs to describe `deps.nix` * include goDeps in nix-shell GOPATH * NixOS 16.09 rel notes about replacing goPackages
31 lines
700 B
Nix
31 lines
700 B
Nix
{ stdenv, buildGoPackage, go-bindata, goimports, nix-prefetch-git, git, makeWrapper,
|
|
fetchFromGitHub }:
|
|
|
|
buildGoPackage rec {
|
|
name = "go2nix-${version}";
|
|
version = "1.1.0";
|
|
rev = "v${version}";
|
|
|
|
goPackagePath = "github.com/kamilchm/go2nix";
|
|
|
|
src = fetchFromGitHub {
|
|
inherit rev;
|
|
owner = "kamilchm";
|
|
repo = "go2nix";
|
|
sha256 = "0asbbcyf1hh8khakych0y09rjarjiywr8pyy1v8ghpr1vvg43a09";
|
|
};
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
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;
|
|
}
|