2020-05-03 17:38:23 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "etcd";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "3.3.27";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/coreos/etcd";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-05-03 17:38:23 +00:00
|
|
|
owner = "etcd-io";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "etcd";
|
2020-05-03 17:38:23 +00:00
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-zO+gwzaTgeFHhlkY/3AvRTEA4Yltlp+NqdlDe4dLJYg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
buildPhase = ''
|
|
|
|
cd go/src/${goPackagePath}
|
|
|
|
patchShebangs .
|
|
|
|
./build
|
|
|
|
./functional/build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
install -Dm755 bin/* bin/functional/cmd/* -t $out/bin
|
2020-05-03 17:38:23 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) etcd etcd-cluster; };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Distributed reliable key-value store for the most critical data of a distributed system";
|
|
|
|
license = licenses.asl20;
|
2020-05-03 17:38:23 +00:00
|
|
|
homepage = "https://etcd.io/";
|
2020-05-29 06:06:01 +00:00
|
|
|
maintainers = with maintainers; [ offline zowoq ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|