add etcd package

This commit is contained in:
Charles Strahan 2014-06-23 04:55:46 -04:00
parent 7301dd44de
commit b6df637e86
3 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,30 @@
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
stdenv.mkDerivation rec {
version = "0.4.3";
name = "etcd-${version}";
src = import ./deps.nix {
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
};
buildInputs = [ go ];
buildPhase = ''
export GOPATH=$src
go build -v -o etcd github.com/coreos/etcd
'';
installPhase = ''
ensureDir $out/bin
mv etcd $out/bin/etcd
'';
meta = with stdenv.lib; {
description = "A highly-available key value store for shared configuration and service discovery";
homepage = http://coreos.com/using-coreos/etcd/;
license = licenses.asl20;
maintainers = with maintainers; [ cstrahan ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,54 @@
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
let
goDeps = [
{
root = "github.com/coreos/etcd";
src = fetchFromGitHub {
owner = "coreos";
repo = "etcd";
rev = "9970141f76241c909977af7bafe7b6f2c4923de8";
sha256 = "1bva46gfy4rkfw8k8pb3lsfzfg16csds01f0nvfrkh99pr7sp0sy";
};
}
{
root = "github.com/stathat/go";
src = fetchFromGitHub {
owner = "stathat";
repo = "go";
rev = "01d012b9ee2ecc107cb28b6dd32d9019ed5c1d77";
sha256 = "0mrn70wjfcs4rfkmga3hbfqmbjk33skcsc8pyqxp02bzpwdpc4bi";
};
}
{
root = "github.com/stretchr/objx";
src = fetchFromGitHub {
owner = "stretchr";
repo = "objx";
rev = "cbeaeb16a013161a98496fad62933b1d21786672";
sha256 = "1xn7iibjik77h6h0jilfvcjkkzaqz45baf44p3rb2i03hbmkqkp1";
};
}
{
root = "github.com/stretchr/testify";
src = fetchFromGitHub {
owner = "stretchr";
repo = "testify";
rev = "3e03dde72495487a4deb74152ac205d0619fbc8d";
sha256 = "1xd9sbi6y68cfwkxgybcz0dbfx4r6jmxq51wjj6six3wm9p7m8ls";
};
}
];
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);
}

View File

@ -6636,6 +6636,8 @@ let
dovecot_pigeonhole = callPackage ../servers/mail/dovecot-pigeonhole { };
etcd = callPackage ../servers/etcd { };
ejabberd = callPackage ../servers/xmpp/ejabberd {
erlang = erlangR16;
};