Port serfdom to buildGoPackage
This commit is contained in:
parent
a20460462d
commit
ee90577704
@ -1,26 +1,22 @@
|
||||
{ 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
|
||||
'';
|
||||
|
||||
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;
|
||||
|
@ -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);
|
||||
}
|
@ -24,7 +24,7 @@ buildGoPackage rec {
|
||||
export sourceRoot=$sourceRoot/src/ngrok
|
||||
'';
|
||||
|
||||
buildInputs = [ git log4go websocket go-vhost mousetrap termbox-go go-metrics
|
||||
buildInputs = [ git log4go websocket go-vhost mousetrap termbox-go rcrowley.go-metrics
|
||||
yaml-v1 go-bindata go-update binarydist osext ];
|
||||
|
||||
makeFlags = "-tags release";
|
||||
|
@ -94,6 +94,18 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
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}";
|
||||
@ -104,7 +116,31 @@ let self = _self // overrides; _self = with self; {
|
||||
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";
|
||||
@ -118,6 +154,30 @@ let self = _self // overrides; _self = with self; {
|
||||
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}";
|
||||
@ -129,6 +189,17 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
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}";
|
||||
@ -175,9 +246,21 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
go-metrics = buildGoPackage rec {
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
rcrowley.go-metrics = buildGoPackage rec {
|
||||
rev = "f770e6f5e91a8770cecee02d5d3f7c00b023b4df";
|
||||
name = "go-metrics-${stdenv.lib.strings.substring 0 7 rev}";
|
||||
name = "rcrowley.go-metrics-${stdenv.lib.strings.substring 0 7 rev}";
|
||||
goPackagePath = "github.com/rcrowley/go-metrics";
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
@ -188,6 +271,42 @@ let self = _self // overrides; _self = with self; {
|
||||
|
||||
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-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";
|
||||
@ -254,6 +373,69 @@ let self = _self // overrides; _self = with self; {
|
||||
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}";
|
||||
@ -266,6 +448,18 @@ let self = _self // overrides; _self = with self; {
|
||||
};
|
||||
};
|
||||
|
||||
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}";
|
||||
|
Loading…
Reference in New Issue
Block a user