Merge pull request #16017 from kamilchm/rework-go

Rework goPackages
This commit is contained in:
Rushmore Mushambi 2016-06-09 17:09:13 +02:00
commit 83c40ada7e
128 changed files with 3822 additions and 4509 deletions

View File

@ -0,0 +1,17 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "wego-${version}";
version = "20160407-${stdenv.lib.strings.substring 0 7 rev}";
rev = "81d72ffd761f032fbd73dba4f94bd94c8c2d53d5";
goPackagePath = "github.com/schachmat/wego";
src = fetchgit {
inherit rev;
url = "https://github.com/schachmat/wego";
sha256 = "14p3hvv82bsxqnbnzz8hjv75i39kzg154a132n6cdxx3vgw76gck";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,10 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/mattn/go-colorable",
"github.com/mattn/go-runewidth",
"github.com/schachmat/ingo"
]
}
]

View File

@ -0,0 +1,25 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "nomad-${version}";
version = "0.3.2";
rev = "v${version}";
goPackagePath = "github.com/hashicorp/nomad";
subPackages = [ "." ];
src = fetchFromGitHub {
owner = "hashicorp";
repo = "nomad";
inherit rev;
sha256 = "1m2pdragpzrq0xbmnba039iiyhb16wirj3n1s52z5r8r0mr7drai";
};
meta = with stdenv.lib; {
homepage = https://www.nomadproject.io/;
license = licenses.mpl20;
description = "A Distributed, Highly Available, Datacenter-Aware Scheduler";
platforms = platforms.linux;
maintainers = with maintainers; [ rushmorem ];
};
}

View File

@ -0,0 +1,25 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "terraform-${version}";
version = "0.6.15";
rev = "v${version}";
goPackagePath = "github.com/hashicorp/terraform";
src = fetchFromGitHub {
inherit rev;
owner = "hashicorp";
repo = "terraform";
sha256 = "1mf98hagb0yp40g2mbar7aw7hmpq01clnil6y9khvykrb33vy0nb";
};
postInstall = ''
# prefix all the plugins with "terraform-"
for i in $bin/bin/*; do
if [[ ! $(basename $i) =~ terraform* ]]; then
mv -v $i $bin/bin/terraform-$(basename $i);
fi
done
'';
}

View File

@ -0,0 +1,18 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "drive-${version}";
version = "20151025-${stdenv.lib.strings.substring 0 7 rev}";
rev = "6dc2f1e83032ea3911fa6147b846ee93f18dc544";
goPackagePath = "github.com/odeke-em/drive";
subPackages = [ "cmd/drive" ];
src = fetchgit {
inherit rev;
url = "https://github.com/odeke-em/drive";
sha256 = "07s4nhfcr6vznf1amvl3a4wq2hn9zq871rcppfi4i6zs7iw2ay1v";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,26 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/boltdb/bolt",
"github.com/cheggaaa/pb",
"github.com/odeke-em/cli-spinner",
"github.com/odeke-em/statos",
"golang.org/x/oauth2",
"github.com/odeke-em/exponential-backoff",
"github.com/odeke-em/extractor",
"github.com/odeke-em/meddler",
"github.com/odeke-em/xon",
"github.com/odeke-em/cache",
"github.com/odeke-em/drive",
"github.com/odeke-em/command",
"github.com/odeke-em/log",
"github.com/odeke-em/pretty-words",
"github.com/skratchdot/open-golang",
"google.golang.org/cloud",
"google.golang.org/api",
"github.com/mattn/go-isatty",
"golang.org/x/net"
]
}
]

View File

@ -0,0 +1,33 @@
{ stdenv, lib, buildGoPackage, trousers, dclxvi, wrapGAppsHook, pkgconfig, gtk3, gtkspell3,
fetchgit, fetchhg, fetchbzr, fetchsvn }:
let
isx86_64 = stdenv.lib.any (n: n == stdenv.system) stdenv.lib.platforms.x86_64;
gui = true; # Might be implemented with nixpkgs config.
in
buildGoPackage rec {
name = "pond-${version}";
version = "20150830-${stdenv.lib.strings.substring 0 7 rev}";
rev = "bce6e0dc61803c23699c749e29a83f81da3c41b2";
goPackagePath = "github.com/agl/pond";
src = fetchgit {
inherit rev;
url = "https://github.com/agl/pond";
sha256 = "1dmgbg4ak3jkbgmxh0lr4hga1nl623mh7pvsgby1rxl4ivbzwkh4";
};
goDeps = ./deps.json;
buildInputs = [ trousers pkgconfig gtk3 gtkspell3 ]
++ stdenv.lib.optional isx86_64 dclxvi
++ stdenv.lib.optionals gui [ wrapGAppsHook ];
buildFlags = stdenv.lib.optionalString (!gui) "-tags nogui";
excludedPackages = "\\(appengine\\|bn256cgo\\)";
postPatch = stdenv.lib.optionalString isx86_64 ''
grep -r 'bn256' | awk -F: '{print $1}' | xargs sed -i \
-e "s,golang.org/x/crypto/bn256,github.com/agl/pond/bn256cgo,g" \
-e "s,bn256\.,bn256cgo.,g"
'';
}

View File

@ -0,0 +1,12 @@
[
{
"include": "../../libs.json",
"packages": [
"golang.org/x/net",
"github.com/golang/protobuf",
"github.com/agl/ed25519",
"golang.org/x/crypto",
"github.com/agl/go-gtk"
]
}
]

View File

@ -0,0 +1,24 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "xmpp-client-${version}";
version = "20160110-${stdenv.lib.strings.substring 0 7 rev}";
rev = "525bd26cf5f56ec5aee99464714fd1d019c119ff";
goPackagePath = "github.com/agl/xmpp-client";
src = fetchgit {
inherit rev;
url = "https://github.com/agl/xmpp-client";
sha256 = "0a1r08zs723ikcskmn6ylkdi3frcd0i0lkx30i9q39ilf734v253";
};
goDeps = ./deps.json;
meta = with stdenv.lib; {
description = "An XMPP client with OTR support";
homepage = https://github.com/agl/xmpp-client;
license = licenses.bsd3;
maintainers = with maintainers; [ codsl ];
};
}

View File

@ -0,0 +1,9 @@
[
{
"include": "../../libs.json",
"packages": [
"golang.org/x/crypto",
"golang.org/x/net"
]
}
]

View File

@ -0,0 +1,21 @@
{ stdenv, buildGo15Package, fetchFromGitHub }:
buildGo15Package rec {
name = "ipfs-${version}";
version = "i20160112--${stdenv.lib.strings.substring 0 7 rev}";
rev = "7070b4d878baad57dcc8da80080dd293aa46cabd";
goPackagePath = "github.com/ipfs/go-ipfs";
src = fetchFromGitHub {
owner = "ipfs";
repo = "go-ipfs";
inherit rev;
sha256 = "1b7aimnbz287fy7p27v3qdxnz514r5142v3jihqxanbk9g384gcd";
};
meta = with stdenv.lib; {
description = "A global, versioned, peer-to-peer filesystem";
license = licenses.mit;
};
}

View File

@ -16,8 +16,6 @@ stdenv.mkDerivation rec {
mkdir -p src/github.com/syncthing
ln -s $(pwd) src/github.com/syncthing/syncthing
export GOPATH=$(pwd)
# Required for Go 1.5, can be removed for Go 1.6+
export GO15VENDOREXPERIMENT=1
# Syncthing's build.go script expects this working directory
cd src/github.com/syncthing/syncthing

View File

@ -0,0 +1,25 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "syncthing-${version}";
version = "0.12.15";
rev = "v${version}";
buildFlags = "--tags noupgrade,release";
goPackagePath = "github.com/syncthing/syncthing";
src = fetchFromGitHub {
inherit rev;
owner = "syncthing";
repo = "syncthing";
sha256 = "0g4sj509h45iq6g7b0pl88rbbn7c7s01774yjc6bl376x1xrl6a1";
};
goDeps = ./deps.json;
postPatch = ''
# Mostly a cosmetic change
sed -i 's,unknown-dev,${version},g' cmd/syncthing/main.go
'';
}

View File

@ -0,0 +1,21 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/bkaradzic/go-lz4",
"github.com/calmh/luhn",
"golang.org/x/text",
"github.com/kardianos/osext",
"github.com/vitrun/qart",
"github.com/calmh/du",
"github.com/calmh/xdr",
"github.com/juju/ratelimit",
"github.com/thejerf/suture",
"github.com/golang/snappy",
"github.com/rcrowley/go-metrics",
"github.com/syndtr/goleveldb",
"golang.org/x/crypto",
"golang.org/x/net"
]
}
]

View File

@ -40,7 +40,7 @@ rec {
git-annex = pkgs.haskell.packages.lts.git-annex-with-assistant;
gitAnnex = git-annex;
git-annex-remote-b2 = pkgs.goPackages.git-annex-remote-b2;
git-annex-remote-b2 = callPackage ./git-annex-remote-b2 { };
# support for bugzilla
git-bz = callPackage ./git-bz { };

View File

@ -0,0 +1,17 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "git-annex-remote-b2-${version}";
version = "20151212-${stdenv.lib.strings.substring 0 7 rev}";
rev = "4db46b9fc9ef7b3f4851c2a6b061cb8f90f553ba";
goPackagePath = "github.com/encryptio/git-annex-remote-b2";
src = fetchgit {
inherit rev;
url = "https://github.com/encryptio/git-annex-remote-b2";
sha256 = "1139rzdvlj3hanqsccfinprvrzf4qjc5n4f0r21jp9j24yhjs6j2";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,9 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/pquerna/ffjson",
"gopkg.in/kothar/go-backblaze.v0"
]
}
]

View File

@ -0,0 +1,30 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "git-lfs-${version}";
# NOTE: use versions after 1.2.1
version = "2016-06-07";
rev = "12fe249f2eebb56608a825fdb4a68c00f090bc91";
goPackagePath = "github.com/github/git-lfs";
src = fetchFromGitHub {
inherit rev;
owner = "github";
repo = "git-lfs";
sha256 = "0cj7xbgvj706r1cyxqlcwfvy5zg2d19al04d441sxa6spr6xa4v6";
};
# Tests fail with 'lfstest-gitserver.go:46: main redeclared in this block'
excludedPackages = [ "test" ];
preBuild = ''
pushd go/src/github.com/github/git-lfs
go generate ./commands
popd
'';
postInstall = ''
rm -v $bin/bin/{man,script}
'';
}

View File

@ -1,5 +1,5 @@
{ stdenv, lib, callPackage, runCommand, writeReferencesToFile, writeText, vmTools, writeScript
, docker, shadow, utillinux, coreutils, jshon, e2fsprogs, goPackages, pigz }:
, docker, shadow, utillinux, coreutils, jshon, e2fsprogs, go, pigz }:
# WARNING: this API is unstable and may be subject to backwards-incompatible changes in the future.
@ -10,7 +10,7 @@ rec {
# We need to sum layer.tar, not a directory, hence tarsum instead of nix-hash.
# And we cannot untar it, because then we cannot preserve permissions ecc.
tarsum = runCommand "tarsum" {
buildInputs = [ goPackages.go ];
buildInputs = [ go ];
} ''
mkdir tarsum
cd tarsum

View File

@ -1,4 +1,4 @@
{ go, govers, parallel, lib }:
{ go, govers, parallel, lib, fetchgit, fetchhg }:
{ name, buildInputs ? [], nativeBuildInputs ? [], passthru ? {}, preFixup ? ""
@ -17,6 +17,9 @@
# Extra sources to include in the gopath
, extraSrcs ? [ ]
# go2nix dependency file
, goDeps ? null
, dontRenameImports ? false
# Do not enable this without good reason
@ -27,6 +30,8 @@
if disabled then throw "${name} not supported for go ${go.meta.branch}" else
with builtins;
let
args = lib.filterAttrs (name: _: name != "extraSrcs") args';
@ -35,6 +40,31 @@ let
removeExpr = refs: lib.flip lib.concatMapStrings refs (ref: ''
| sed "s,${ref},$(echo "${ref}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" \
'');
dep2src = goDep:
{
inherit (goDep) goPackagePath;
src = if goDep.fetch.type == "git" then
fetchgit {
inherit (goDep.fetch) url rev sha256;
}
else if goDep.fetch.type == "hg" then
fetchhg {
inherit (goDep.fetch) url rev sha256;
}
else abort "Unrecognized package fetch type";
};
importGodeps = { depsFile, filterPackages ? [] }:
let
deps = lib.importJSON depsFile;
external = filter (d: d ? include) deps;
direct = filter (d: d ? goPackagePath && (length filterPackages == 0 || elem d.goPackagePath filterPackages)) deps;
in
concatLists (map importGodeps (map (d: { depsFile = ./. + d.include; filterPackages = d.packages; }) external)) ++ (map dep2src direct);
goPath = if goDeps != null then importGodeps { depsFile = goDeps; } ++ extraSrcs
else extraSrcs;
in
go.stdenv.mkDerivation (
@ -53,13 +83,13 @@ go.stdenv.mkDerivation (
mkdir -p "go/src/$(dirname "$goPackagePath")"
mv "$sourceRoot" "go/src/$goPackagePath"
'' + lib.flip lib.concatMapStrings extraSrcs ({ src, goPackagePath }: ''
mkdir extraSrc
(cd extraSrc; unpackFile "${src}")
'' + lib.flip lib.concatMapStrings goPath ({ src, goPackagePath }: ''
mkdir goPath
(cd goPath; unpackFile "${src}")
mkdir -p "go/src/$(dirname "${goPackagePath}")"
chmod -R u+w extraSrc/*
mv extraSrc/* "go/src/${goPackagePath}"
rmdir extraSrc
chmod -R u+w goPath/*
mv goPath/* "go/src/${goPackagePath}"
rmdir goPath
'') + ''
export GOPATH=$NIX_BUILD_TOP/go:$GOPATH
@ -158,7 +188,9 @@ go.stdenv.mkDerivation (
disallowedReferences = lib.optional (!allowGoReference) go
++ lib.optional (!dontRenameImports) govers;
passthru = passthru // lib.optionalAttrs (goPackageAliases != []) { inherit goPackageAliases; };
passthru = passthru //
{ inherit go; } //
lib.optionalAttrs (goPackageAliases != []) { inherit goPackageAliases; };
enableParallelBuilding = enableParallelBuilding;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "deis-${version}";
version = "1.13.0";
rev = "v${version}";
goPackagePath = "github.com/deis/deis";
subPackages = [ "client" ];
postInstall = ''
if [ -f "$bin/bin/client" ]; then
mv "$bin/bin/client" "$bin/bin/deis"
fi
'';
src = fetchFromGitHub {
inherit rev;
owner = "deis";
repo = "deis";
sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,10 @@
[
{
"include": "../../../go-modules/libs.json",
"packages": [
"github.com/docopt/docopt-go",
"golang.org/x/crypto",
"gopkg.in/yaml.v2"
]
}
]

View File

@ -0,0 +1,16 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "glide-${version}";
version = "0.10.2";
rev = "${version}";
goPackagePath = "github.com/Masterminds/glide";
src = fetchFromGitHub {
inherit rev;
owner = "Masterminds";
repo = "glide";
sha256 = "1qb2n5i04gabb2snnwfr8wv4ypcp1pdzvgga62m9xkhk4p2w6pwl";
};
}

View File

@ -0,0 +1,25 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "go-bindata-${version}";
version = "20151023-${stdenv.lib.strings.substring 0 7 rev}";
rev = "a0ff2567cfb70903282db057e799fd826784d41d";
goPackagePath = "github.com/jteeuwen/go-bindata";
src = fetchgit {
inherit rev;
url = "https://github.com/jteeuwen/go-bindata";
sha256 = "0d6zxv0hgh938rf59p1k5lj0ymrb8kcps2vfrb9kaarxsvg7y69v";
};
excludedPackages = "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;
};
}

View File

@ -0,0 +1,17 @@
{ stdenv, lib, buildGoPackage, gotools, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "go-repo-root-${version}";
version = "20140911-${stdenv.lib.strings.substring 0 7 rev}";
rev = "90041e5c7dc634651549f96814a452f4e0e680f9";
goPackagePath = "github.com/cstrahan/go-repo-root";
src = fetchgit {
inherit rev;
url = "https://github.com/cstrahan/go-repo-root";
sha256 = "1rlzp8kjv0a3dnfhyqcggny0ad648j5csr2x0siq5prahlp48mg4";
};
buildInputs = [ gotools ];
}

View File

@ -0,0 +1,29 @@
{ stdenv, lib, buildGoPackage, go-bindata, goimports, nix-prefetch-git, git, makeWrapper,
fetchgit, fetchhg, fetchbzr, fetchsvn }:
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;
}

View 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"
]
}
]

View File

@ -0,0 +1,15 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "gocode-${version}";
version = "20150904-${stdenv.lib.strings.substring 0 7 rev}";
rev = "680a0fbae5119fb0dbea5dca1d89e02747a80de0";
goPackagePath = "github.com/nsf/gocode";
src = fetchgit {
inherit rev;
url = "https://github.com/nsf/gocode";
sha256 = "1ay2xakz4bcn8r3ylicbj753gjljvv4cj9l4wfly55cj1vjybjpv";
};
}

View File

@ -0,0 +1,16 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "goimports-${version}";
version = "20160519-${stdenv.lib.strings.substring 0 7 rev}";
rev = "9ae4729fba20b3533d829a9c6ba8195b068f2abc";
goPackagePath = "golang.org/x/tools";
subPackages = [ "cmd/goimports" ];
src = fetchgit {
inherit rev;
url = "https://go.googlesource.com/tools";
sha256 = "1j51aaskfqc953p5s9naqimr04hzfijm4yczdsiway1xnnvvpfr1";
};
}

View File

@ -0,0 +1,18 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "lint-${version}";
version = "20160428-${stdenv.lib.strings.substring 0 7 rev}";
rev = "c7bacac2b21ca01afa1dee0acf64df3ce047c28f";
goPackagePath = "github.com/golang/lint";
excludedPackages = "testdata";
src = fetchgit {
inherit rev;
url = "https://github.com/golang/lint";
sha256 = "024dllcmpg8lx78cqgq551i6f9w6qlykfcx8l7yazak9kjwhpwjg";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,8 @@
[
{
"include": "../../libs.json",
"packages": [
"golang.org/x/tools"
]
}
]

View File

@ -0,0 +1,15 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "gotags-${version}";
version = "20150803-${stdenv.lib.strings.substring 0 7 rev}";
rev = "be986a34e20634775ac73e11a5b55916085c48e7";
goPackagePath = "github.com/jstemmer/gotags";
src = fetchgit {
inherit rev;
url = "https://github.com/jstemmer/gotags";
sha256 = "071wyq90b06xlb3bb0l4qjz1gf4nnci4bcngiddfcxf2l41w1vja";
};
}

View File

@ -0,0 +1,44 @@
{ stdenv, lib, go, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "gotools-${version}";
version = "20160519-${stdenv.lib.strings.substring 0 7 rev}";
rev = "9ae4729fba20b3533d829a9c6ba8195b068f2abc";
goPackagePath = "golang.org/x/tools";
goPackageAliases = [ "code.google.com/p/go.tools" ];
src = fetchgit {
inherit rev;
url = "https://go.googlesource.com/tools";
sha256 = "1j51aaskfqc953p5s9naqimr04hzfijm4yczdsiway1xnnvvpfr1";
};
goDeps = ./deps.json;
preConfigure = ''
# Make the builtin tools available here
mkdir -p $bin/bin
eval $(go env | grep GOTOOLDIR)
find $GOTOOLDIR -type f | while read x; do
ln -sv "$x" "$bin/bin"
done
export GOTOOLDIR=$bin/bin
'';
excludedPackages = "\\("
+ stdenv.lib.concatStringsSep "\\|" ([ "testdata" ] ++ stdenv.lib.optionals (stdenv.lib.versionAtLeast go.meta.branch "1.5") [ "vet" "cover" ])
+ "\\)";
# Do not copy this without a good reason for enabling
# In this case tools is heavily coupled with go itself and embeds paths.
allowGoReference = true;
# Set GOTOOLDIR for derivations adding this to buildInputs
postInstall = ''
mkdir -p $bin/nix-support
substituteAll ${../../go-modules/tools/setup-hook.sh} $bin/nix-support/setup-hook.tmp
cat $bin/nix-support/setup-hook.tmp >> $bin/nix-support/setup-hook
rm $bin/nix-support/setup-hook.tmp
'';
}

View File

@ -0,0 +1,8 @@
[
{
"include": "../../libs.json",
"packages": [
"golang.org/x/net"
]
}
]

View File

@ -0,0 +1,17 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "govers-${version}";
version = "20150109-${stdenv.lib.strings.substring 0 7 rev}";
rev = "3b5f175f65d601d06f48d78fcbdb0add633565b9";
goPackagePath = "github.com/rogpeppe/govers";
src = fetchgit {
inherit rev;
url = "https://github.com/rogpeppe/govers";
sha256 = "0din5a7nff6hpc4wg0yad2nwbgy4q1qaazxl8ni49lkkr4hyp8pc";
};
dontRenameImports = true;
}

View File

@ -0,0 +1,18 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "gox-${version}";
version = "20140904-${stdenv.lib.strings.substring 0 7 rev}";
rev = "e8e6fd4fe12510cc46893dff18c5188a6a6dc549";
goPackagePath = "github.com/mitchellh/gox";
src = fetchgit {
inherit rev;
url = "https://github.com/mitchellh/gox";
sha256 = "14jb2vgfr6dv7zlw8i3ilmp125m5l28ljv41a66c9b8gijhm48k1";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,8 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/mitchellh/iochan"
]
}
]

View File

@ -1,4 +1,4 @@
{ stdenv, lib, go, gox, goPackages, fetchFromGitHub
{ stdenv, lib, gox, gotools, buildGoPackage, fetchFromGitHub
, fetchgit, fetchhg, fetchbzr, fetchsvn }:
stdenv.mkDerivation rec {
@ -6,10 +6,10 @@ stdenv.mkDerivation rec {
version = "0.10.1";
src = import ./deps.nix {
inherit stdenv lib go gox goPackages fetchgit fetchhg fetchbzr fetchsvn;
inherit stdenv lib gox gotools buildGoPackage fetchgit fetchhg fetchbzr fetchsvn;
};
buildInputs = [ go gox goPackages.tools ];
buildInputs = [ src.go gox gotools ];
configurePhase = ''
export GOPATH=$PWD/share/go

View File

@ -1,14 +1,11 @@
# This file was generated by go2nix.
{ stdenv, lib, go, gox, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }:
with goPackages;
{ stdenv, lib, gox, gotools, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "packer-${version}";
version = "20160507-${stdenv.lib.strings.substring 0 7 rev}";
rev = "4e5f65131b5491ab44ff8aa0626abe4a85597ac0";
buildInputs = [ go gox goPackages.tools ];
buildInputs = [ gox gotools ];
goPackagePath = "github.com/mitchellh/packer";
@ -379,15 +376,6 @@ buildGoPackage rec {
sha256 = "0ydhbxziy9204qr43pjdh88y2jg34g2mhzdapjyfpf8a1rin6dn3";
};
}
{
goPackagePath = "github.com/mitchellh/packer";
src = fetchgit {
url = "https://github.com/mitchellh/packer";
rev = "4e5f65131b5491ab44ff8aa0626abe4a85597ac0";
sha256 = "1a61f022h4ygnkp1lyr7vhq5w32a3f061dymgkqmz4c3b8fzcc10";
};
}
{
goPackagePath = "github.com/mitchellh/panicwrap";

View File

@ -0,0 +1,15 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "pup-${version}";
version = "20160425-${stdenv.lib.strings.substring 0 7 rev}";
rev = "e76307d03d4d2e0f01fb7ab51dee09f2671c3db6";
goPackagePath = "github.com/ericchiang/pup";
src = fetchgit {
inherit rev;
url = "https://github.com/ericchiang/pup";
sha256 = "15lwas4cjchlwhrwnd5l4gxcwqdfgazdyh466hava5qzxacqxrm5";
};
}

View File

@ -1,6 +1,6 @@
{ lib, goPackages, fetchFromGitHub }:
{ lib, buildGoPackage, fetchFromGitHub }:
goPackages.buildGoPackage rec {
buildGoPackage rec {
name = "remarshal-${rev}";
rev = "0.3.0";
goPackagePath = "github.com/dbohdan/remarshal";
@ -12,7 +12,7 @@ goPackages.buildGoPackage rec {
sha256 = "0lhsqca3lq3xvdwsmrngv4p6b7k2lkbfnxnk5qj6jdd5y7f4b496";
};
buildInputs = with goPackages; [ toml yaml-v2 ];
goDeps = ./deps.json;
meta = with lib; {
description = "Convert between TOML, YAML and JSON";

View File

@ -0,0 +1,9 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/BurntSushi/toml",
"gopkg.in/yaml.v2"
]
}
]

View File

@ -0,0 +1,25 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "textql-${version}";
version = "2.0.3";
rev = "${version}";
goPackagePath = "github.com/dinedal/textql";
src = fetchFromGitHub {
inherit rev;
owner = "dinedal";
repo = "textql";
sha256 = "1b61w4pc5gl7m12mphricihzq7ifnzwn0yyw3ypv0d0fj26h5hc3";
};
goDeps = ./deps.json;
meta = with stdenv.lib; {
description = "Execute SQL against structured text like CSV or TSV";
homepage = https://github.com/dinedal/textql;
license = licenses.mit;
maintainers = with maintainers; [ vrthra ];
};
}

View File

@ -0,0 +1,8 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/mattn/go-sqlite3"
]
}
]

View File

@ -1,7 +1,7 @@
# TODO check that no license information gets lost
{ fetchurl, bash, stdenv, python, go, cmake, vim, vimUtils, perl, ruby, unzip
, which, fetchgit, fetchFromGitHub, fetchhg, fetchzip, llvmPackages, zip
, vim_configurable, vimPlugins, xkb_switch, git, racerdRust, goPackages
, vim_configurable, vimPlugins, xkb_switch, git, racerdRust, fzf
, Cocoa ? null
}:
@ -98,9 +98,9 @@ rec {
wombat256 = wombat256-vim; # backwards compat, added 2015-7-8
yankring = YankRing;
fzf = buildVimPluginFrom2Nix {
name = goPackages.fzf.name;
src = "${goPackages.fzf}/share/go/src/github.com/junegunn/fzf";
fzfWrapper = buildVimPluginFrom2Nix {
name = fzf.name;
src = "${fzf}/share/go/src/github.com/junegunn/fzf";
dependencies = [];
};

View File

@ -0,0 +1,18 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "caddy-${version}";
version = "0.8.3";
rev = "e2234497b79603388b58ba226abb157aa4aaf065";
goPackagePath = "github.com/mholt/caddy";
src = fetchFromGitHub {
inherit rev;
owner = "mholt";
repo = "caddy";
sha256 = "1snijkbz02yr7wij7bcmrj4257709sbklb3nhb5qmy95b9ssffm6";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,23 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/BurntSushi/toml",
"github.com/flynn/go-shlex",
"github.com/hashicorp/go-syslog",
"gopkg.in/yaml.v2",
"github.com/xenolf/lego",
"golang.org/x/crypto",
"gopkg.in/natefinch/lumberjack.v2",
"github.com/shurcooL/sanitized_anchor_name",
"gopkg.in/square/go-jose.v1",
"github.com/mholt/archiver",
"github.com/dustin/go-humanize",
"github.com/gorilla/websocket",
"github.com/jimstudt/http-authentication",
"github.com/miekg/dns",
"golang.org/x/net",
"github.com/russross/blackfriday"
]
}
]

View File

@ -0,0 +1,19 @@
{ stdenv, lib, buildGoPackage, consul-ui, fetchFromGitHub }:
buildGoPackage rec {
name = "consul-${version}";
version = "0.6.4";
rev = "v${version}";
goPackagePath = "github.com/hashicorp/consul";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "consul";
inherit rev;
sha256 = "0p6m2rl0d30w418n4fzc4vymqs3vzfa468czmy4znkjmxdl5vp5a";
};
# Keep consul.ui for backward compatability
passthru.ui = consul-ui;
}

View File

@ -1,4 +1,4 @@
{ stdenv, goPackages, ruby, bundlerEnv, zip }:
{ stdenv, consul, ruby, bundlerEnv, zip }:
let
# `sass` et al
@ -11,12 +11,14 @@ let
in
stdenv.mkDerivation {
name = "consul-ui-${goPackages.consul.rev}";
name = "consul-ui-${consul.version}";
src = goPackages.consul.src;
src = consul.src;
buildInputs = [ ruby gems zip ];
patchPhase = "patchShebangs ./ui/scripts/dist.sh";
buildPhase = ''
# Build ui static files
cd ui

View File

@ -0,0 +1,20 @@
{ stdenv, lib, libpcap, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "etcd-${version}";
version = "2.3.0";
rev = "v${version}";
goPackagePath = "github.com/coreos/etcd";
src = fetchFromGitHub {
inherit rev;
owner = "coreos";
repo = "etcd";
sha256 = "1cchlhsdbbqal145cvdiq7rzqqi131iq7z0r2hmzwx414k04wyn7";
};
goDeps = ./deps.json;
buildInputs = [ libpcap ];
}

View File

@ -0,0 +1,9 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/olekukonko/tablewriter",
"github.com/mattn/go-runewidth"
]
}
]

View File

@ -0,0 +1,25 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "gotty-${version}";
version = "0.0.10";
rev = "v${version}";
goPackagePath = "github.com/yudai/gotty";
src = fetchFromGitHub {
inherit rev;
owner = "yudai";
repo = "gotty";
sha256 = "0gvnbr61d5si06ik2j075jg00r9b94ryfgg06nqxkf10dp8lgi09";
};
goDeps = ./deps.json;
meta = with stdenv.lib; {
description = "Share your terminal as a web application";
homepage = "https://github.com/yudai/gotty";
maintainers = with maintainers; [ matthiasbeyer ];
license = licenses.mit;
};
}

View File

@ -0,0 +1,15 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/kr/pty",
"github.com/braintree/manners",
"github.com/codegangsta/cli",
"github.com/elazarl/go-bindata-assetfs",
"github.com/fatih/structs",
"github.com/gorilla/websocket",
"github.com/hashicorp/hcl",
"github.com/hashicorp/go-multierror"
]
}
]

View File

@ -0,0 +1,36 @@
{ stdenv, lib, sudo, utillinux, coreutils, systemd, cryptsetup,
buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "interlock-${version}";
version = "2016.04.13";
rev = "v${version}";
goPackagePath = "github.com/inversepath/interlock";
subPackages = [ "./cmd/interlock" ];
src = fetchFromGitHub {
inherit rev;
owner = "inversepath";
repo = "interlock";
sha256 = "06aqx3jy744yx29xyg8ips0dw16186hfqbxdv3hfrmwxmaxhl4lz";
};
goDeps = ./deps.json;
nativeBuildInputs = [ sudo ];
buildFlags = [ "-tags textsecure" ];
postPatch = ''
grep -lr '/s\?bin/' | xargs sed -i \
-e 's|/bin/mount|${utillinux}/bin/mount|' \
-e 's|/bin/umount|${utillinux}/bin/umount|' \
-e 's|/bin/cp|${coreutils}/bin/cp|' \
-e 's|/bin/mv|${coreutils}/bin/mv|' \
-e 's|/bin/chown|${coreutils}/bin/chown|' \
-e 's|/bin/date|${coreutils}/bin/date|' \
-e 's|/sbin/poweroff|${systemd}/sbin/poweroff|' \
-e 's|/usr/bin/sudo|/var/setuid-wrappers/sudo|' \
-e 's|/sbin/cryptsetup|${cryptsetup}/bin/cryptsetup|'
'';
}

View File

@ -0,0 +1,14 @@
[
{
"include": "../../../go-modules/libs.json",
"packages": [
"github.com/Sirupsen/logrus",
"github.com/agl/ed25519",
"github.com/golang/protobuf",
"github.com/janimo/textsecure",
"golang.org/x/crypto",
"golang.org/x/net",
"gopkg.in/yaml.v2"
]
}
]

View File

@ -0,0 +1,21 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "mesos-dns-${version}";
version = "0.1.2";
rev = "v${version}";
goPackagePath = "github.com/mesosphere/mesos-dns";
# Avoid including the benchmarking test helper in the output:
subPackages = [ "." ];
src = fetchFromGitHub {
inherit rev;
owner = "mesosphere";
repo = "mesos-dns";
sha256 = "0zs6lcgk43j7jp370qnii7n55cd9pa8gl56r8hy4nagfvlvrcm02";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,18 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/gogo/protobuf",
"github.com/golang/glog",
"github.com/mesos/mesos-go",
"github.com/pmezard/go-difflib",
"github.com/samuel/go-zookeeper",
"github.com/stretchr/objx",
"github.com/davecgh/go-spew",
"github.com/emicklei/go-restful",
"github.com/stretchr/testify",
"github.com/miekg/dns",
"golang.org/x/net"
]
}
]

View File

@ -1,6 +1,6 @@
{ lib, fetchFromGitHub, goPackages }:
{ lib, fetchFromGitHub, buildGoPackage }:
goPackages.buildGoPackage rec {
buildGoPackage rec {
name = "bosun";
rev = "0.5.0-alpha";

View File

@ -0,0 +1,16 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "consul-alerts-${version}";
version = "0.3.3";
rev = "v${version}";
goPackagePath = "github.com/AcalephStorage/consul-alerts";
src = fetchFromGitHub {
inherit rev;
owner = "AcalephStorage";
repo = "consul-alerts";
sha256 = "1w0mb20w1yazyh84sa30bsw271c5nm7lsx2qg0g3gf6mxdb63lpq";
};
}

View File

@ -1,6 +1,6 @@
{ lib, goPackages, fetchurl, fetchFromGitHub }:
{ lib, buildGoPackage, fetchurl, fetchFromGitHub }:
goPackages.buildGoPackage rec {
buildGoPackage rec {
version = "3.0.1";
name = "grafana-v${version}";
goPackagePath = "github.com/grafana/grafana";

View File

@ -1,6 +1,6 @@
{ lib, goPackages, fetchFromGitHub, docker }:
{ lib, buildGoPackage, fetchFromGitHub, docker }:
goPackages.buildGoPackage rec {
buildGoPackage rec {
rev = "3057a2c07061c8d9ffaf77e5442ffd7512ac0133";
name = "heapster-${lib.strings.substring 0 7 rev}";
goPackagePath = "k8s.io/heapster";

View File

@ -0,0 +1,37 @@
{ stdenv, lib, go, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "alertmanager-${version}";
version = "0.1.0";
rev = "${version}";
goPackagePath = "github.com/prometheus/alertmanager";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "alertmanager";
sha256 = "1ya465bns6cj2lqbipmfm13wz8kxii5h9mm7lc0ba1xv26xx5zs7";
};
# Tests exist, but seem to clash with the firewall.
doCheck = false;
buildFlagsArray = let t = "${goPackagePath}/version"; in ''
-ldflags=
-X ${t}.Version=${version}
-X ${t}.Revision=unknown
-X ${t}.Branch=unknown
-X ${t}.BuildUser=nix@nixpkgs
-X ${t}.BuildDate=unknown
-X ${t}.GoVersion=${stdenv.lib.getVersion go}
'';
meta = with stdenv.lib; {
description = "Alert dispatcher for the Prometheus monitoring system";
homepage = https://github.com/prometheus/alertmanager;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,26 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "prometheus_cli-${version}";
version = "0.3.0";
rev = version;
goPackagePath = "github.com/prometheus/prometheus_cli";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "prometheus_cli";
sha256 = "1qxqrcbd0d4mrjrgqz882jh7069nn5gz1b84rq7d7z1f1dqhczxn";
};
goDeps = ./cli_deps.json;
meta = with stdenv.lib; {
description = "Command line tool for querying the Prometheus HTTP API";
homepage = https://github.com/prometheus/prometheus_cli;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,8 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/prometheus/client_golang"
]
}
]

View File

@ -0,0 +1,26 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "collectd-exporter-${version}";
version = "0.1.0";
rev = version;
goPackagePath = "github.com/prometheus/collectd_exporter";
src= fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "collectd_exporter";
sha256 = "165zsdn0lffb6fvxz75szmm152a6wmia5skb96k1mv59qbmn9fi1";
};
goDeps = ./collectd-exporter_deps.json;
meta = with stdenv.lib; {
description = "Relay server for exporting metrics from collectd to Prometheus";
homepage = https://github.com/prometheus/alertmanager;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,14 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model",
"github.com/prometheus/procfs",
"bitbucket.org/ww/goautoneg",
"github.com/beorn7/perks",
"github.com/golang/protobuf",
"github.com/matttproud/golang_protobuf_extensions"
]
}
]

View File

@ -0,0 +1,42 @@
{ stdenv, lib, go, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "prometheus-${version}";
version = "0.17.0";
rev = "${version}";
goPackagePath = "github.com/prometheus/prometheus";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "prometheus";
sha256 = "176198krna2i37dfhwsqi7m36sqn175yiny6n52vj27mc9s8ggzx";
};
docheck = true;
buildFlagsArray = let t = "${goPackagePath}/version"; in ''
-ldflags=
-X ${t}.Version=${version}
-X ${t}.Revision=unknown
-X ${t}.Branch=unknown
-X ${t}.BuildUser=nix@nixpkgs
-X ${t}.BuildDate=unknown
-X ${t}.GoVersion=${stdenv.lib.getVersion go}
'';
preInstall = ''
mkdir -p "$bin/share/doc/prometheus" "$bin/etc/prometheus"
cp -a $src/documentation/* $bin/share/doc/prometheus
cp -a $src/console_libraries $src/consoles $bin/etc/prometheus
'';
meta = with stdenv.lib; {
description = "Service monitoring system and time series database";
homepage = http://prometheus.io;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,26 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "haproxy_exporter-${version}";
version = "0.4.0";
rev = version;
goPackagePath = "github.com/prometheus/haproxy_exporter";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "haproxy_exporter";
sha256 = "0cwls1d4hmzjkwc50mjkxjb4sa4q6yq581wlc5sg9mdvl6g91zxr";
};
goDeps = ./haproxy-exporter_deps.json;
meta = with stdenv.lib; {
description = "HAProxy Exporter for the Prometheus monitoring system";
homepage = https://github.com/prometheus/haproxy_exporter;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,14 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model",
"github.com/matttproud/golang_protobuf_extensions",
"github.com/prometheus/procfs",
"github.com/beorn7/perks",
"github.com/golang/protobuf",
"bitbucket.org/ww/goautoneg"
]
}
]

View File

@ -0,0 +1,26 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "mesos_exporter-${version}";
version = "0.1.0";
rev = version;
goPackagePath = "github.com/prometheus/mesos_exporter";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "mesos_exporter";
sha256 = "059az73j717gd960g4jigrxnvqrjh9jw1c324xpwaafa0bf10llm";
};
goDeps = ./mesos-exporter_deps.json;
meta = with stdenv.lib; {
description = "Export Mesos metrics to Prometheus";
homepage = https://github.com/prometheus/mesos_exporter;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,16 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/golang/glog",
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model",
"github.com/antonlindstrom/mesos_stats",
"github.com/beorn7/perks",
"github.com/golang/protobuf",
"github.com/matttproud/golang_protobuf_extensions",
"github.com/prometheus/procfs",
"bitbucket.org/ww/goautoneg"
]
}
]

View File

@ -0,0 +1,26 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "mysqld_exporter-${version}";
version = "0.1.0";
rev = version;
goPackagePath = "github.com/prometheus/mysqld_exporter";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "mysqld_exporter";
sha256 = "10xnyxyb6saz8pq3ijp424hxy59cvm1b5c9zcbw7ddzzkh1f6jd9";
};
goDeps = ./mysqld-exporter_deps.json;
meta = with stdenv.lib; {
description = "Prometheus exporter for MySQL server metrics";
homepage = https://github.com/prometheus/mysqld_exporter;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,15 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model",
"github.com/matttproud/golang_protobuf_extensions",
"github.com/prometheus/procfs",
"github.com/beorn7/perks",
"github.com/golang/protobuf",
"bitbucket.org/ww/goautoneg",
"github.com/go-sql-driver/mysql"
]
}
]

View File

@ -0,0 +1,25 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "nginx_exporter-${version}";
version = "20160524-${stdenv.lib.strings.substring 0 7 rev}";
rev = "2cf16441591f6b6e58a8c0439dcaf344057aea2b";
goPackagePath = "github.com/discordianfish/nginx_exporter";
src = fetchgit {
inherit rev;
url = "https://github.com/discordianfish/nginx_exporter";
sha256 = "0p9j0bbr2lr734980x2p8d67lcify21glwc5k3i3j4ri4vadpxvc";
};
goDeps = ./nginx-exporter_deps.json;
meta = with stdenv.lib; {
description = "Metrics relay from nginx stats to Prometheus";
homepage = https://github.com/discordianfish/nginx_exporter;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,16 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/prometheus/log",
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model",
"github.com/prometheus/procfs",
"github.com/Sirupsen/logrus",
"github.com/beorn7/perks",
"github.com/golang/protobuf",
"github.com/matttproud/golang_protobuf_extensions",
"bitbucket.org/ww/goautoneg"
]
}
]

View File

@ -0,0 +1,28 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "node_exporter-${version}";
version = "0.11.0";
rev = version;
goPackagePath = "github.com/prometheus/node_exporter";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "node_exporter";
sha256 = "149fs9yxnbiyd4ww7bxsv730mcskblpzb3cs4v12jnq2v84a4kk4";
};
goDeps = ./node-exporter_deps.json;
doCheck = true;
meta = with stdenv.lib; {
description = "Prometheus exporter for machine metrics";
homepage = https://github.com/prometheus/node_exporter;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,18 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/soundcloud/go-runit",
"github.com/beevik/ntp",
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model",
"bitbucket.org/ww/goautoneg",
"github.com/Sirupsen/logrus",
"github.com/beorn7/perks",
"github.com/matttproud/golang_protobuf_extensions",
"github.com/prometheus/log",
"github.com/golang/protobuf",
"github.com/prometheus/procfs"
]
}
]

View File

@ -0,0 +1,26 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "prom2json-${version}";
version = "0.1.0";
rev = "${version}";
goPackagePath = "github.com/prometheus/prom2json";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "prom2json";
sha256 = "0wwh3mz7z81fwh8n78sshvj46akcgjhxapjgfic5afc4nv926zdl";
};
goDeps = ./prom2json_deps.json;
meta = with stdenv.lib; {
description = "Tool to scrape a Prometheus client and dump the result as JSON";
homepage = https://github.com/prometheus/prom2json;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,11 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/golang/protobuf",
"github.com/matttproud/golang_protobuf_extensions",
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model"
]
}
]

View File

@ -0,0 +1,45 @@
{ stdenv, lib, go, buildGoPackage, go-bindata, fetchFromGitHub }:
buildGoPackage rec {
name = "pushgateway-${version}";
version = "0.1.1";
rev = version;
goPackagePath = "github.com/prometheus/pushgateway";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "pushgateway";
sha256 = "17q5z9msip46wh3vxcsq9lvvhbxg75akjjcr2b29zrky8bp2m230";
};
goDeps = ./pushgateway_deps.json;
buildInputs = [ go-bindata ];
preBuild = ''
(
cd "go/src/$goPackagePath"
go-bindata ./resources/
)
'';
buildFlagsArray = ''
-ldflags=
-X main.buildVersion=${version}
-X main.buildRev=${rev}
-X main.buildBranch=master
-X main.buildUser=nix@nixpkgs
-X main.buildDate=20150101-00:00:00
-X main.goVersion=${stdenv.lib.getVersion go}
'';
meta = with stdenv.lib; {
description = "Allows ephemeral and batch jobs to expose metrics to Prometheus";
homepage = https://github.com/prometheus/pushgateway;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,15 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/julienschmidt/httprouter",
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model",
"bitbucket.org/ww/goautoneg",
"github.com/golang/protobuf",
"github.com/matttproud/golang_protobuf_extensions",
"github.com/prometheus/procfs",
"github.com/beorn7/perks"
]
}
]

View File

@ -0,0 +1,26 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "statsd_bridge-${version}";
version = "0.1.0";
rev = version;
goPackagePath = "github.com/prometheus/statsd_bridge";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "statsd_bridge";
sha256 = "1fndpmd1k0a3ar6f7zpisijzc60f2dng5399nld1i1cbmd8jybjr";
};
goDeps = ./statsd-bridge_deps.json;
meta = with stdenv.lib; {
description = "Receives StatsD-style metrics and exports them to Prometheus";
homepage = https://github.com/prometheus/statsd_bridge;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,15 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/howeyc/fsnotify",
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model",
"bitbucket.org/ww/goautoneg",
"github.com/beorn7/perks",
"github.com/golang/protobuf",
"github.com/matttproud/golang_protobuf_extensions",
"github.com/prometheus/procfs"
]
}
]

View File

@ -1,6 +1,6 @@
{ lib, goPackages, fetchFromGitHub }:
{ lib, buildGoPackage, fetchFromGitHub }:
goPackages.buildGoPackage rec {
buildGoPackage rec {
name = "influxdb-${rev}";
rev = "v0.9.4";
goPackagePath = "github.com/influxdb/influxdb";
@ -14,10 +14,7 @@ goPackages.buildGoPackage rec {
excludedPackages = "test";
propagatedBuildInputs = with goPackages; [
raft raft-boltdb snappy crypto gogo.protobuf pool pat toml
gollectd statik liner
];
goDeps = ./deps.json;
meta = with lib; {
description = "An open-source distributed time series database";

View File

@ -0,0 +1,21 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/peterh/liner",
"github.com/BurntSushi/toml",
"github.com/kimor79/gollectd",
"github.com/bmizerany/pat",
"gopkg.in/fatih/pool.v2",
"github.com/rakyll/statik",
"github.com/armon/go-metrics",
"github.com/boltdb/bolt",
"github.com/golang/snappy",
"github.com/hashicorp/go-msgpack",
"github.com/hashicorp/raft-boltdb",
"golang.org/x/crypto",
"github.com/gogo/protobuf",
"github.com/hashicorp/raft"
]
}
]

View File

@ -0,0 +1,18 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "nsq-${version}";
version = "0.3.5";
rev = "v${version}";
goPackagePath = "github.com/bitly/nsq";
src = fetchFromGitHub {
inherit rev;
owner = "bitly";
repo = "nsq";
sha256 = "1r7jgplzn6bgwhd4vn8045n6cmm4iqbzssbjgj7j1c28zbficy2f";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,16 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/mreiferson/go-snappystream",
"github.com/bitly/go-nsq",
"github.com/bitly/go-simplejson",
"github.com/blang/semver",
"github.com/bmizerany/perks",
"github.com/BurntSushi/toml",
"github.com/bitly/go-hostpool",
"github.com/bitly/timer_metrics",
"github.com/mreiferson/go-options"
]
}
]

View File

@ -0,0 +1,17 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "oauth2_proxy-${version}";
version = "20160120-${stdenv.lib.strings.substring 0 7 rev}";
rev = "10f47e325b782a60b8689653fa45360dee7fbf34";
goPackagePath = "github.com/bitly/oauth2_proxy";
src = fetchgit {
inherit rev;
url = "https://github.com/bitly/oauth2_proxy";
sha256 = "13f6kaq15f6ial9gqzrsx7i94jhd5j70js2k93qwxcw1vkh1b6si";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,16 @@
[
{
"include": "../../libs.json",
"packages": [
"google.golang.org/api",
"google.golang.org/cloud",
"golang.org/x/oauth2",
"github.com/18F/hmacauth",
"github.com/mreiferson/go-options",
"github.com/BurntSushi/toml",
"github.com/bitly/go-simplejson",
"golang.org/x/net",
"gopkg.in/fsnotify.v1"
]
}
]

View File

@ -0,0 +1,17 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "serf-${version}";
version = "20150515-${stdenv.lib.strings.substring 0 7 rev}";
rev = "668982d8f90f5eff4a766583c1286393c1d27f68";
goPackagePath = "github.com/hashicorp/serf";
src = fetchgit {
inherit rev;
url = "https://github.com/hashicorp/serf";
sha256 = "1h05h5xhaj27r1mh5zshnykax29lqjhfc0bx4v9swiwb873c24qk";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,23 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/armon/go-metrics",
"github.com/mattn/go-isatty",
"github.com/hashicorp/logutils",
"github.com/armon/go-radix",
"github.com/bgentry/speakeasy",
"github.com/hashicorp/go-syslog",
"github.com/hashicorp/memberlist",
"github.com/mitchellh/mapstructure",
"github.com/armon/circbuf",
"github.com/hashicorp/go-msgpack",
"github.com/hashicorp/go.net",
"github.com/hashicorp/mdns",
"github.com/mitchellh/cli",
"github.com/ryanuber/columnize",
"github.com/miekg/dns",
"golang.org/x/crypto"
]
}
]

View File

@ -0,0 +1,18 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "skydns-${version}";
version = "2.5.3a";
rev = "${version}";
goPackagePath = "github.com/skynetservices/skydns";
src = fetchFromGitHub {
inherit rev;
owner = "skynetservices";
repo = "skydns";
sha256 = "0i1iaif79cwnwm7pc8nxfa261cgl4zhm3p2a5a3smhy1ibgccpq7";
};
goDeps = ./deps.json;
}

View File

@ -0,0 +1,21 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/miekg/dns",
"github.com/prometheus/client_golang",
"github.com/prometheus/client_model",
"bitbucket.org/ww/goautoneg",
"github.com/prometheus/common",
"github.com/prometheus/procfs",
"github.com/coreos/go-systemd",
"github.com/matttproud/golang_protobuf_extensions",
"github.com/ugorji/go",
"github.com/golang/protobuf",
"github.com/stathat/go",
"github.com/beorn7/perks",
"github.com/coreos/go-etcd",
"github.com/rcrowley/go-metrics"
]
}
]

View File

@ -0,0 +1,17 @@
{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "oh-${version}";
version = "20160522-${stdenv.lib.strings.substring 0 7 rev}";
rev = "0daaf4081475fb9d6b3801c85019bdd57b2ee9b4";
goPackagePath = "github.com/michaelmacinnis/oh";
src = fetchgit {
inherit rev;
url = "https://github.com/michaelmacinnis/oh";
sha256 = "0ajidzs0aisbw74nri9ks6sx6644nmwkisc9mvxm3f89zmnlsgwr";
};
goDeps = ./deps.json;
}

10
pkgs/shells/oh/deps.json Normal file
View File

@ -0,0 +1,10 @@
[
{
"include": "../../libs.json",
"packages": [
"github.com/michaelmacinnis/adapted",
"github.com/peterh/liner",
"golang.org/x/sys"
]
}
]

View File

@ -0,0 +1,26 @@
{ stdenv, lib, xorg, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
buildGoPackage rec {
name = "go-sct-${version}";
version = "20160529-${stdenv.lib.strings.substring 0 7 rev}";
rev = "1d6b5e05a0b63bfeac9df55003efec352e1bc19d";
goPackagePath = "github.com/d4l3k/go-sct";
src = fetchgit {
inherit rev;
url = "https://github.com/d4l3k/go-sct";
sha256 = "1iqdagrq0j7sqxgsj31skgk73k2rbpbvj41v087af9103wf8h9z7";
};
goDeps = ./deps.json;
buildInputs = [ xorg.libX11 xorg.libXrandr ];
meta = with stdenv.lib; {
description = "Color temperature setting library and CLI that operates in a similar way to f.lux and Redshift";
license = licenses.mit;
maintainers = with maintainers; [ cstrahan ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,8 @@
[
{
"include": "../../../go-modules/libs.json",
"packages": [
"github.com/cpucycle/astrotime"
]
}
]

View File

@ -0,0 +1,33 @@
{ stdenv, lib, pkgconfig, lxc, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "lxd-${version}";
version = "2.0.0.rc4";
rev = "lxd-${version}";
goPackagePath = "github.com/lxc/lxd";
src = fetchFromGitHub {
inherit rev;
owner = "lxc";
repo = "lxd";
sha256 = "1rpyyj6d38d9kmb47dcmy1x41fiacj384yx01yslsrj2l6qxcdjn";
};
goDeps = ./deps.json;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ lxc ];
postInstall = ''
cp go/src/$goPackagePath/scripts/lxd-images $bin/bin
'';
meta = with stdenv.lib; {
description = "Daemon based on liblxc offering a REST API to manage containers";
homepage = https://github.com/lxc/lxd;
license = licenses.asl20;
maintainers = with maintainers; [ globin fpletz ];
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,26 @@
[
{
"include": "../../../go-modules/libs.json",
"packages": [
"github.com/golang/protobuf",
"github.com/gorilla/websocket",
"github.com/syndtr/gocapability",
"gopkg.in/inconshreveable/log15.v2",
"github.com/gorilla/mux",
"github.com/pborman/uuid",
"golang.org/x/crypto",
"gopkg.in/flosch/pongo2.v3",
"gopkg.in/tomb.v2",
"github.com/olekukonko/tablewriter",
"github.com/mattn/go-sqlite3",
"gopkg.in/lxc/go-lxc.v2",
"gopkg.in/yaml.v2",
"github.com/mattn/go-runewidth",
"github.com/coreos/go-systemd",
"github.com/dustinkirkland/golang-petname",
"github.com/gorilla/context",
"github.com/mattn/go-colorable",
"github.com/gosexy/gettext"
]
}
]

Some files were not shown because too many files have changed in this diff Show More