add serfdom (close #1672)
This commit is contained in:
parent
416db1de92
commit
5e09175765
@ -44,6 +44,7 @@
|
||||
matejc = "Matej Cotman <cotman.matej@gmail.com>";
|
||||
modulistic = "Pablo Costa <modulistic@gmail.com>";
|
||||
mornfall = "Petr Ročkai <me@mornfall.net>";
|
||||
msackman = "Matthew Sackman <matthew@wellquite.org>";
|
||||
ocharles = "Oliver Charles <ollie@ocharles.org.uk>";
|
||||
offline = "Jaka Hudoklin <jakahudoklin@gmail.com>";
|
||||
orbitz = "Malcolm Matalka <mmatalka@gmail.com>";
|
||||
|
101
pkgs/servers/serfdom/default.nix
Normal file
101
pkgs/servers/serfdom/default.nix
Normal file
@ -0,0 +1,101 @@
|
||||
{ stdenv, fetchurl, fetchgit, go, lib }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
dir = "github.com/hashicorp";
|
||||
name = "serf";
|
||||
rev = "21113c8207d8e02b7ff738c9be80fcaabf67251d";
|
||||
sha256 = "10lmgb0caffp0x02nriahyfq9p6qkhr8carfq38m8cjxqxs2v0nk";
|
||||
}
|
||||
{
|
||||
dir = "github.com/armon";
|
||||
name = "go-metrics";
|
||||
rev = "8ceaed1d0bc3a25db6e65e79ee4f895013313c17";
|
||||
sha256 = "1yzajmx26br4812m9gz4v7qj6fcmhg4a9jz9l3i20hh2x06srmpg";
|
||||
}
|
||||
{
|
||||
dir = "github.com/hashicorp";
|
||||
name = "logutils";
|
||||
rev = "8e0820fe7ac5eb2b01626b1d99df47c5449eb2d8";
|
||||
sha256 = "184lnn7x1v3xvj6zz1rg9s0252wkkd59kij2iyrrm7y80bym2jys";
|
||||
}
|
||||
{
|
||||
dir = "github.com/hashicorp";
|
||||
name = "memberlist";
|
||||
rev = "825ad4aca57c7323e8dadde149bfdec9d9621ffe";
|
||||
sha256 = "0mm0hm2kncafq5ml58ki7ilh3b47ni0w19n50ilahhhm4lsfry7z";
|
||||
}
|
||||
{
|
||||
dir = "github.com/ugorji";
|
||||
name = "go";
|
||||
rev = "cdeae7b76625959e4164eab9eb303087a794f2cc";
|
||||
sha256 = "0pcjlbhp6vxnksy12rav6c8bvi2v010407l5hibxqdvnampvhlkb";
|
||||
}
|
||||
{
|
||||
dir = "github.com/mitchellh";
|
||||
name = "cli";
|
||||
rev = "69f0b65ce53b27f729b1b807b88dc88007f41dd3";
|
||||
sha256 = "0hnnqd8vg5ca2hglkrj141ba2akdh7crl2lsrgz8d6ipw6asszx3";
|
||||
}
|
||||
{
|
||||
dir = "github.com/armon";
|
||||
name = "mdns";
|
||||
rev = "17be83de467449f38a8395c30534a9cf0c03e5ea";
|
||||
sha256 = "1fhb6vldclgdx9aqqh1gl87cl5sw3nbq9b7mibkljhbk3cdajyxn";
|
||||
}
|
||||
{
|
||||
dir = "github.com/miekg";
|
||||
name = "dns";
|
||||
rev = "5eec7f362c392f0a7eaadea69b13667d665feb82";
|
||||
sha256 = "0irlzhd78qmn3lyfbkxmwajv0mm6jp6x0cg7hb9hyj6d01ynlv09";
|
||||
}
|
||||
{
|
||||
dir = "github.com/mitchellh";
|
||||
name = "mapstructure";
|
||||
rev = "57bb2fa7a7e00b26c80e4c4b0d4f15a210d94039";
|
||||
sha256 = "13lvd5vw8y6h5zl3samkrb7237kk778cky7k7ys1cm46mfd957zy";
|
||||
}
|
||||
];
|
||||
createGoPathCmds =
|
||||
lib.concatStrings
|
||||
(map (desc:
|
||||
let
|
||||
fetched = fetchgit { url = "https://${desc.dir}/${desc.name}";
|
||||
inherit (desc) rev sha256; };
|
||||
in ''
|
||||
mkdir -p $GOPATH/src/${desc.dir}
|
||||
ln -s ${fetched} $GOPATH/src/${desc.dir}/${desc.name}
|
||||
'') goDeps);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.4.1";
|
||||
name = "serfdom-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/hashicorp/serf/archive/v${version}.tar.gz";
|
||||
sha256 = "0f4fxhw2r31ks9rs9h3wx9lsymnp8szk0gzggvibwhl2bm6kn6d8";
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir $TMPDIR/go
|
||||
export GOPATH=$TMPDIR/go
|
||||
${createGoPathCmds}
|
||||
go build -v -o bin/serf
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
cp bin/serf $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Serf is a service discovery and orchestration tool that is decentralized, highly available, and fault tolerant";
|
||||
homepage = http://www.serfdom.io/;
|
||||
license = licenses.mpl20;
|
||||
maintainers = [ maintainers.msackman ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -6396,6 +6396,8 @@ let
|
||||
libunwind = null;
|
||||
});
|
||||
|
||||
serfdom = callPackage ../servers/serfdom { };
|
||||
|
||||
shishi = callPackage ../servers/shishi { };
|
||||
|
||||
sipwitch = callPackage ../servers/sip/sipwitch { };
|
||||
|
Loading…
Reference in New Issue
Block a user