Merge pull request #6119 from lethalman/go

Go packages, buildGoPackage
This commit is contained in:
lethalman 2015-02-07 21:30:30 +01:00
commit 8b236f2daf
38 changed files with 1211 additions and 1222 deletions

View File

@ -624,6 +624,85 @@ sed -i '/ = data_files/d' setup.py</programlisting>
<section xml:id="ssec-language-go"><title>Go</title>
<para>The function <varname>buildGoPackage</varname> builds
standard Go packages.
</para>
<example xml:id='ex-buildGoPackage'><title>buildGoPackage</title>
<programlisting>
net = buildGoPackage rec {
name = "go.net-${rev}";
goPackagePath = "code.google.com/p/go.net"; <co xml:id='ex-buildGoPackage-1' />
subPackages = [ "ipv4" "ipv6" ]; <co xml:id='ex-buildGoPackage-2' />
rev = "28ff664507e4";
src = fetchhg {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "1lkz4c9pyz3yz2yz18hiycvlfhgy3jxp68bs7mv7bcfpaj729qav";
};
propagatedBuildInputs = [ goPackages.text ]; <co xml:id='ex-buildGoPackage-3' />
};
</programlisting>
</example>
<para><xref linkend='ex-buildGoPackage'/> is an example expression using buildGoPackage,
the following arguments are of special significance to the function:
<calloutlist>
<callout arearefs='ex-buildGoPackage-1'>
<para>
<varname>goPackagePath</varname> specifies the package's canonical Go import path.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-2'>
<para>
<varname>subPackages</varname> limits the builder from building child packages that
have not been listed. If <varname>subPackages</varname> is not specified, all child
packages will be built.
</para>
<para>
In this example only <literal>code.google.com/p/go.net/ipv4</literal> and
<literal>code.google.com/p/go.net/ipv4</literal> will be built.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-3'>
<para>
<varname>propagatedBuildInputs</varname> is where the dependencies of a Go library are
listed. Only libraries should list <varname>propagatedBuildInputs</varname>. If a standalone
program is being build instead, use <varname>buildInputs</varname>. If a library's tests require
additional dependencies that are not propagated, they should be listed in <varname>buildInputs</varname>.
</para>
</callout>
</calloutlist>
</para>
<para>
Reusable Go libraries may be found in the <varname>goPackages</varname> set. You can test
build a Go package as follows:
<screen>
$ nix-build -A goPackages.net
</screen>
</para>
<para>
You may use Go packages installed into the active Nix profiles by adding
the following to your ~/.bashrc:
<screen>
for p in $NIX_PROFILES; do
GOPATH="$p/share/go:$GOPATH"
done
</screen>
</para>
<para>To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/cstrahan/go2nix">go2nix</link>.</para>
</section>

View File

@ -1,26 +1,24 @@
{ stdenv, lib, fetchgit, fetchhg, go_1_3, trousers }:
{ lib, goPackages, fetchgit, trousers }:
let deps = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg;
};
with goPackages;
in stdenv.mkDerivation rec {
name = "pond";
buildGoPackage rec {
rev = "f4e441c77a2039814046ff8219629c547fe8b689";
name = "pond-${lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/agl/pond";
src = fetchgit {
inherit rev;
url = "git://github.com/agl/pond.git";
sha256 = "f2dfc6cb96cc4b8ae732e41d1958b62036f40cb346df2e14f27b5964a1416026";
};
buildInputs = [ go_1_3 trousers ];
subPackages = [ "client" ];
unpackPhase = ''
export GOPATH=$PWD
echo $PWD
cp -LR ${deps}/src src
chmod u+w -R src
'';
buildInputs = [ trousers net crypto protobuf ed25519 ];
buildFlags = "--tags nogui";
installPhase = ''
export GOPATH="$PWD"
mkdir -p $out/bin
go build --tags nogui -v -o $out/bin/pond-cli github.com/agl/pond/client
'';
dontInstallSrc = true;
meta = with lib; {
description = "Forward secure, asynchronous messaging for the discerning";

View File

@ -1,60 +0,0 @@
# This file was generated by go2nix.
{ stdenv, lib, fetchgit, fetchhg}:
let
goDeps = [
{
root = "github.com/agl/pond";
src = fetchgit {
url = "git://github.com/agl/pond.git";
rev = "f4e441c77a2039814046ff8219629c547fe8b689";
sha256 = "f2dfc6cb96cc4b8ae732e41d1958b62036f40cb346df2e14f27b5964a1416026";
};
}
{
root = "github.com/agl/ed25519";
src = fetchgit {
url = "git://github.com/agl/ed25519.git";
rev = "d2b94fd789ea21d12fac1a4443dd3a3f79cda72c";
sha256 = "83e3010509805d1d315c7aa85a356fda69d91b51ff99ed98a503d63adb3613e9";
};
}
{
root = "code.google.com/p/go.crypto";
src = fetchhg {
url = "https://code.google.com/p/go.crypto";
rev = "31393df5baea";
sha256 = "0b95dpsvxxapcjjvhj05fdmyn0mzffamc25hvxy7xgsl2l9yy3nw";
};
}
{
root = "code.google.com/p/go.net";
src = fetchhg {
url = "https://code.google.com/p/go.net";
rev = "90e232e2462d";
sha256 = "0hqvkaa0rbxwbi74xa6aqbkf63zk662x5hp3bp8vbhzkc4yl1h59";
};
}
{
root = "code.google.com/p/goprotobuf";
src = fetchhg {
url = "https://code.google.com/p/goprotobuf";
rev = "36be16571e14";
sha256 = "14yay2sgfbbs0bx3q03bdqn1kivyvxfdm34rmp2612gvinlll215";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,40 +1,32 @@
{ stdenv, fetchgit, go }:
{ lib, fetchgit, goPackages }:
stdenv.mkDerivation rec {
with goPackages;
buildGoPackage rec {
name = "syncthing-${version}";
version = "0.10.21";
goPackagePath = "github.com/syncthing/syncthing";
src = fetchgit {
url = "git://github.com/syncthing/syncthing.git";
rev = "refs/tags/v${version}";
sha256 = "60cd8607cf7d2837252680f6c2879aba1f35a2c74a47c2f2ea874d6eed2adaa5";
};
buildInputs = [ go ];
subPackages = [ "cmd/syncthing" ];
buildPhase = ''
mkdir -p "./dependencies/src/github.com/syncthing/syncthing"
cp -r internal "./dependencies/src/github.com/syncthing/syncthing"
buildFlagsArray = "-ldflags=-w -X main.Version v${version}";
export GOPATH="`pwd`/Godeps/_workspace:`pwd`/dependencies"
preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
go run build.go test
doCheck = true;
mkdir ./bin
go build -o ./bin/syncthing -ldflags "-w -X main.Version v${version}" ./cmd/syncthing
'';
installPhase = ''
mkdir -p $out/bin
cp -r ./bin $out
'';
dontInstallSrc = true;
meta = {
homepage = http://syncthing.net/;
description = "Replaces Dropbox and BitTorrent Sync with something open, trustworthy and decentralized";
license = with stdenv.lib.licenses; mit;
maintainers = with stdenv.lib.maintainers; [ matejc ];
platforms = with stdenv.lib.platforms; linux;
license = with lib.licenses; mit;
maintainers = with lib.maintainers; [ matejc ];
platforms = with lib.platforms; linux;
};
}

View File

@ -81,6 +81,7 @@ stdenv.mkDerivation {
installPhase = ''
export CC=cc
mkdir -p "$out/bin"
unset GOPATH
export GOROOT="$(pwd)/"
export GOBIN="$out/bin"
export PATH="$GOBIN:$PATH"
@ -99,6 +100,8 @@ stdenv.mkDerivation {
cp ./misc/emacs/* $out/share/emacs/site-lisp/
'';
setupHook = ./setup-hook.sh;
meta = {
homepage = http://golang.org/;
description = "The Go Programming language";

View File

@ -95,6 +95,8 @@ stdenv.mkDerivation {
go test -v $TOOL_ROOT/cover $TOOL_ROOT/vet # $TOOL_ROOT/godoc
'';
setupHook = ./setup-hook.sh;
meta = {
homepage = http://golang.org/;
description = "The Go Programming language";

View File

@ -1,49 +1,23 @@
{ stdenv, lib, go_1_3, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/mitchellh/gox";
src = fetchFromGitHub {
owner = "mitchellh";
repo = "gox";
rev = "c7329055e2aeb253a947e5cc876586ff4ca19199";
sha256 = "0zhb88jjxqn3sdc4bpzvajqvgi9igp5gk03q12gaksaxhy2wl4jy";
};
}
{
root = "github.com/mitchellh/iochan";
src = fetchFromGitHub {
owner = "mitchellh";
repo = "iochan";
rev = "b584a329b193e206025682ae6c10cdbe03b0cd77";
sha256 = "1fcwdhfci41ibpng2j4c1bqfng578cwzb3c00yw1lnbwwhaq9r6b";
};
}
];
sources = stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
with goPackages;
buildGoPackage rec {
rev = "c7329055e2aeb253a947e5cc876586ff4ca19199";
name = "gox-${lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/mitchellh/gox";
src = fetchFromGitHub {
inherit rev;
owner = "mitchellh";
repo = "gox";
sha256 = "0zhb88jjxqn3sdc4bpzvajqvgi9igp5gk03q12gaksaxhy2wl4jy";
};
in
stdenv.mkDerivation rec {
name = "gox";
buildInputs = [ iochan ];
src = sources;
propagatedBuildInputs = [ go ];
propagatedBuildInputs = [ go_1_3 ];
installPhase = ''
mkdir -p $out/bin
export GOPATH=$src
go build -v -o $out/bin/gox github.com/mitchellh/gox
'';
dontInstallSrc = true;
meta = with lib; {
description = "A simple, no-frills tool for Go cross compilation that behaves a lot like standard go build";

View File

@ -0,0 +1,5 @@
addToGoPath() {
addToSearchPath GOPATH $1/share/go
}
envHooks=(${envHooks[@]} addToGoPath)

View File

@ -0,0 +1,88 @@
{ go }:
{ name, buildInputs ? []
# Go import path of the package
, goPackagePath
, meta ? {}, ... } @ args:
go.stdenv.mkDerivation ( args // {
name = "${go.name}-${name}";
buildInputs = [ go ] ++ buildInputs;
configurePhase = args.configurePhase or ''
runHook preConfigure
cd "$NIX_BUILD_TOP"
mkdir -p "go/src/$(dirname "$goPackagePath")"
mv "$sourceRoot" "go/src/$goPackagePath"
GOPATH=$NIX_BUILD_TOP/go:$GOPATH
runHook postConfigure
'';
buildPhase = args.buildPhase or ''
runHook preBuild
if [ -n "$subPackages" ] ; then
for p in $subPackages ; do
go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $goPackagePath/$p
done
else
find . -type d | while read d; do
for i in $d/*.go; do
go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $d
break
done
done
fi
runHook postBuild
'';
checkPhase = args.checkPhase or ''
runHook preCheck
if [ -n "$subPackages" ] ; then
for p in $subPackages ; do
go test -p $NIX_BUILD_CORES -v $goPackagePath/$p
done
else
find . -type d | while read d; do
for i in $d/*_test.go; do
go test -p $NIX_BUILD_CORES -v $d
break
done
done
fi
runHook postCheck
'';
installPhase = args.installPhase or ''
runHook preInstall
mkdir $out
if [ -z "$dontInstallSrc" ]; then
local dir
for d in pkg src; do
mkdir -p $out/share/go
dir="$NIX_BUILD_TOP/go/$d"
[ -e "$dir" ] && cp -r $dir $out/share/go
done
fi
dir="$NIX_BUILD_TOP/go/bin"
[ -e "$dir" ] && cp -r $dir $out
runHook postInstall
'';
meta = meta // {
# add an extra maintainer to every package
maintainers = (meta.maintainers or []) ++ [ go.stdenv.lib.maintainers.emery ];
};
})

View File

@ -1,26 +1,21 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
stdenv.mkDerivation rec {
with goPackages;
buildGoPackage rec {
version = "0.4.5";
name = "etcdctl-${version}";
src = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
goPackagePath = "github.com/coreos/etcdctl";
src = fetchFromGitHub {
owner = "coreos";
repo = "etcdctl";
rev = "v${version}";
sha256 = "1kbri59ppil52v7s992q8r6i1zk9lac0s2w00z2lsgc9w1z59qs0";
};
buildInputs = [ go ];
dontInstallSrc = true;
buildPhase = ''
export GOPATH=$src
go build -v -o etcdctl github.com/coreos/etcdctl
'';
installPhase = ''
mkdir -p $out/bin
mv etcdctl $out/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A simple command line client for etcd";
homepage = http://coreos.com/using-coreos/etcd/;
license = licenses.asl20;

View File

@ -1,27 +0,0 @@
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/coreos/etcdctl";
src = fetchFromGitHub {
owner = "coreos";
repo = "etcdctl";
rev = "a1b38c93245542e340971189750baef7a55d306e";
sha256 = "1kbri59ppil52v7s992q8r6i1zk9lac0s2w00z2lsgc9w1z59qs0";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,23 +1,21 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "gocode";
with goPackages;
src = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
buildGoPackage rec {
rev = "9b760fdb16f18eafbe0cd274527efd2bd89dfa78";
name = "gocode-${lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/nsf/gocode";
src = fetchFromGitHub {
inherit rev;
owner = "nsf";
repo = "gocode";
sha256 = "0d1wl0x8jkaav6lcfzs70cr6gy0p88cbk5n3p19l6d0h9xz464ax";
};
buildInputs = [ go ];
subPackages = [ "./" ];
buildPhase = ''
export GOPATH=$src
go build -v -o gocode github.com/nsf/gocode
'';
installPhase = ''
mkdir -p $out/bin
mv gocode $out/bin
'';
dontInstallSrc = true;
meta = with lib; {
description = "An autocompletion daemon for the Go programming language";

View File

@ -1,27 +0,0 @@
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/nsf/gocode";
src = fetchFromGitHub {
owner = "nsf";
repo = "gocode";
rev = "9b760fdb16f18eafbe0cd274527efd2bd89dfa78";
sha256 = "0d1wl0x8jkaav6lcfzs70cr6gy0p88cbk5n3p19l6d0h9xz464ax";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,23 +1,22 @@
{ stdenv, lib, go_1_3, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "golint";
with goPackages;
src = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
buildGoPackage rec {
rev = "8ca23475bcb43213a55dd8210b69363f6b0e09c1";
name = "golint-${lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/golang/lint";
src = fetchFromGitHub {
inherit rev;
owner = "golang";
repo = "lint";
sha256 = "16wbykik6dw3x9s7iqi4ln8kvzsh3g621wb8mk4nfldw7lyqp3cs";
};
buildInputs = [ go_1_3 ];
subPackages = [ "golint" ];
buildPhase = ''
export GOPATH=$src
go build -v -o lint github.com/golang/lint/golint
'';
installPhase = ''
mkdir -p $out/bin
mv lint $out/bin/golint
'';
dontInstallSrc = true;
meta = with lib; {
description = "Linter for Go source code";

View File

@ -1,27 +0,0 @@
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/golang/lint";
src = fetchFromGitHub {
owner = "golang";
repo = "lint";
rev = "8ca23475bcb43213a55dd8210b69363f6b0e09c1";
sha256 = "16wbykik6dw3x9s7iqi4ln8kvzsh3g621wb8mk4nfldw7lyqp3cs";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,23 +1,21 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "gotags";
with goPackages;
src = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
buildGoPackage rec {
rev = "a60c6a1b171faedc44354bd437d965e5e3bdc220";
name = "gotags-${lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/jstemmer/gotags";
src = fetchFromGitHub {
inherit rev;
owner = "jstemmer";
repo = "gotags";
sha256 = "1drbypby0isdmkq44jmlv59k3jrwvq2jciaccxx2qc2nnx444fkq";
};
buildInputs = [ go ];
buildPhase = ''
export GOPATH=$src
go build -v -o gotags github.com/jstemmer/gotags
'';
installPhase = ''
mkdir -p $out/bin
mv gotags $out/bin
'';
dontInstallSrc = true;
meta = with lib; {
description = "Ctags-compatible tag generator for Go";

View File

@ -1,27 +0,0 @@
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/jstemmer/gotags";
src = fetchFromGitHub {
owner = "jstemmer";
repo = "gotags";
rev = "a60c6a1b171faedc44354bd437d965e5e3bdc220";
sha256 = "1drbypby0isdmkq44jmlv59k3jrwvq2jciaccxx2qc2nnx444fkq";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,28 +1,21 @@
{ stdenv, lib, go, fetchgit, fetchhg, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
let
version = "0.0.1";
in
with lib;
stdenv.mkDerivation {
with lib; with goPackages;
buildGoPackage rec {
name = "go-repo-root-${version}";
src = import ./deps.nix {
inherit stdenv lib fetchhg fetchFromGitHub;
goPackagePath = "github.com/cstrahan/go-repo-root";
src = fetchFromGitHub {
owner = "cstrahan";
repo = "go-repo-root";
rev = "90041e5c7dc634651549f96814a452f4e0e680f9";
sha256 = "1rlzp8kjv0a3dnfhyqcggny0ad648j5csr2x0siq5prahlp48mg4";
};
buildInputs = [ go ];
buildPhase = ''
export GOPATH=$src
go build -v -o go-repo-root github.com/cstrahan/go-repo-root
'';
installPhase = ''
mkdir -p $out/bin
cp go-repo-root $out/bin
'';
buildInputs = [ tools ];
meta = with lib; {
homepage = "https://github.com/cstrahan/go-repo-root";

View File

@ -1,67 +0,0 @@
{ stdenv, lib, fetchFromGitHub, fetchhg }:
let
goDeps = [
{
root = "code.google.com/p/go.net";
src = fetchhg {
url = "http://code.google.com/p/go.net";
rev = "ad01a6fcc8a19d3a4478c836895ffe883bd2ceab";
sha256 = "0s0aa8hxrpggn6wwx4x591k6abvawrmhsk8ji327pgj08fdy3ahq";
};
}
{
root = "code.google.com/p/go.text";
src = fetchhg {
url = "http://code.google.com/p/go.text";
rev = "12288f41f508af9490f03a9780afa295c9b0a063";
sha256 = "17kr0h79pznb3nn5znbh1d7dinmqjwvg5iqqk4l05569q50gqwww";
};
}
{
root = "code.google.com/p/go.tools";
src = fetchhg {
url = "http://code.google.com/p/go.tools";
rev = "140fcaadc5860b1a014ec69fdeec807fe3b787e8";
sha256 = "1vgz4kxy0p56qh6pfbs2c68156hakgx4cmrci9jbg7lnrdaz4y56";
};
}
{
root = "code.google.com/p/goauth2";
src = fetchhg {
url = "http://code.google.com/p/goauth2";
rev = "afe77d958c701557ec5dc56f6936fcc194d15520";
sha256 = "0xgkgcb97hv2rvzvh21rvydq5cc83j7sdsdb1chrymq8k7l4dzc1";
};
}
{
root = "code.google.com/p/google-api-go-client";
src = fetchhg {
url = "http://code.google.com/p/google-api-go-client";
rev = "e1c259484b495133836706f46319f5897f1e9bf6";
sha256 = "051dqhjhp3bz2xp7lv9v60xlmphbxj1vyc46wg8v74yjvqvsiwzd";
};
}
{
root = "github.com/cstrahan/go-repo-root";
src = fetchFromGitHub {
owner = "cstrahan";
repo = "go-repo-root";
rev = "90041e5c7dc634651549f96814a452f4e0e680f9";
sha256 = "1rlzp8kjv0a3dnfhyqcggny0ad648j5csr2x0siq5prahlp48mg4";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,26 +1,23 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
stdenv.mkDerivation rec {
version = "2.0.0-rc.1";
with goPackages;
buildGoPackage rec {
version = "2.0.0";
name = "etcd-${version}";
src = import ./deps.nix {
inherit stdenv lib fetchFromGitHub;
goPackagePath = "github.com/coreos/etcd";
src = fetchFromGitHub {
owner = "coreos";
repo = "etcd";
rev = "v${version}";
sha256 = "1s3jilzlqyh2i81pv79cgap6dfj7qrfrwcv4w9lic5ivznz413vc";
};
buildInputs = [ go ];
subPackages = [ "./" ];
buildPhase = ''
export GOPATH=$src
go build -v -o etcd github.com/coreos/etcd
'';
dontInstallSrc = true;
installPhase = ''
mkdir -p $out/bin
mv etcd $out/bin/etcd
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A highly-available key value store for shared configuration and service discovery";
homepage = http://coreos.com/using-coreos/etcd/;
license = licenses.asl20;

View File

@ -1,28 +0,0 @@
# This file was generated by go2nix.
{ stdenv, lib, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/coreos/etcd";
src = fetchFromGitHub {
owner = "coreos";
repo = "etcd";
rev = "221abdcb3b755b36d1e7d70149f6de3450351619";
sha256 = "1wkd238ap9gp5irrb3f6nnh83rzizwfrfac76j0dvqdka35l247k";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,29 +1,20 @@
{ stdenv, fetchurl, go }:
stdenv.mkDerivation rec {
name = "bosun-${version}";
version = "20141215200935";
src = fetchurl {
url = "https://github.com/bosun-monitor/bosun/archive/${version}.tar.gz";
sha256 = "1py4plx5wi4mp05g4c1aa1wa8ny538kp2p4fzhalz33zm2qxbbx9";
{ lib, fetchFromGitHub, goPackages }:
with goPackages;
buildGoPackage rec {
rev = "20150202222550";
name = "bosun-${rev}";
goPackagePath = "bosun.org";
src = fetchFromGitHub {
inherit rev;
owner = "bosun-monitor";
repo = "bosun";
sha256 = "0xrnyq85nxj6rddrhd19r2bz59pzxci6bnjh61j4z8hd6ryp8j2c";
};
buildInputs = [ go ];
subPackages = [ "cmd/bosun" ];
sourceRoot = ".";
buildPhase = ''
mkdir -p src
mv bosun-${version} src/bosun.org
export GOPATH=$PWD
go build -v -o bosun src/bosun.org/cmd/bosun/main.go
'';
installPhase = ''
mkdir -p $out/bin
cp bosun $out/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Time series alerting framework";
longDescription = ''
An advanced, open-source monitoring and alerting system by Stack Exchange.

View File

@ -1,32 +1,23 @@
{ stdenv, fetchurl, go }:
stdenv.mkDerivation rec {
name = "scollector-${version}";
version = "20141204222654";
src = fetchurl {
url = "https://github.com/bosun-monitor/bosun/archive/${version}.tar.gz";
sha256 = "1jwhfwf24zhncrirna3q1vhap4f955bqx3sws3ryk5gp1w99l36n";
{ lib, fetchFromGitHub, goPackages }:
with goPackages;
buildGoPackage rec {
rev = "20150202222550";
name = "bosun-${rev}";
goPackagePath = "bosun.org";
src = fetchFromGitHub {
inherit rev;
owner = "bosun-monitor";
repo = "bosun";
sha256 = "0xrnyq85nxj6rddrhd19r2bz59pzxci6bnjh61j4z8hd6ryp8j2c";
};
buildInputs = [ go ];
subPackages = [ "cmd/scollector" ];
sourceRoot = ".";
buildPhase = ''
mkdir -p src
mv bosun-${version} src/bosun.org
export GOPATH=$PWD
go build -v -o scollector src/bosun.org/cmd/scollector/main.go
'';
installPhase = ''
mkdir -p $out/bin
cp scollector $out/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Collect system information and store it in OpenTSDB or Bosun";
homepage = http://bosun.org/scollector;
license = licenses.mit;
platforms = stdenv.lib.platforms.linux;
platforms = platforms.linux;
};
}

View File

@ -1,28 +1,22 @@
{ stdenv, lib, go, fetchgit }:
{ lib, goPackages, fetchgit }:
stdenv.mkDerivation rec {
version = "4556edb";
name = "influxdb-backup-${version}";
with goPackages;
src = import ./deps.nix {
inherit stdenv lib fetchgit;
buildGoPackage rec {
rev = "4556edbffa914a8c17fa1fa1564962a33c6c7596";
name = "influxdb-backup-${lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/eckardt/influxdb-backup";
src = fetchgit {
inherit rev;
url = https://github.com/eckardt/influxdb-backup.git;
sha256 = "2928063e6dfe4be7b69c8e72e4d6a5fc557f0c75e9625fadf607d59b8e80e34b";
};
buildInputs = [ go ];
subPackages = [ "influxdb-dump" "influxdb-restore" ];
buildPhase = ''
export GOPATH=$src
go build -v -o influxdb-dump github.com/eckardt/influxdb-backup/influxdb-dump
go build -v -o influxdb-restore github.com/eckardt/influxdb-backup/influxdb-restore
'';
buildInputs = [ eckardt.influxdb-go ];
installPhase = ''
mkdir -p $out/bin
mv influxdb-dump $out/bin
mv influxdb-restore $out/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Backup and Restore for InfluxDB";
homepage = https://github.com/eckardt/influxdb-backup;
maintainers = with maintainers; [ offline ];

View File

@ -1,35 +0,0 @@
# This file was generated by go2nix.
{ stdenv, lib, fetchgit }:
let
goDeps = [
{
root = "github.com/eckardt/influxdb-backup";
src = fetchgit {
url = https://github.com/eckardt/influxdb-backup.git;
rev = "4556edbffa914a8c17fa1fa1564962a33c6c7596";
sha256 = "2928063e6dfe4be7b69c8e72e4d6a5fc557f0c75e9625fadf607d59b8e80e34b";
};
}
{
root = "github.com/eckardt/influxdb-go";
src = fetchgit {
url = https://github.com/eckardt/influxdb-go.git;
rev = "8b71952efc257237e077c5d0672e936713bad38f";
sha256 = "5318c7e1131ba2330c90a1b67855209e41d3c77811b1d212a96525b42d391f6e";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,33 +1,28 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
{ lib, goPackages, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
stdenv.mkDerivation rec {
with goPackages;
buildGoPackage rec {
version = "0.2.28";
name = "nsq-${version}";
src = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
goPackagePath = "github.com/bitly/nsq";
src = fetchFromGitHub {
owner = "bitly";
repo = "nsq";
rev = "v${version}";
sha256 = "0drmf1j5w3q4l6f7xjy3y7d7cl50gcx0qwci6mahxsyaaclx60yx";
};
buildInputs = [ go ];
subPackages = [ "nsqadmin" ] ++
map (x: "apps/"+x) [ "nsq_pubsub" "nsq_stat" "nsq_tail"
"nsq_to_file" "nsq_to_http" "nsq_to_nsq"
"nsqd" "nsqlookupd" ];
buildPhase = ''
export GOPATH=$src
apps=(nsq_pubsub nsq_stat nsq_tail nsq_to_file nsq_to_http nsq_to_nsq nsqd nsqlookupd)
buildInputs = [ go-nsq go-options toml perks go-hostpool ];
mkdir build
dontInstallSrc = true;
go build -v -o build/nsqadmin github.com/bitly/nsq/nsqadmin
for app in "''${apps[@]}"; do
go build -v -o build/$app github.com/bitly/nsq/apps/$app
done
'';
installPhase = ''
mkdir -p $out/bin
mv build/* $out/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A realtime distributed messaging platform";
homepage = http://nsq.io/;
license = licenses.mit;

View File

@ -1,134 +0,0 @@
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
let
goDeps = [
{
root = "code.google.com/p/snappy-go";
src = fetchhg {
url = "http://code.google.com/p/snappy-go";
rev = "14";
sha256 = "0ywa52kcii8g2a9lbqcx8ghdf6y56lqq96sl5nl9p6h74rdvmjr7";
};
}
{
root = "github.com/BurntSushi/toml";
src = fetchFromGitHub {
owner = "BurntSushi";
repo = "toml";
rev = "f87ce853111478914f0bcffa34d43a93643e6eda";
sha256 = "0g8203y9ycf34j2q3ymxb8nh4habgwdrjn9vdgrginllx73yq565";
};
}
{
root = "github.com/bitly/go-hostpool";
src = fetchFromGitHub {
owner = "bitly";
repo = "go-hostpool";
rev = "fed86fae5cacdc77e7399937e2f8836563620a2e";
sha256 = "0nbssfp5ksj4hhc0d8lfq54afd9nqv6qzk3vi6rinxr3fgplrj44";
};
}
{
root = "github.com/bitly/go-nsq";
src = fetchFromGitHub {
owner = "bitly";
repo = "go-nsq";
rev = "c79a282f05364e340eadc2ce2f862a3d44eea9c0";
sha256 = "19jlwj5419p5xwjzfnzlddjnbh5g7ifnqhd00i5p0b6ww1gk011p";
};
}
{
root = "github.com/bitly/go-simplejson";
src = fetchFromGitHub {
owner = "bitly";
repo = "go-simplejson";
rev = "1cfceb0e12f47ec02665ef480212d7b531d6f4c5";
sha256 = "1d8x0himl58qn87lv418djy6mbs66p9ai3zpqq13nhkfl67fj3bi";
};
}
{
root = "github.com/bitly/nsq";
src = fetchFromGitHub {
owner = "bitly";
repo = "nsq";
rev = "048691a8242c9ec224fc46bf7d05f321026b69f8";
sha256 = "0drmf1j5w3q4l6f7xjy3y7d7cl50gcx0qwci6mahxsyaaclx60yx";
};
}
{
root = "github.com/bmizerany/assert";
src = fetchFromGitHub {
owner = "bmizerany";
repo = "assert";
rev = "e17e99893cb6509f428e1728281c2ad60a6b31e3";
sha256 = "1lfrvqqmb09y6pcr76yjv4r84cshkd4s7fpmiy7268kfi2cvqnpc";
};
}
{
root = "github.com/bmizerany/perks";
src = fetchFromGitHub {
owner = "bmizerany";
repo = "perks";
rev = "aac9e2eab5a334037057336897fd10b0289a5ae8";
sha256 = "1d027jgc327qz5xmal0hrpqvsj45i9yqmm9pxk3xp3hancvz3l3k";
};
}
{
root = "github.com/kr/pretty";
src = fetchFromGitHub {
owner = "kr";
repo = "pretty";
rev = "bc9499caa0f45ee5edb2f0209fbd61fbf3d9018f";
sha256 = "1m61y592qsnwsqn76v54mm6h2pcvh4wlzbzscc1ag645x0j33vvl";
};
}
{
root = "github.com/kr/pty";
src = fetchFromGitHub {
owner = "kr";
repo = "pty";
rev = "67e2db24c831afa6c64fc17b4a143390674365ef";
sha256 = "1l3z3wbb112ar9br44m8g838z0pq2gfxcp5s3ka0xvm1hjvanw2d";
};
}
{
root = "github.com/kr/text";
src = fetchFromGitHub {
owner = "kr";
repo = "text";
rev = "6807e777504f54ad073ecef66747de158294b639";
sha256 = "1wkszsg08zar3wgspl9sc8bdsngiwdqmg3ws4y0bh02sjx5a4698";
};
}
{
root = "github.com/mreiferson/go-options";
src = fetchFromGitHub {
owner = "mreiferson";
repo = "go-options";
rev = "896a539cd709f4f39d787562d1583c016ce7517e";
sha256 = "0hg0n5grcjcj5719rqchz0plp39wfk3znqxw8y354k4jwsqwmn17";
};
}
{
root = "github.com/mreiferson/go-snappystream";
src = fetchFromGitHub {
owner = "mreiferson";
repo = "go-snappystream";
rev = "97c96e6648e99c2ce4fe7d169aa3f7368204e04d";
sha256 = "08ylvx9r6b1fi76v6cqjvny4yqsvcqjfsg93jdrgs7hi4mxvxynn";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,26 +1,24 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
stdenv.mkDerivation rec {
with goPackages;
buildGoPackage rec {
version = "0.6.3";
name = "serfdom-${version}";
goPackagePath = "github.com/hashicorp/serf";
src = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
src = fetchFromGitHub {
owner = "hashicorp";
repo = "serf";
rev = "v${version}";
sha256 = "0ck77ji28bvm4ahzxyyi4sm17c3fxc16k0k5mihl1nlkgdd73m8y";
};
buildInputs = [ go ];
buildInputs = [ cli mapstructure memberlist logutils go-syslog mdns columnize circbuf ];
buildPhase = ''
export GOPATH=$src
go build -v -o serf github.com/hashicorp/serf
'';
dontInstallSrc = true;
installPhase = ''
mkdir -p $out/bin
mv serf $out/bin/serf
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "A service discovery and orchestration tool that is decentralized, highly available, and fault tolerant";
homepage = http://www.serfdom.io/;
license = licenses.mpl20;

View File

@ -1,185 +0,0 @@
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
let
goDeps = [
{
root = "code.google.com/p/go.net";
src = fetchhg {
url = "http://code.google.com/p/go.net";
rev = "134";
sha256 = "1jycpgrfwgkfac60zjbx6babcz7sgyn9xgy6cr3l811j6k8r2pbv";
};
}
{
root = "code.google.com/p/go.text";
src = fetchhg {
url = "http://code.google.com/p/go.text";
rev = "85";
sha256 = "1x8h6vq9g5gbi7iiwla6dkaaqqf7wmkdm4szj7wvzlsijf2x8dwr";
};
}
{
root = "github.com/armon/circbuf";
src = fetchFromGitHub {
owner = "armon";
repo = "circbuf";
rev = "f092b4f207b6e5cce0569056fba9e1a2735cb6cf";
sha256 = "06kwwdwa3hskdh6ws7clj1vim80dyc3ldim8k9y5qpd30x0avn5s";
};
}
{
root = "github.com/armon/go-metrics";
src = fetchFromGitHub {
owner = "armon";
repo = "go-metrics";
rev = "02567bbc4f518a43853d262b651a3c8257c3f141";
sha256 = "08fk3zmw0ywmdfp2qhrpv0vrk1y97hzqczrgr3y2yip3x8sr37ar";
};
}
{
root = "github.com/armon/mdns";
src = fetchFromGitHub {
owner = "armon";
repo = "mdns";
rev = "70462deb060d44247356ee238ebafd7699ddcffe";
sha256 = "0xkm3d0hsixdm1yrkx9c39723kfjkb3wvrzrmx3np9ylcwn6h5p5";
};
}
{
root = "github.com/hashicorp/go-syslog";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "go-syslog";
rev = "ac3963b72ac367e48b1e68a831e62b93fb69091c";
sha256 = "1r9s1gsa4azcs05gx1179ixk7qvrkrik3v92wr4s8gwm00m0gf81";
};
}
{
root = "github.com/hashicorp/logutils";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "logutils";
rev = "8e0820fe7ac5eb2b01626b1d99df47c5449eb2d8";
sha256 = "033rbkc066g657r0dnzysigjz2bs4biiz0kmiypd139d34jvslwz";
};
}
{
root = "github.com/hashicorp/memberlist";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "memberlist";
rev = "17d39b695094be943bfb98442a80b082e6b9ac47";
sha256 = "0nvgjnwmfqhv2wvr77d2q5mq1bfw4xbpil6wgyj4fyrmhsfzrv3g";
};
}
{
root = "github.com/hashicorp/serf";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "serf";
rev = "5e0771b8d61bee28986087a246f7611d6bd4a87a";
sha256 = "0ck77ji28bvm4ahzxyyi4sm17c3fxc16k0k5mihl1nlkgdd73m8y";
};
}
{
root = "github.com/miekg/dns";
src = fetchFromGitHub {
owner = "miekg";
repo = "dns";
rev = "fc67c4b981930a377f8a26a5a1f2c0ccd5dd1514";
sha256 = "1csjmkx0gl34r4hmkhdbdxb0693f1p10yrjaj8f2jwli9p9sl4mg";
};
}
{
root = "github.com/mitchellh/cli";
src = fetchFromGitHub {
owner = "mitchellh";
repo = "cli";
rev = "8262fe3f76f0da53b5674eb35c8c6436430794c3";
sha256 = "0pqkxh1q49kkxihggrfjs8174d927g4c5qqx00ggw8sqqsgrw6vn";
};
}
{
root = "github.com/mitchellh/mapstructure";
src = fetchFromGitHub {
owner = "mitchellh";
repo = "mapstructure";
rev = "6fb2c832bcac61d01212ab1d172f7a14a8585b07";
sha256 = "0mx855lwhv0rk461wmbnbzbpkhmq5p2ipmrm5bhzimagrr1w17hw";
};
}
{
root = "github.com/ryanuber/columnize";
src = fetchFromGitHub {
owner = "ryanuber";
repo = "columnize";
rev = "785d943a7b6886e0bb2f139a60487b823dd8d9de";
sha256 = "1h3sxzhiwz65vf3cvclirlf6zhdr97v01dpn5cmf3m09rxxpnp3f";
};
}
{
root = "github.com/ugorji/go";
src = fetchFromGitHub {
owner = "ugorji";
repo = "go";
rev = "71c2886f5a673a35f909803f38ece5810165097b";
sha256 = "157f24xnkhclrjwwa1b7lmpj112ynlbf7g1cfw0c657iqny5720j";
};
}
{
root = "github.com/ugorji/go-msgpack";
src = fetchFromGitHub {
owner = "ugorji";
repo = "go-msgpack";
rev = "75092644046c5e38257395b86ed26c702dc95b92";
sha256 = "1bmqi16bfiqw7qhb3d5hbh0dfzhx2bbq1g15nh2pxwxckwh80x98";
};
}
{
root = "github.com/vmihailenco/bufio";
src = fetchFromGitHub {
owner = "vmihailenco";
repo = "bufio";
rev = "24e7e48f60fc2d9e99e43c07485d9fff42051e66";
sha256 = "0x46qnf2f15v7m0j2dcb16raxjamk5rdc7hqwgyxfr1sqmmw3983";
};
}
{
root = "github.com/vmihailenco/msgpack";
src = fetchFromGitHub {
owner = "vmihailenco";
repo = "msgpack";
rev = "20c1b88a6c7fc5432037439f4e8c582e236fb205";
sha256 = "1dj5scpfhgnw0yrh0w6jlrb9d03halvsv4l3wgjhazrrimdqf0q0";
};
}
{
root = "launchpad.net/gocheck";
src = fetchbzr {
url = "https://launchpad.net/gocheck";
rev = "87";
sha256 = "1y9fa2mv61if51gpik9isls48idsdz87zkm1p3my7swjdix7fcl0";
};
}
{
root = "launchpad.net/mgo";
src = fetchbzr {
url = "https://launchpad.net/mgo";
rev = "2";
sha256 = "0h1dxzyx5c4r4gfnmjxv92hlhjxrgx9p4g53p4fhmz6x2fdglb0x";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,57 +1,23 @@
{ stdenv, lib, pkgconfig, libmtp, go, fetchFromGitHub }:
{ lib, goPackages, pkgconfig, libmtp, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/hanwen/go-mtpfs";
src = fetchFromGitHub {
owner = "hanwen";
repo = "go-mtpfs";
rev = "9c2b46050e8ea8574eaec2124867ac7b11e6471d";
sha256 = "0kxi18cb078q4wikfajp3yvp802wzfsfdp431j0dg2jdw8y7gfii";
};
}
{
root = "github.com/hanwen/go-fuse";
src = fetchFromGitHub {
owner = "hanwen";
repo = "go-fuse";
rev = "5d16aa11eef4643de2d91e88a64dcb6138705d58";
sha256 = "0lycfhchn88kbs81ypz8m5jh032fpbv14gldrjirf32wm1d4f8pj";
};
}
{
root = "github.com/hanwen/usb";
src = fetchFromGitHub {
owner = "hanwen";
repo = "usb";
rev = "69aee4530ac705cec7c5344418d982aaf15cf0b1";
sha256 = "01k0c2g395j65vm1w37mmrfkg6nm900khjrrizzpmx8f8yf20dky";
};
}
];
with goPackages;
sources = stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
buildGoPackage rec {
rev = "9c2b46050e8ea8574eaec2124867ac7b11e6471d";
name = "go-mtpfs-${lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/hanwen/go-mtpfs";
src = fetchFromGitHub {
inherit rev;
owner = "hanwen";
repo = "go-mtpfs";
sha256 = "0kxi18cb078q4wikfajp3yvp802wzfsfdp431j0dg2jdw8y7gfii";
};
in stdenv.mkDerivation rec {
name = "go-mtpfs";
src = sources;
buildInputs = [ go-fuse libmtp usb ];
buildInputs = [ go pkgconfig libmtp ];
subPackages = [ "./" ];
installPhase = ''
mkdir -p $out/bin
export GOPATH=$src
go build -v -o $out/bin/go-mtpfs github.com/hanwen/go-mtpfs
'';
dontInstallSrc = true;
meta = with lib; {
description = "A simple FUSE filesystem for mounting Android devices as a MTP device";

View File

@ -1,29 +0,0 @@
{ stdenv, lib, go, fetchFromGitHub }:
stdenv.mkDerivation {
name = "go-bindata";
src = import ./deps.nix {
inherit stdenv lib fetchFromGitHub;
};
buildInputs = [ go ];
buildPhase = ''
export GOPATH=$src
go build -v -o go-bindata github.com/jteeuwen/go-bindata/go-bindata
'';
installPhase = ''
mkdir -p $out/bin
cp go-bindata $out/bin
'';
meta = with lib; {
homepage = "https://github.com/jteeuwen/go-bindata";
description = "A small utility which generates Go code from any file. Useful for embedding binary data in a Go program.";
maintainers = with maintainers; [ cstrahan ];
license = licenses.cc0 ;
platforms = platforms.all;
};
}

View File

@ -1,28 +0,0 @@
# This file was generated by go2nix.
{ stdenv, lib, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/jteeuwen/go-bindata";
src = fetchFromGitHub {
owner = "jteeuwen";
repo = "go-bindata";
rev = "93b909d1499a38620121b0a5eb43a18f3bccb083";
sha256 = "1v4jl9lnzy0p4nvjfkh96yy0w181n5mkr0kamh743911gfbpq4sh";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,42 +1,43 @@
{ stdenv, lib, go, go-bindata, fetchgit, fetchbzr, fetchhg, fetchFromGitHub }:
{ stdenv, git, fetchFromGitHub, goPackages }:
let deps = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
};
in stdenv.mkDerivation rec {
name = "ngrok-${version}";
version = "1.7";
with goPackages;
buildInputs = [ go go-bindata ];
buildGoPackage rec {
name = "ngrok-1.7";
goPackagePath = "ngrok";
unpackPhase = ''
export GOPATH=$(pwd)
cp -LR ${deps}/src src
chmod u+w -R src
sourceRoot=src/github.com/inconshreveable/ngrok
src = fetchFromGitHub {
rev = "b7d5571aa7f12ac304b8f8286b855cc64dd9bab8";
owner = "inconshreveable";
repo = "ngrok";
sha256 = "0a5iq9l9f2xdg6gnc9pj0iczhycv1w5iwcqgzzap83xfpy01xkh4";
};
subPackages = [ "main/ngrok" "main/ngrokd" ];
preConfigure = ''
sed -e '/jteeuwen\/go-bindata/d' \
-e '/export GOPATH/d' \
-e 's/go get/#go get/' \
-e 's|bin/go-bindata|go-bindata|' -i Makefile
make assets BUILDTAGS=release
export sourceRoot=$sourceRoot/src/ngrok
'';
preBuild = ''
export HOME=$(pwd)
export GOPATH=$(pwd):$GOPATH
buildInputs = [ git log4go websocket go-vhost mousetrap termbox-go rcrowley.go-metrics
yaml-v1 go-bindata go-update binarydist osext ];
# don't download dependencies as we already have them
sed -i '/jteeuwen\/go-bindata/d' Makefile
sed -i '/export GOPATH/d' Makefile
sed -i 's|bin/go-bindata|go-bindata|' Makefile
'';
buildFlags = "-tags release";
installPhase = ''
make release-client release-server
mkdir -p $out/bin
cp bin/ngrok{d,} $out/bin
'';
dontInstallSrc = true;
meta = with lib; {
description = "Reverse proxy that creates a secure tunnel between from a public endpoint to a locally running web service";
meta = with stdenv.lib; {
description = "Reverse proxy that creates a secure tunnel between from a public endpoint t
o a locally running web service";
homepage = https://ngrok.com/;
license = licenses.asl20;
maintainers = with maintainers; [ iElectric cstrahan ];
platforms = with platforms; linux ++ darwin;
};
}

View File

@ -1,141 +0,0 @@
# This file was generated by go2nix.
{ stdenv, lib, fetchFromGitHub, fetchgit, fetchhg, fetchbzr }:
let
goDeps = [
{
root = "bitbucket.org/kardianos/osext";
src = fetchhg {
url = "https://bitbucket.org/kardianos/osext";
rev = "10";
sha256 = "1sj9r5pm28l9sqx6354fwp032n53znx9k8495k3dfnyqjrkvlw6n";
};
}
{
root = "code.google.com/p/log4go";
src = fetchhg {
url = "https://code.google.com/p/log4go";
rev = "48";
sha256 = "0q906sxrmwir295virfibqvdzlaj340qh2r4ysx1ccjrjazc0q5p";
};
}
{
root = "github.com/gorilla/websocket";
src = fetchFromGitHub {
owner = "gorilla";
repo = "websocket";
rev = "f4076986b69612ecb8bc7ce06d742eda6286200d";
sha256 = "09arvwlxw15maf4z8pcgjc25hd00mckqpdi0byafqfgm3nvvacvq";
};
}
{
root = "github.com/inconshreveable/go-update";
src = fetchFromGitHub {
owner = "inconshreveable";
repo = "go-update";
rev = "c1385108bc3a016f1c88b75ea7d2e2a356a1571d";
sha256 = "16zaxa0i07ismxdmkvjj4dpyc9lgp6wa94q090m9a48si40w9sjn";
};
}
{
root = "github.com/inconshreveable/go-vhost";
src = fetchFromGitHub {
owner = "inconshreveable";
repo = "go-vhost";
rev = "c4c28117502e4bf00960c8282b2d1c51c865fe2c";
sha256 = "1rway6sls6fl2s2jk20ajj36rrlzh9944ncc9pdd19kifix54z32";
};
}
{
root = "github.com/inconshreveable/mousetrap";
src = fetchFromGitHub {
owner = "inconshreveable";
repo = "mousetrap";
rev = "9dbb96d2c3a964935b0870b5abaea13c98b483aa";
sha256 = "1f9g8vm18qv1rcb745a4iahql9vfrz0jni9mnzriab2wy1pfdl5b";
};
}
{
root = "github.com/inconshreveable/ngrok";
src = fetchFromGitHub {
owner = "inconshreveable";
repo = "ngrok";
rev = "b7d5571aa7f12ac304b8f8286b855cc64dd9bab8";
sha256 = "0a5iq9l9f2xdg6gnc9pj0iczhycv1w5iwcqgzzap83xfpy01xkh4";
};
}
{
root = "github.com/influxdb/influxdb-go";
src = fetchFromGitHub {
owner = "influxdb";
repo = "influxdb-go";
rev = "63c9a5f67dcb633d05164bf8442160c9e2e402f7";
sha256 = "16in1xhx94pir06aw166inn0hzpb7836xbws16laabs1p2np7bld";
};
}
{
root = "github.com/kr/binarydist";
src = fetchFromGitHub {
owner = "kr";
repo = "binarydist";
rev = "9955b0ab8708602d411341e55fffd7e0700f86bd";
sha256 = "11wncbbbrdcxl5ff3h6w8vqfg4bxsf8709mh6vda0cv236flkyn3";
};
}
{
root = "github.com/nsf/termbox-go";
src = fetchFromGitHub {
owner = "nsf";
repo = "termbox-go";
rev = "9aecf65084a5754f12d27508fa2e6ed56851953b";
sha256 = "16sak07bgvmax4zxfrd4jia1dgygk733xa8vk8cdx28z98awbfsh";
};
}
{
root = "github.com/rcrowley/go-metrics";
src = fetchFromGitHub {
owner = "rcrowley";
repo = "go-metrics";
rev = "f770e6f5e91a8770cecee02d5d3f7c00b023b4df";
sha256 = "07dc74kiam8v5my7rhi3yxqrpnaapladhk8b3qbnrpjk3shvnx5f";
};
}
{
root = "github.com/stathat/go";
src = fetchFromGitHub {
owner = "stathat";
repo = "go";
rev = "01d012b9ee2ecc107cb28b6dd32d9019ed5c1d77";
sha256 = "0mrn70wjfcs4rfkmga3hbfqmbjk33skcsc8pyqxp02bzpwdpc4bi";
};
}
{
root = "gopkg.in/check.v1";
src = fetchgit {
url = "https://github.com/go-check/check.git";
rev = "871360013c92e1c715c2de6d06b54899468a8a2d";
sha256 = "0i83qjmd4ri9mrfddhsbpj9nb43rf2j9803k030fj155j31klwcx";
};
}
{
root = "gopkg.in/yaml.v1";
src = fetchgit {
url = "https://github.com/go-yaml/yaml.git";
rev = "b0c168ac0cf9493da1f9bb76c34b26ffef940b4a";
sha256 = "0jbdy41pplf2d1j24qwr8gc5qsig6ai5ch8rwgvg72kq9q0901cy";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -1,26 +1,21 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
{ lib, goPackages, fetchFromGitHub }:
stdenv.mkDerivation rec {
with goPackages;
buildGoPackage rec {
version = "0.1.0";
name = "flannel-${version}";
src = import ./deps.nix {
inherit stdenv lib fetchFromGitHub;
goPackagePath = "github.com/coreos/flannel";
src = fetchFromGitHub {
owner = "coreos";
repo = "flannel";
rev = "v${version}";
sha256 = "1f7x6a2c8ix6j5y1r0dq56b58bl2rs2ycbdqb9fz5zv1zk2w20rd";
};
buildInputs = [ go ];
dontInstallSrc = true;
buildPhase = ''
export GOPATH=$src
go build -v -o flannel github.com/coreos/flannel
'';
installPhase = ''
mkdir -p $out/bin
mv flannel $out/bin/flannel
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Flannel is an etcd backed network fabric for containers";
homepage = https://github.com/coreos/flannel;
license = licenses.asl20;

View File

@ -1,28 +0,0 @@
# This file was generated by go2nix.
{ stdenv, lib, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/coreos/flannel";
src = fetchFromGitHub {
owner = "coreos";
repo = "flannel";
rev = "cd584fa5e1545ae86c965588e81ceb24455e980d";
sha256 = "1f7x6a2c8ix6j5y1r0dq56b58bl2rs2ycbdqb9fz5zv1zk2w20rd";
};
}
];
in
stdenv.mkDerivation rec {
name = "go-deps";
buildCommand =
lib.concatStrings
(map (dep: ''
mkdir -p $out/src/`dirname ${dep.root}`
ln -s ${dep.src} $out/src/${dep.root}
'') goDeps);
}

View File

@ -3534,8 +3534,6 @@ let
go-repo-root = callPackage ../development/tools/misc/go-repo-root { };
go-bindata = callPackage ../tools/misc/go-bindata { };
gox = callPackage ../development/compilers/go/gox.nix { };
gprolog = callPackage ../development/compilers/gprolog { };
@ -7616,6 +7614,26 @@ let
yuicompressor = callPackage ../development/tools/yuicompressor { };
### DEVELOPMENT / GO MODULES
go13Packages = recurseIntoAttrs (callPackage ./go-packages.nix {
go = go_1_3;
buildGoPackage = import ../development/go-modules/generic {
go = go_1_3;
};
overrides = (config.goPackageOverrides or (p: {})) pkgs;
});
go14Packages = recurseIntoAttrs (callPackage ./go-packages.nix {
go = go_1_4;
buildGoPackage = import ../development/go-modules/generic {
go = go_1_4;
};
overrides = (config.goPackageOverrides or (p: {})) pkgs;
});
goPackages = go14Packages;
### DEVELOPMENT / LISP MODULES
asdf = callPackage ../development/lisp-modules/asdf {
@ -8893,7 +8911,7 @@ let
gotags = callPackage ../development/tools/gotags { };
golint = callPackage ../development/tools/golint { };
golint = callPackage ../development/tools/golint { goPackages = go13Packages; };
godep = callPackage ../development/tools/godep { };
@ -10968,7 +10986,7 @@ let
inherit (xorg) libXpm;
};
pond = callPackage ../applications/networking/pond { };
pond = callPackage ../applications/networking/pond { goPackages = go13Packages; };
potrace = callPackage ../applications/graphics/potrace {};

View File

@ -0,0 +1,762 @@
/* This file defines the composition for Go packages. */
{ overrides, stdenv, go, buildGoPackage, git, pkgconfig, libusb
, fetchgit, fetchhg, fetchurl, fetchFromGitHub, fetchbzr }:
let self = _self // overrides; _self = with self; {
inherit go buildGoPackage;
## OFFICIAL GO PACKAGES
crypto = buildGoPackage rec {
rev = "31393df5baea";
name = "go-crypto-${rev}";
goPackagePath = "code.google.com/p/go.crypto";
src = fetchhg {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "0b95dpsvxxapcjjvhj05fdmyn0mzffamc25hvxy7xgsl2l9yy3nw";
};
};
image = buildGoPackage rec {
rev = "490b1ad139b3";
name = "go.image-${rev}";
goPackagePath = "code.google.com/p/go.image";
src = fetchhg {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "02m6ifwby2fi88njarbbb6dimwg0pd2b6llkgyadh4b9wzp2vy4r";
};
};
net = buildGoPackage rec {
rev = "3338d5f109e9";
name = "go.net-${rev}";
goPackagePath = "code.google.com/p/go.net";
src = fetchhg {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "0yz807y3ac07x3nf0qlaw1w1i6asynrpyssjl8jyv3pplww0qj7i";
};
propagatedBuildInputs = [ text ];
};
protobuf = buildGoPackage rec {
rev = "36be16571e14";
name = "goprotobuf-${rev}";
goPackagePath = "code.google.com/p/goprotobuf";
src = fetchhg {
inherit rev;
url = "https://code.google.com/p/goprotobuf";
sha256 = "14yay2sgfbbs0bx3q03bdqn1kivyvxfdm34rmp2612gvinlll215";
};
subPackages = [ "proto" "protoc-gen-go" ];
};
text = buildGoPackage rec {
rev = "024681b033be";
name = "go.text-${rev}";
goPackagePath = "code.google.com/p/go.text";
src = fetchhg {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "19px5pw5mvwjb7ymivfkkkr6cyl2npv834jxlr6y0x5ca1djhsci";
};
doCheck = false;
};
tools = buildGoPackage rec {
rev = "140fcaadc5860b1a014ec69fdeec807fe3b787e8";
name = "go.tools-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "code.google.com/p/go.tools";
src = fetchhg {
inherit rev;
url = "http://code.google.com/p/go.tools";
sha256 = "1vgz4kxy0p56qh6pfbs2c68156hakgx4cmrci9jbg7lnrdaz4y56";
};
subPackages = [ "go/vcs" ];
};
## THIRD PARTY
binarydist = buildGoPackage rec {
rev = "9955b0ab8708602d411341e55fffd7e0700f86bd";
name = "binarydist-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/kr/binarydist";
src = fetchFromGitHub {
inherit rev;
owner = "kr";
repo = "binarydist";
sha256 = "11wncbbbrdcxl5ff3h6w8vqfg4bxsf8709mh6vda0cv236flkyn3";
};
};
bufio = buildGoPackage rec {
rev = "24e7e48f60fc2d9e99e43c07485d9fff42051e66";
name = "bufio-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/vmihailenco/bufio";
src = fetchFromGitHub {
inherit rev;
owner = "vmihailenco";
repo = "bufio";
sha256 = "0x46qnf2f15v7m0j2dcb16raxjamk5rdc7hqwgyxfr1sqmmw3983";
};
};
check-v1 = buildGoPackage rec {
rev = "871360013c92e1c715c2de6d06b54899468a8a2d";
name = "check-v1-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "gopkg.in/check.v1";
src = fetchgit {
inherit rev;
url = "https://github.com/go-check/check.git";
sha256 = "0i83qjmd4ri9mrfddhsbpj9nb43rf2j9803k030fj155j31klwcx";
};
};
circbuf = buildGoPackage rec {
rev = "f092b4f207b6e5cce0569056fba9e1a2735cb6cf";
name = "circbuf-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/armon/circbuf";
src = fetchFromGitHub {
inherit rev;
owner = "armon";
repo = "circbuf";
sha256 = "06kwwdwa3hskdh6ws7clj1vim80dyc3ldim8k9y5qpd30x0avn5s";
};
};
cli = buildGoPackage rec {
rev = "8262fe3f76f0da53b5674eb35c8c6436430794c3";
name = "cli-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/mitchellh/cli";
src = fetchFromGitHub {
inherit rev;
owner = "mitchellh";
repo = "cli";
sha256 = "0pqkxh1q49kkxihggrfjs8174d927g4c5qqx00ggw8sqqsgrw6vn";
};
};
cobra = buildGoPackage rec {
date = "20140617";
rev = "10a8494a87448bf5003222d9974f166437e7f042";
name = "cobra-${date}-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/spf13/cobra";
src = fetchgit {
inherit rev;
url = "https://${goPackagePath}.git";
sha256 = "1ydcccx0zdswca4v9hfmrn8ck42h485hy3wrd9k7y6mra3r6c08j";
};
propagatedBuildInputs = [ pflag ];
};
columnize = buildGoPackage rec {
rev = "785d943a7b6886e0bb2f139a60487b823dd8d9de";
name = "columnize-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/ryanuber/columnize";
src = fetchFromGitHub {
inherit rev;
owner = "ryanuber";
repo = "columnize";
sha256 = "1h3sxzhiwz65vf3cvclirlf6zhdr97v01dpn5cmf3m09rxxpnp3f";
};
};
dns = buildGoPackage rec {
rev = "fc67c4b981930a377f8a26a5a1f2c0ccd5dd1514";
name = "dns-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/miekg/dns";
src = fetchFromGitHub {
inherit rev;
owner = "miekg";
repo = "dns";
sha256 = "1csjmkx0gl34r4hmkhdbdxb0693f1p10yrjaj8f2jwli9p9sl4mg";
};
};
ed25519 = buildGoPackage rec {
rev = "d2b94fd789ea21d12fac1a4443dd3a3f79cda72c";
name = "ed25519-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/agl/ed25519";
src = fetchgit {
inherit rev;
url = "git://${goPackagePath}.git";
sha256 = "83e3010509805d1d315c7aa85a356fda69d91b51ff99ed98a503d63adb3613e9";
};
};
gocheck = buildGoPackage rec {
rev = "87";
name = "gocheck-${rev}";
goPackagePath = "launchpad.net/gocheck";
src = fetchbzr {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "1y9fa2mv61if51gpik9isls48idsdz87zkm1p3my7swjdix7fcl0";
};
};
goconvey = buildGoPackage rec {
version = "1.5.0";
name = "goconvey-${version}";
goPackagePath = "github.com/smartystreets/goconvey";
src = fetchurl {
name = "${name}.tar.gz";
url = "https://github.com/smartystreets/goconvey/archive/${version}.tar.gz";
sha256 = "0g3965cb8kg4kf9b0klx4pj9ycd7qwbw1jqjspy6i5d4ccd6mby4";
};
buildInputs = [ oglematchers ];
doCheck = false; # please check again
};
go-assert = buildGoPackage rec {
rev = "e17e99893cb6509f428e1728281c2ad60a6b31e3";
name = "assert-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/bmizerany/assert";
src = fetchFromGitHub {
inherit rev;
owner = "bmizerany";
repo = "assert";
sha256 = "1lfrvqqmb09y6pcr76yjv4r84cshkd4s7fpmiy7268kfi2cvqnpc";
};
propagatedBuildInputs = [ pretty ];
};
go-bencode = buildGoPackage rec {
version = "1.1.1";
name = "go-bencode-${version}";
goPackagePath = "github.com/ehmry/go-bencode";
src = fetchurl {
url = "https://${goPackagePath}/archive/v${version}.tar.gz";
sha256 = "0y2kz2sg1f7mh6vn70kga5d0qhp04n01pf1w7k6s8j2nm62h24j6";
};
};
go-bindata = buildGoPackage rec {
version = "3.0.7";
name = "go-bindata-${version}";
goPackagePath = "github.com/jteeuwen/go-bindata";
src = fetchFromGitHub {
repo = "go-bindata";
owner = "jteeuwen";
rev = "v${version}";
sha256 = "1v8xwwlv6my5ixvis31m3vgz4sdc0cq82855j8gxmjp1scinv432";
};
subPackages = [ "./" "go-bindata" ]; # don't build testdata
meta = with stdenv.lib; {
homepage = "https://github.com/jteeuwen/go-bindata";
description = "A small utility which generates Go code from any file. Useful for embedding binary data in a Go program.";
maintainers = with maintainers; [ cstrahan ];
license = licenses.cc0 ;
platforms = platforms.all;
};
};
go-codec = buildGoPackage rec {
rev = "71c2886f5a673a35f909803f38ece5810165097b";
name = "go-codec-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/ugorji/go";
src = fetchFromGitHub {
inherit rev;
owner = "ugorji";
repo = "go";
sha256 = "157f24xnkhclrjwwa1b7lmpj112ynlbf7g1cfw0c657iqny5720j";
};
};
go-fuse = buildGoPackage rec {
rev = "5d16aa11eef4643de2d91e88a64dcb6138705d58";
name = "go-fuse-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/hanwen/go-fuse";
src = fetchFromGitHub {
inherit rev;
owner = "hanwen";
repo = "go-fuse";
sha256 = "0lycfhchn88kbs81ypz8m5jh032fpbv14gldrjirf32wm1d4f8pj";
};
subPackages = [ "fuse" "fuse/nodefs" "fuse/pathfs" ];
};
go-hostpool = buildGoPackage rec {
rev = "fed86fae5cacdc77e7399937e2f8836563620a2e";
name = "go-hostpool-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/bitly/go-hostpool";
src = fetchFromGitHub {
inherit rev;
owner = "bitly";
repo = "go-hostpool";
sha256 = "0nbssfp5ksj4hhc0d8lfq54afd9nqv6qzk3vi6rinxr3fgplrj44";
};
};
rcrowley.go-metrics = buildGoPackage rec {
rev = "f770e6f5e91a8770cecee02d5d3f7c00b023b4df";
name = "rcrowley.go-metrics-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/rcrowley/go-metrics";
src = fetchFromGitHub {
inherit rev;
owner = "rcrowley";
repo = "go-metrics";
sha256 = "07dc74kiam8v5my7rhi3yxqrpnaapladhk8b3qbnrpjk3shvnx5f";
};
buildInputs = [ influxdb-go stathat ];
};
armon.go-metrics = buildGoPackage rec {
rev = "02567bbc4f518a43853d262b651a3c8257c3f141";
name = "armon.go-metrics-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/armon/go-metrics";
src = fetchFromGitHub {
inherit rev;
owner = "armon";
repo = "go-metrics";
sha256 = "08fk3zmw0ywmdfp2qhrpv0vrk1y97hzqczrgr3y2yip3x8sr37ar";
};
};
go-msgpack = buildGoPackage rec {
rev = "75092644046c5e38257395b86ed26c702dc95b92";
name = "go-msgpack-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/ugorji/go-msgpack";
src = fetchFromGitHub {
inherit rev;
owner = "ugorji";
repo = "go-msgpack";
sha256 = "1bmqi16bfiqw7qhb3d5hbh0dfzhx2bbq1g15nh2pxwxckwh80x98";
};
};
go-nsq = buildGoPackage rec {
rev = "c79a282f05364e340eadc2ce2f862a3d44eea9c0";
name = "go-nsq-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/bitly/go-nsq";
src = fetchFromGitHub {
inherit rev;
owner = "bitly";
repo = "go-nsq";
sha256 = "19jlwj5419p5xwjzfnzlddjnbh5g7ifnqhd00i5p0b6ww1gk011p";
};
propagatedBuildInputs = [ go-simplejson go-snappystream ];
};
go-options = buildGoPackage rec {
rev = "896a539cd709f4f39d787562d1583c016ce7517e";
name = "go-options-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/mreiferson/go-options";
src = fetchFromGitHub {
inherit rev;
owner = "mreiferson";
repo = "go-options";
sha256 = "0hg0n5grcjcj5719rqchz0plp39wfk3znqxw8y354k4jwsqwmn17";
};
};
go-simplejson = buildGoPackage rec {
rev = "1cfceb0e12f47ec02665ef480212d7b531d6f4c5";
name = "go-simplejson-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/bitly/go-simplejson";
src = fetchFromGitHub {
inherit rev;
owner = "bitly";
repo = "go-simplejson";
sha256 = "1d8x0himl58qn87lv418djy6mbs66p9ai3zpqq13nhkfl67fj3bi";
};
};
go-snappystream = buildGoPackage rec {
rev = "97c96e6648e99c2ce4fe7d169aa3f7368204e04d";
name = "go-snappystream-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/mreiferson/go-snappystream";
src = fetchFromGitHub {
inherit rev;
owner = "mreiferson";
repo = "go-snappystream";
sha256 = "08ylvx9r6b1fi76v6cqjvny4yqsvcqjfsg93jdrgs7hi4mxvxynn";
};
propagatedBuildInputs = [ snappy-go ];
};
go-syslog = buildGoPackage rec {
rev = "ac3963b72ac367e48b1e68a831e62b93fb69091c";
name = "go-syslog-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/hashicorp/go-syslog";
src = fetchFromGitHub {
inherit rev;
owner = "hashicorp";
repo = "go-syslog";
sha256 = "1r9s1gsa4azcs05gx1179ixk7qvrkrik3v92wr4s8gwm00m0gf81";
};
};
go-update = buildGoPackage rec {
rev = "c1385108bc3a016f1c88b75ea7d2e2a356a1571d";
name = "go-update-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/inconshreveable/go-update";
buildInputs = [ osext binarydist ];
src = fetchFromGitHub {
inherit rev;
owner = "inconshreveable";
repo = "go-update";
sha256 = "16zaxa0i07ismxdmkvjj4dpyc9lgp6wa94q090m9a48si40w9sjn";
};
};
go-vhost = buildGoPackage rec {
rev = "c4c28117502e4bf00960c8282b2d1c51c865fe2c";
name = "go-vhost-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/inconshreveable/go-vhost";
src = fetchFromGitHub {
inherit rev;
owner = "inconshreveable";
repo = "go-vhost";
sha256 = "1rway6sls6fl2s2jk20ajj36rrlzh9944ncc9pdd19kifix54z32";
};
};
influxdb-go = buildGoPackage rec {
rev = "63c9a5f67dcb633d05164bf8442160c9e2e402f7";
name = "influxdb-go-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/influxdb/influxdb-go";
src = fetchFromGitHub {
inherit rev;
owner = "influxdb";
repo = "influxdb-go";
sha256 = "16in1xhx94pir06aw166inn0hzpb7836xbws16laabs1p2np7bld";
};
};
eckardt.influxdb-go = buildGoPackage rec {
rev = "8b71952efc257237e077c5d0672e936713bad38f";
name = "influxdb-go-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/eckardt/influxdb-go";
src = fetchgit {
inherit rev;
url = "https://${goPackagePath}.git";
sha256 = "5318c7e1131ba2330c90a1b67855209e41d3c77811b1d212a96525b42d391f6e";
};
};
iochan = buildGoPackage rec {
rev = "b584a329b193e206025682ae6c10cdbe03b0cd77";
name = "iochan-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/mitchellh/iochan";
src = fetchFromGitHub {
inherit rev;
owner = "mitchellh";
repo = "iochan";
sha256 = "1fcwdhfci41ibpng2j4c1bqfng578cwzb3c00yw1lnbwwhaq9r6b";
};
};
log4go = buildGoPackage rec {
rev = "48";
name = "log4go-${rev}";
goPackagePath = "code.google.com/p/log4go";
src = fetchhg {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "0q906sxrmwir295virfibqvdzlaj340qh2r4ysx1ccjrjazc0q5p";
};
subPackages = [ "./" ]; # don't build examples
};
logutils = buildGoPackage rec {
rev = "8e0820fe7ac5eb2b01626b1d99df47c5449eb2d8";
name = "logutils-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/hashicorp/logutils";
src = fetchFromGitHub {
inherit rev;
owner = "hashicorp";
repo = "logutils";
sha256 = "033rbkc066g657r0dnzysigjz2bs4biiz0kmiypd139d34jvslwz";
};
};
mapstructure = buildGoPackage rec {
rev = "6fb2c832bcac61d01212ab1d172f7a14a8585b07";
name = "mapstructure-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/mitchellh/mapstructure";
src = fetchFromGitHub {
inherit rev;
owner = "mitchellh";
repo = "mapstructure";
sha256 = "0mx855lwhv0rk461wmbnbzbpkhmq5p2ipmrm5bhzimagrr1w17hw";
};
};
mdns = buildGoPackage rec {
rev = "70462deb060d44247356ee238ebafd7699ddcffe";
name = "mdns-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/armon/mdns";
src = fetchFromGitHub {
inherit rev;
owner = "armon";
repo = "mdns";
sha256 = "0xkm3d0hsixdm1yrkx9c39723kfjkb3wvrzrmx3np9ylcwn6h5p5";
};
propagatedBuildInputs = [ dns net ];
};
memberlist = buildGoPackage rec {
rev = "17d39b695094be943bfb98442a80b082e6b9ac47";
name = "memberlist-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/hashicorp/memberlist";
src = fetchFromGitHub {
inherit rev;
owner = "hashicorp";
repo = "memberlist";
sha256 = "0nvgjnwmfqhv2wvr77d2q5mq1bfw4xbpil6wgyj4fyrmhsfzrv3g";
};
propagatedBuildInputs = [ go-codec armon.go-metrics ];
};
mgo = buildGoPackage rec {
rev = "2";
name = "mgo-${rev}";
goPackagePath = "launchpad.net/mgo";
src = fetchbzr {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "0h1dxzyx5c4r4gfnmjxv92hlhjxrgx9p4g53p4fhmz6x2fdglb0x";
};
};
mousetrap = buildGoPackage rec {
rev = "9dbb96d2c3a964935b0870b5abaea13c98b483aa";
name = "mousetrap-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/inconshreveable/mousetrap";
src = fetchFromGitHub {
inherit rev;
owner = "inconshreveable";
repo = "mousetrap";
sha256 = "1f9g8vm18qv1rcb745a4iahql9vfrz0jni9mnzriab2wy1pfdl5b";
};
};
msgpack = buildGoPackage rec {
rev = "20c1b88a6c7fc5432037439f4e8c582e236fb205";
name = "msgpack-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/vmihailenco/msgpack";
src = fetchFromGitHub {
inherit rev;
owner = "vmihailenco";
repo = "msgpack";
sha256 = "1dj5scpfhgnw0yrh0w6jlrb9d03halvsv4l3wgjhazrrimdqf0q0";
};
};
oglematchers = buildGoPackage rec {
rev = "4fc24f97b5b74022c2a3f4ca7eed57ca29083d3e";
name = "oglematchers-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/jacobsa/oglematchers";
src = fetchgit {
inherit rev;
url = "https://${goPackagePath}.git";
sha256 = "4075ede31601adf8c4e92739693aebffa3718c641dfca75b09cf6b4bd6c26cc0";
};
#goTestInputs = [ ogletest ];
doCheck = false; # infinite recursion
};
oglemock = buildGoPackage rec {
rev = "d054ecee522bdce4481690cdeb09d1b4c44da4e1";
name = "oglemock-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/jacobsa/oglemock";
src = fetchgit {
inherit rev;
url = "https://${goPackagePath}.git";
sha256 = "685e7fc4308d118ae25467ba84c64754692a7772c77c197f38d8c1b63ea81da2";
};
buildInputs = [ oglematchers ];
#goTestInputs = [ ogletest ];
doCheck = false; # infinite recursion
};
ogletest = buildGoPackage rec {
rev = "7de485607c3f215cf92c1f793b5d5a7de46ec3c7";
name = "ogletest-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/jacobsa/ogletest";
src = fetchgit {
inherit rev;
url = "https://${goPackagePath}.git";
sha256 = "0cfc43646d59dcea5772320f968aef2f565fb5c46068d8def412b8f635365361";
};
buildInputs = [ oglemock oglematchers ];
doCheck = false; # check this again
};
osext = buildGoPackage rec {
rev = "10";
name = "osext-${rev}";
goPackagePath = "bitbucket.org/kardianos/osext";
src = fetchhg {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "1sj9r5pm28l9sqx6354fwp032n53znx9k8495k3dfnyqjrkvlw6n";
};
};
perks = buildGoPackage rec {
rev = "aac9e2eab5a334037057336897fd10b0289a5ae8";
name = "perks-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/bmizerany/perks";
src = fetchFromGitHub {
inherit rev;
owner = "bmizerany";
repo = "perks";
sha256 = "1d027jgc327qz5xmal0hrpqvsj45i9yqmm9pxk3xp3hancvz3l3k";
};
};
pflag = buildGoPackage rec {
date = "20131112";
rev = "94e98a55fb412fcbcfc302555cb990f5e1590627";
name = "pflag-${date}-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/spf13/pflag";
src = fetchgit {
inherit rev;
url = "https://${goPackagePath}.git";
sha256 = "0z8nzdhj8nrim8fz11magdl0wxnisix9p2kcvn5kkb3bg8wmxhbg";
};
doCheck = false; # bad import path in tests
};
pretty = buildGoPackage rec {
rev = "bc9499caa0f45ee5edb2f0209fbd61fbf3d9018f";
name = "pretty-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/kr/pretty";
src = fetchFromGitHub {
inherit rev;
owner = "kr";
repo = "pretty";
sha256 = "1m61y592qsnwsqn76v54mm6h2pcvh4wlzbzscc1ag645x0j33vvl";
};
propagatedBuildInputs = [ kr.text ];
};
pty = buildGoPackage rec {
rev = "67e2db24c831afa6c64fc17b4a143390674365ef";
name = "pty-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/kr/pty";
src = fetchFromGitHub {
inherit rev;
owner = "kr";
repo = "pty";
sha256 = "1l3z3wbb112ar9br44m8g838z0pq2gfxcp5s3ka0xvm1hjvanw2d";
};
};
snappy-go = buildGoPackage rec {
rev = "14";
name = "snappy-go-${rev}";
goPackagePath = "code.google.com/p/snappy-go";
src = fetchhg {
inherit rev;
url = "http://code.google.com/p/snappy-go";
sha256 = "0ywa52kcii8g2a9lbqcx8ghdf6y56lqq96sl5nl9p6h74rdvmjr7";
};
};
stathat = buildGoPackage rec {
rev = "01d012b9ee2ecc107cb28b6dd32d9019ed5c1d77";
name = "stathat-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/stathat/go";
src = fetchFromGitHub {
inherit rev;
owner = "stathat";
repo = "go";
sha256 = "0mrn70wjfcs4rfkmga3hbfqmbjk33skcsc8pyqxp02bzpwdpc4bi";
};
};
termbox-go = buildGoPackage rec {
rev = "9aecf65084a5754f12d27508fa2e6ed56851953b";
name = "termbox-go-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/nsf/termbox-go";
src = fetchFromGitHub {
inherit rev;
owner = "nsf";
repo = "termbox-go";
sha256 = "16sak07bgvmax4zxfrd4jia1dgygk733xa8vk8cdx28z98awbfsh";
};
subPackages = [ "./" ]; # prevent building _demos
};
kr.text = buildGoPackage rec {
rev = "6807e777504f54ad073ecef66747de158294b639";
name = "kr.text-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/kr/text";
src = fetchFromGitHub {
inherit rev;
owner = "kr";
repo = "text";
sha256 = "1wkszsg08zar3wgspl9sc8bdsngiwdqmg3ws4y0bh02sjx5a4698";
};
propagatedBuildInputs = [ pty ];
};
toml = buildGoPackage rec {
rev = "f87ce853111478914f0bcffa34d43a93643e6eda";
name = "toml-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/BurntSushi/toml";
src = fetchFromGitHub {
inherit rev;
owner = "BurntSushi";
repo = "toml";
sha256 = "0g8203y9ycf34j2q3ymxb8nh4habgwdrjn9vdgrginllx73yq565";
};
};
usb = buildGoPackage rec {
rev = "69aee4530ac705cec7c5344418d982aaf15cf0b1";
name = "usb-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/hanwen/usb";
src = fetchFromGitHub {
inherit rev;
owner = "hanwen";
repo = "usb";
sha256 = "01k0c2g395j65vm1w37mmrfkg6nm900khjrrizzpmx8f8yf20dky";
};
buildInputs = [ pkgconfig libusb ];
};
websocket = buildGoPackage rec {
rev = "f4076986b69612ecb8bc7ce06d742eda6286200d";
name = "websocket-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "github.com/gorilla/websocket";
src = fetchFromGitHub {
inherit rev;
owner = "gorilla";
repo = "websocket";
sha256 = "09arvwlxw15maf4z8pcgjc25hd00mckqpdi0byafqfgm3nvvacvq";
};
};
yaml-v1 = buildGoPackage rec {
rev = "b0c168ac0cf9493da1f9bb76c34b26ffef940b4a";
name = "yaml-v1-${stdenv.lib.strings.substring 0 7 rev}";
goPackagePath = "gopkg.in/yaml.v1";
src = fetchgit {
inherit rev;
url = "https://github.com/go-yaml/yaml.git";
sha256 = "0jbdy41pplf2d1j24qwr8gc5qsig6ai5ch8rwgvg72kq9q0901cy";
};
};
}; in self