From 65f103175e7e819fc71016ddf0bc88c452c9e3b6 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Thu, 11 Sep 2014 15:35:18 -0700 Subject: [PATCH] consul: 0.3.0 -> 0.4.0 --- pkgs/servers/consul/default.nix | 34 ++++++- pkgs/servers/consul/deps.nix | 164 +++++++++++++++----------------- pkgs/servers/consul/ui.nix | 17 ---- pkgs/top-level/all-packages.nix | 7 +- 4 files changed, 109 insertions(+), 113 deletions(-) delete mode 100644 pkgs/servers/consul/ui.nix diff --git a/pkgs/servers/consul/default.nix b/pkgs/servers/consul/default.nix index 5282541e2f9e..9244ee2f2cf5 100644 --- a/pkgs/servers/consul/default.nix +++ b/pkgs/servers/consul/default.nix @@ -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; }; diff --git a/pkgs/servers/consul/deps.nix b/pkgs/servers/consul/deps.nix index c1ebcf809288..c6e7cb735fe5 100644 --- a/pkgs/servers/consul/deps.nix +++ b/pkgs/servers/consul/deps.nix @@ -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"; }; } ]; diff --git a/pkgs/servers/consul/ui.nix b/pkgs/servers/consul/ui.nix deleted file mode 100644 index d1c04f959cb8..000000000000 --- a/pkgs/servers/consul/ui.nix +++ /dev/null @@ -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; } - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e49547b9dc7..cbd53b1a9e99 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };