go2nix: extracted from goPackages
This commit is contained in:
32
pkgs/development/tools/go2nix/default.nix
Normal file
32
pkgs/development/tools/go2nix/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
# This file was generated by go2nix.
|
||||
{ stdenv, lib, goPackages, go-bindata, goimports, nix-prefetch-git, git, makeWrapper,
|
||||
fetchgit, fetchhg, fetchbzr, fetchsvn }:
|
||||
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "go2nix-${version}";
|
||||
version = "20160307-${stdenv.lib.strings.substring 0 7 rev}";
|
||||
rev = "4c552dadd855e3694ed3499feb46dca9cd855f60";
|
||||
|
||||
goPackagePath = "github.com/kamilchm/go2nix";
|
||||
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "https://github.com/kamilchm/go2nix";
|
||||
sha256 = "1pwnm1vrjxvgl17pk9n1k5chmhgwxkrwp2s1bzi64xf12anibj63";
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
11
pkgs/development/tools/go2nix/deps.json
Normal file
11
pkgs/development/tools/go2nix/deps.json
Normal file
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"include": "../../libs.json",
|
||||
"packages": [
|
||||
"github.com/alecthomas/template",
|
||||
"github.com/alecthomas/units",
|
||||
"gopkg.in/alecthomas/kingpin.v2",
|
||||
"github.com/Masterminds/vcs"
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user