summary refs log tree commit diff
path: root/pkgs/servers/etcd/default.nix
blob: 1fb21f2b8ab6bddb3b2d42f002db6446681e04c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
  };
}