Merge pull request #4042 from wkennington/master.consul

Consul: 0.3.0 -> 0.4.0
This commit is contained in:
William A. Kennington III 2014-09-11 15:57:11 -07:00
commit 5e43f1434d
5 changed files with 162 additions and 128 deletions

View File

@ -14,8 +14,8 @@ g: # Get dependencies from patched gems
arel = g.arel_5_0_1_20140414130214;
atoulme_Antwrap = g.atoulme_Antwrap_0_7_4;
autotest_rails = g.autotest_rails_4_2_1;
aws_sdk = g.aws_sdk_1_52_0;
aws_sdk_v1 = g.aws_sdk_v1_1_52_0;
aws_sdk = g.aws_sdk_1_53_0;
aws_sdk_v1 = g.aws_sdk_v1_1_53_0;
backports = g.backports_3_6_0;
bitbucket_backup = g.bitbucket_backup_0_3_1;
builder = g.builder_3_2_2;
@ -36,6 +36,7 @@ g: # Get dependencies from patched gems
ethon = g.ethon_0_7_1;
eventmachine = g.eventmachine_1_0_3;
eventmachine_tail = g.eventmachine_tail_0_6_4;
execjs = g.execjs_2_2_1;
fakes3 = g.fakes3_0_1_5_2;
faraday = g.faraday_0_9_0;
faraday_middleware = g.faraday_middleware_0_9_1;
@ -90,6 +91,7 @@ g: # Get dependencies from patched gems
rake = g.rake_10_3_2;
rb_fsevent = g.rb_fsevent_0_9_4;
rdiscount = g.rdiscount_2_1_7_1;
rdoc = g.rdoc_4_1_2;
remote_syslog = g.remote_syslog_1_6_14;
riemann_dash = g.riemann_dash_0_2_9;
right_aws = g.right_aws_3_1_0;
@ -124,6 +126,7 @@ g: # Get dependencies from patched gems
trollop = g.trollop_2_0;
typhoeus = g.typhoeus_0_6_9;
tzinfo = g.tzinfo_1_2_2;
uglifier = g.uglifier_2_5_3;
unf = g.unf_0_1_4;
unf_ext = g.unf_ext_0_0_6;
uuid = g.uuid_2_3_7;
@ -135,7 +138,7 @@ g: # Get dependencies from patched gems
xml_simple = g.xml_simple_1_1_2;
yajl_ruby = g.yajl_ruby_1_2_1;
};
gem_nix_args = [ ''autotest-rails'' ''aws-sdk'' ''bitbucket-backup'' ''buildr'' ''cucumber'' ''erubis'' ''fakes3'' ''foreman'' ''gettext'' ''iconv'' ''jsduck'' ''lockfile'' ''mechanize'' ''nix'' ''papertrail-cli'' ''rails'' ''rake'' ''rb-fsevent'' ''remote_syslog'' ''riemann-dash'' ''right_aws'' ''rmail'' ''sass'' ''selenium-webdriver'' ''sinatra-1.3.2'' ''taskjuggler'' ''terminal-notifier'' ''thin'' ''travis'' ''trollop'' ''uuid'' ''xapian-full'' ''xapian-ruby'' ''yajl-ruby'' ];
gem_nix_args = [ ''autotest-rails'' ''aws-sdk'' ''bitbucket-backup'' ''buildr'' ''cucumber'' ''erubis'' ''execjs'' ''fakes3'' ''foreman'' ''gettext'' ''iconv'' ''jsduck'' ''lockfile'' ''mechanize'' ''nix'' ''papertrail-cli'' ''rails'' ''rake'' ''rb-fsevent'' ''rdoc'' ''remote_syslog'' ''riemann-dash'' ''right_aws'' ''rmail'' ''sass'' ''selenium-webdriver'' ''sinatra-1.3.2'' ''taskjuggler'' ''terminal-notifier'' ''thin'' ''travis'' ''trollop'' ''uglifier'' ''uuid'' ''xapian-full'' ''xapian-ruby'' ''yajl-ruby'' ];
gems = {
ZenTest_4_10_1 = {
basename = ''ZenTest'';
@ -300,7 +303,7 @@ rails support and extra plugins for migrations and fixtures.'';
requiredGems = [ g.ZenTest_4_10_1 ];
sha256 = ''1v1dm9zlhdlrxvk90zs8d439ldar674ix41s7pncddgyswcfgg5l'';
};
aws_sdk_1_52_0 = {
aws_sdk_1_53_0 = {
basename = ''aws_sdk'';
meta = {
description = ''AWS SDK for Ruby V1'';
@ -309,11 +312,11 @@ rails support and extra plugins for migrations and fixtures.'';
Use `aws-sdk-v1` if you want to load v1 and v2 of the Ruby SDK in the same
application.'';
};
name = ''aws-sdk-1.52.0'';
requiredGems = [ g.aws_sdk_v1_1_52_0 ];
sha256 = ''1ffdkihid83wm0wwzpm35anhh62lpwld6ca47kpf8zlgs5m53hgh'';
name = ''aws-sdk-1.53.0'';
requiredGems = [ g.aws_sdk_v1_1_53_0 ];
sha256 = ''1jwvzlpyh5hpa3qn972wmn2pmhqpzw5vjal2n5i14qplvafmj7p2'';
};
aws_sdk_v1_1_52_0 = {
aws_sdk_v1_1_53_0 = {
basename = ''aws_sdk_v1'';
meta = {
description = ''AWS SDK for Ruby V1'';
@ -322,9 +325,9 @@ application.'';
Use `aws-sdk-v1` if you want to load v1 and v2 of the Ruby SDK in the same
application.'';
};
name = ''aws-sdk-v1-1.52.0'';
name = ''aws-sdk-v1-1.53.0'';
requiredGems = [ g.nokogiri_1_6_3_1 g.json_1_8_1 ];
sha256 = ''17df4w7jzyjlal1855gv0q4dhdwjc8j16ncqmv89lxbbqdvrjmfj'';
sha256 = ''00yagrm2d5agwkfgkv4rqbxymwmgjmv5n8hah3xhrc90q1ywr7hw'';
};
backports_3_6_0 = {
basename = ''backports'';
@ -346,7 +349,7 @@ application.'';
};
name = ''bitbucket-backup-0.3.1'';
requiredGems = [ g.highline_1_6_21 g.json_1_8_1 ];
sha256 = ''no hash'';
sha256 = ''17d2pfk0z3cxcx9m90avcp5wxhdbrq23zd665263m3hh9b5qi0fj'';
};
builder_3_2_2 = {
basename = ''builder'';
@ -612,6 +615,17 @@ using TCP/IP, especially if custom protocols are required.'';
requiredGems = [ g.eventmachine_1_0_3 ];
sha256 = ''1pvlb34vdzd81kf9f3xyibb4f55xjqm7lqqy28dgyci5cyv50y61'';
};
execjs_2_2_1 = {
basename = ''execjs'';
meta = {
description = ''Run JavaScript code from Ruby'';
homepage = ''https://github.com/sstephenson/execjs'';
longDescription = ''ExecJS lets you run JavaScript code from Ruby.'';
};
name = ''execjs-2.2.1'';
requiredGems = [ ];
sha256 = ''1s41g9qwq0h4452q4gp934lnkzfkxh4wrg8fd4bcynba86bf3j8b'';
};
fakes3_0_1_5_2 = {
basename = ''fakes3'';
meta = {
@ -811,7 +825,7 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf'';
};
name = ''json-1.8.1'';
requiredGems = [ ];
sha256 = ''no hash'';
sha256 = ''0002bsycvizvkmk1jyv8px1hskk6wrjfk4f7x5byi8gxm6zzn6wn'';
};
json_pure_1_8_0 = {
basename = ''json_pure'';
@ -967,7 +981,7 @@ with some types added by the users of mime-types.'';
};
name = ''minitar-0.5.4'';
requiredGems = [ ];
sha256 = ''no hash'';
sha256 = ''1vpdjfmdq1yc4i620frfp9af02ia435dnpj8ybsd7dc3rypkvbka'';
};
minitest_5_4_1 = {
basename = ''minitest'';
@ -1183,7 +1197,7 @@ enough of it.'';
};
name = ''nokogiri-1.6.3.1'';
requiredGems = [ g.mini_portile_0_6_0 ];
sha256 = ''no hash'';
sha256 = ''11958hlfd8i3i9y0wk1b6ck9x0j95l4zdbbixmdnnh1r8ijilxli'';
};
ntlm_http_0_1_1 = {
basename = ''ntlm_http'';
@ -1389,6 +1403,19 @@ Rake has the following features:
requiredGems = [ ];
sha256 = ''1g70vsgv7mdwcyk9rxja7wm4qqap67prqwkj335c460vlzs6pqii'';
};
rdoc_4_1_2 = {
basename = ''rdoc'';
meta = {
description = ''RDoc produces HTML and command-line documentation for Ruby projects'';
homepage = ''http://docs.seattlerb.org/rdoc'';
longDescription = ''RDoc produces HTML and command-line documentation for Ruby projects. RDoc
includes the +rdoc+ and +ri+ tools for generating and displaying documentation
from the command-line.'';
};
name = ''rdoc-4.1.2'';
requiredGems = [ g.json_1_8_1 ];
sha256 = ''0cqhjidw657d8irkypxsrv6dr4y9r8csg9inaq40c3iz110cc8w6'';
};
remote_syslog_1_6_14 = {
basename = ''remote_syslog'';
meta = {
@ -1892,6 +1919,17 @@ specify.'';
requiredGems = [ g.thread_safe_0_3_4 ];
sha256 = ''1c01p3kg6xvy1cgjnzdfq45fggbwish8krd0h864jvbpybyx7cgx'';
};
uglifier_2_5_3 = {
basename = ''uglifier'';
meta = {
description = ''Ruby wrapper for UglifyJS JavaScript compressor'';
homepage = ''http://github.com/lautis/uglifier'';
longDescription = ''Uglifier minifies JavaScript files by wrapping UglifyJS to be accessible in Ruby'';
};
name = ''uglifier-2.5.3'';
requiredGems = [ g.execjs_2_2_1 g.json_1_8_1 ];
sha256 = ''0rlx9nrcavpfffyacsrh7xyvz3adv7jvylz0sv0jnix1mj5rkpd9'';
};
unf_0_1_4 = {
basename = ''unf'';
meta = {
@ -1990,7 +2028,7 @@ to Ruby/JRuby.
};
name = ''xml-simple-1.1.2'';
requiredGems = [ ];
sha256 = ''no hash'';
sha256 = ''0ni8cbkj7l2k5pc4fs2jzp1ymxy4xqa2jc681l4y9iy9chrayddb'';
};
yajl_ruby_1_2_1 = {
basename = ''yajl_ruby'';

View File

@ -1,9 +1,11 @@
{ stdenv, lib, go, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
{ stdenv, lib, go, fetchgit, fetchhg, fetchbzr, fetchFromGitHub
, ruby, rubyLibs, nodejs }:
let
version = "0.3.0";
version = "0.4.0";
in
with lib;
stdenv.mkDerivation {
name = "consul-${version}";
@ -11,22 +13,44 @@ stdenv.mkDerivation {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
};
buildInputs = [ go ];
buildInputs = [ go ruby rubyLibs.sass nodejs ];
configurePhase = flip concatMapStrings
(with rubyLibs; [ execjs json minitest rake rdoc sass uglifier ])
(gem: ''
export GEM_PATH="$GEM_PATH:${gem}/${ruby.gemPath}"
'');
buildPhase = ''
# Build consul binary
export GOPATH=$src
go build -v -o consul github.com/hashicorp/consul
# Build ui static files
({
cp -r src/github.com/hashicorp/consul/ui .
cd ui
chmod -R u+w .
make dist
})
'';
outputs = [ "out" "ui" ];
installPhase = ''
ensureDir $out/bin
# Install consul binary
mkdir -p $out/bin
cp consul $out/bin
# Install ui static files
mkdir -p $ui
mv ui/dist/* $ui
'';
meta = with lib; {
homepage = http://www.consul.io/;
description = "A tool for service discovery, monitoring and configuration";
maintainers = with maintainers; [ cstrahan ];
maintainers = with maintainers; [ cstrahan wkennington ];
license = licenses.mpl20 ;
platforms = platforms.unix;
};

View File

@ -2,22 +2,6 @@
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 {
@ -27,13 +11,31 @@ let
sha256 = "06kwwdwa3hskdh6ws7clj1vim80dyc3ldim8k9y5qpd30x0avn5s";
};
}
{
root = "github.com/armon/consul-api";
src = fetchFromGitHub {
owner = "armon";
repo = "consul-api";
rev = "045662de1042be0662fe4a1e21b57c8f7669261a";
sha256 = "1cdf9mpfa97qwzc0nz0788d97xmwh08dsvqmkmijrdm2a6c07q1r";
};
}
{
root = "github.com/armon/go-metrics";
src = fetchFromGitHub {
owner = "armon";
repo = "go-metrics";
rev = "02567bbc4f518a43853d262b651a3c8257c3f141";
sha256 = "08fk3zmw0ywmdfp2qhrpv0vrk1y97hzqczrgr3y2yip3x8sr37ar";
rev = "2b75159ce5d3641fb35b5a159cff309ac3cf4177";
sha256 = "1fjsa7r97zlpdzi5l7qvgyabznn5pm6bpwi1rgrwaxh7gc3a28vi";
};
}
{
root = "github.com/armon/go-radix";
src = fetchFromGitHub {
owner = "armon";
repo = "go-radix";
rev = "b045fc0ad3587e8620fb42a0dea882cf8c08aef9";
sha256 = "1p09dwhngaszbr9si68xl1la74i359l0wibhhirpxrc8q4pgjplx";
};
}
{
@ -45,22 +47,22 @@ let
sha256 = "0hiw5qkkyfd22v291w7rbnlrb4kraqzbkjfx2dvl7rqchkb0hv68";
};
}
{
root = "github.com/armon/mdns";
src = fetchFromGitHub {
owner = "armon";
repo = "mdns";
rev = "70462deb060d44247356ee238ebafd7699ddcffe";
sha256 = "0xkm3d0hsixdm1yrkx9c39723kfjkb3wvrzrmx3np9ylcwn6h5p5";
};
}
{
root = "github.com/hashicorp/consul";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "consul";
rev = "441d613e1bd96254c78c46ee7c1b35c161fc7295";
sha256 = "1v06ygzsvc9c02yxpxnnm407kd30fc46b2146k5zrk1v8lq0f91j";
rev = "e1d87dee26c05cea64342fadd2a728894b764aec";
sha256 = "0y05pjvvxlamf74s15pcgv48xyd6116m5lyyd7jkh28lb3l2fykf";
};
}
{
root = "github.com/hashicorp/go-checkpoint";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "go-checkpoint";
rev = "89ef2a697dd8cdb4623097d5bb9acdb19a470767";
sha256 = "0mfykh9jkh1m2zxlm2df4j5i6hd6iq1kc8afjladdhcqyrkwcch0";
};
}
{
@ -72,6 +74,24 @@ let
sha256 = "1r9s1gsa4azcs05gx1179ixk7qvrkrik3v92wr4s8gwm00m0gf81";
};
}
{
root = "github.com/hashicorp/golang-lru";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "golang-lru";
rev = "4dfff096c4973178c8f35cf6dd1a732a0a139370";
sha256 = "16x78183xzk9bjn7il71l3mff3rqjwc88q9fpbj5i65kvl5ws9di";
};
}
{
root = "github.com/hashicorp/hcl";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "hcl";
rev = "9b5d9eb9b09475889ae49a4a613c60280875b3d1";
sha256 = "02x5by78a3bblzqnhl9dm98wz61h0vkk1wcw7mx6480a7qj5jx3m";
};
}
{
root = "github.com/hashicorp/logutils";
src = fetchFromGitHub {
@ -86,8 +106,8 @@ let
src = fetchFromGitHub {
owner = "hashicorp";
repo = "memberlist";
rev = "17d39b695094be943bfb98442a80b082e6b9ac47";
sha256 = "0nvgjnwmfqhv2wvr77d2q5mq1bfw4xbpil6wgyj4fyrmhsfzrv3g";
rev = "def5afe3702fce72d72922fb44ef2b8e5608b205";
sha256 = "1ch8c160nkqb79ql59vgpnf9kfq2v38xjrprvfv4hmnpmf6yx6i2";
};
}
{
@ -95,8 +115,8 @@ let
src = fetchFromGitHub {
owner = "hashicorp";
repo = "raft";
rev = "8bdafd1e83e7d85ffeb5dc8f0857dbddd61edba5";
sha256 = "1yv3v0vhw5hgqqhh20jhyba2lpkkmmj80lfgf7v4vgjb0y3jqy6x";
rev = "35f5fa082f5a064595d84715b0cf8821f002e9ac";
sha256 = "0s5qhs19n0rxdhsxw77q5sjw4hrkfggxz3w0p3szcd8rsnpfswkg";
};
}
{
@ -104,8 +124,8 @@ let
src = fetchFromGitHub {
owner = "hashicorp";
repo = "raft-mdb";
rev = "70e1c88f4b6fb06fc94cc02109243160a443609d";
sha256 = "1031yqgb91ch79m41gl8prrymlh4y4k9yklmbv3qvxkfqirdv247";
rev = "95d26447c3c54581de2bb102ecc3344079b234bd";
sha256 = "1fqf7s2snzbjzxy1k04wdfkqsrxddp6iz72b9hxz9jmgx3l7nl2z";
};
}
{
@ -113,8 +133,17 @@ let
src = fetchFromGitHub {
owner = "hashicorp";
repo = "serf";
rev = "83f220b4faa0614f49649156118b750b5b12fafb";
sha256 = "144a4g5yfcjv1jnl3mi4jcwy4cd970h1924cdas2s7bcdx6kpnv4";
rev = "v0.6.3";
sha256 = "0ck77ji28bvm4ahzxyyi4sm17c3fxc16k0k5mihl1nlkgdd73m8y";
};
}
{
root = "github.com/hashicorp/terraform";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "terraform";
rev = "v0.2.2";
sha256 = "05hy9vq8b05nxbmm277ll6p7ncjhxifnqii8y1dralz5x3cw27r3";
};
}
{
@ -140,8 +169,8 @@ let
src = fetchFromGitHub {
owner = "miekg";
repo = "dns";
rev = "05cfaca9f0712f44206ecbfa65a6769434164e7a";
sha256 = "1qc12v5yqlsi1mg18i10pvz9g4a5diqzp73q5n4m00gyk41q855j";
rev = "5cdb7e11a3f60c88cf2dbce42866e7b42c74b394";
sha256 = "0glzs9r2i5vrncb3skdl987mdzqj2w86fqr5aj64lqgp7ghwj6hw";
};
}
{
@ -149,8 +178,8 @@ let
src = fetchFromGitHub {
owner = "mitchellh";
repo = "cli";
rev = "975a7477b1507ea6bb888c48108e05d26fb30434";
sha256 = "0gxjizg8pf5p3zj04k7cpkwf8l2q9j1j270j2bw0wv2d2pgn6z5l";
rev = "bfacda5ba006a32b10ddfe2abad56c11661573eb";
sha256 = "0lzvsya04nh7m804azanhs28vsk4g8knw3yay2yx4wffikbkjbgk";
};
}
{
@ -158,8 +187,8 @@ let
src = fetchFromGitHub {
owner = "mitchellh";
repo = "mapstructure";
rev = "6fb2c832bcac61d01212ab1d172f7a14a8585b07";
sha256 = "0mx855lwhv0rk461wmbnbzbpkhmq5p2ipmrm5bhzimagrr1w17hw";
rev = "740c764bc6149d3f1806231418adb9f52c11bcbf";
sha256 = "0rlz93rmz465nr0wmzvq1n58yc0qdw7v1chr6zmj9jj9pix0a7cb";
};
}
{
@ -167,7 +196,7 @@ let
src = fetchFromGitHub {
owner = "ryanuber";
repo = "columnize";
rev = "785d943a7b6886e0bb2f139a60487b823dd8d9de";
rev = "v2.0.1";
sha256 = "1h3sxzhiwz65vf3cvclirlf6zhdr97v01dpn5cmf3m09rxxpnp3f";
};
}
@ -176,51 +205,8 @@ let
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";
rev = "e906e395b9d45d3230e800c8ad1f92f99764e753";
sha256 = "0dqzbxa4ziw10sa5ksl8sfzm0rhrddp6gs732zs9bjkq4rl50j89";
};
}
];

View File

@ -1,17 +0,0 @@
{ stdenv, fetchzip }:
let
version = "0.3.0";
meta = with stdenv.lib; {
homepage = http://www.consul.io/intro/getting-started/ui.html;
description = "The static files for Consul's UI (used via -ui-dir)";
maintainers = with maintainers; [ cstrahan ];
license = licenses.mpl20 ;
platforms = platforms.all;
};
in (fetchzip {
name = "consul-ui-${version}";
url = "https://dl.bintray.com/mitchellh/consul/${version}_web_ui.zip";
sha256 = "0p4mhlrqidd6p3899wd3i9p41bdbb5avbz5986mnxg9f7dvhjdrc";
}) // { inherit meta; }

View File

@ -611,8 +611,11 @@ let
ccnet = callPackage ../tools/networking/ccnet { };
consul = callPackage ../servers/consul { };
consul_ui = callPackage ../servers/consul/ui.nix { };
consul = callPackage ../servers/consul {
inherit ruby rubyLibs;
};
consul_ui = consul.ui;
chntpw = callPackage ../tools/security/chntpw { };