2020-04-26 06:42:50 +01:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, nixosTests }:
|
2016-09-03 13:02:53 +01:00
|
|
|
|
2016-06-04 07:40:17 +01:00
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "etcd";
|
2020-04-26 06:42:50 +01:00
|
|
|
version = "3.3.20";
|
2016-08-24 13:45:08 +01:00
|
|
|
|
2020-04-26 06:42:50 +01:00
|
|
|
# change to "go.etcd.io/etcd" for >= 3.4
|
2016-06-04 07:40:17 +01:00
|
|
|
goPackagePath = "github.com/coreos/etcd";
|
|
|
|
|
2016-06-06 11:26:56 +01:00
|
|
|
src = fetchFromGitHub {
|
2020-04-26 06:42:50 +01:00
|
|
|
owner = "etcd-io";
|
2016-06-06 11:26:56 +01:00
|
|
|
repo = "etcd";
|
2020-04-26 06:42:50 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1iqq12kkky3cl28k7fabqqyx1i0a2wmbkq0bs8yhiwywp076k08w";
|
2016-06-04 07:40:17 +01:00
|
|
|
};
|
|
|
|
|
2020-04-26 06:42:50 +01:00
|
|
|
buildPhase = ''
|
|
|
|
cd go/src/${goPackagePath}
|
|
|
|
patchShebangs .
|
|
|
|
./build
|
|
|
|
./functional/build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 bin/* bin/functional/cmd/* -t $bin/bin
|
|
|
|
'';
|
2016-06-04 07:40:17 +01:00
|
|
|
|
2020-04-26 06:42:50 +01:00
|
|
|
passthru.tests = with nixosTests; {
|
|
|
|
etcd = etcd;
|
|
|
|
etcd-cluster = etcd-cluster;
|
|
|
|
};
|
2016-09-03 13:02:53 +01:00
|
|
|
|
2020-04-26 06:42:50 +01:00
|
|
|
meta = with lib; {
|
2016-09-03 13:02:53 +01:00
|
|
|
description = "Distributed reliable key-value store for the most critical data of a distributed system";
|
|
|
|
license = licenses.asl20;
|
2020-04-26 06:42:50 +01:00
|
|
|
homepage = "https://etcd.io/";
|
|
|
|
maintainers = with maintainers; [ offline ];
|
|
|
|
platforms = platforms.unix;
|
2016-09-03 13:02:53 +01:00
|
|
|
};
|
2016-06-04 07:40:17 +01:00
|
|
|
}
|