3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/go2nix/default.nix
Kamil Chmielewski 914e0e594c buildGoPackage: deps.json -> deps.nix in NIXON
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
2016-09-16 00:04:55 +01:00

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;
}