2020-04-25 22:42:50 -07:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, nixosTests }:
|
2016-09-03 05:02:53 -07:00
|
|
|
|
2016-06-03 23:40:17 -07:00
|
|
|
buildGoPackage rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "etcd";
|
2020-08-31 17:13:42 -07:00
|
|
|
version = "3.3.25";
|
2016-08-24 05:45:08 -07:00
|
|
|
|
2016-06-03 23:40:17 -07:00
|
|
|
goPackagePath = "github.com/coreos/etcd";
|
|
|
|
|
2016-06-06 03:26:56 -07:00
|
|
|
src = fetchFromGitHub {
|
2020-04-25 22:42:50 -07:00
|
|
|
owner = "etcd-io";
|
2016-06-06 03:26:56 -07:00
|
|
|
repo = "etcd";
|
2020-04-25 22:42:50 -07:00
|
|
|
rev = "v${version}";
|
2020-08-31 17:13:42 -07:00
|
|
|
sha256 = "10cyy6jr2xzmla5yyn850cv323ixrk70fjpk8lxjjjvy0ffmb6hj";
|
2016-06-03 23:40:17 -07:00
|
|
|
};
|
|
|
|
|
2020-04-25 22:42:50 -07:00
|
|
|
buildPhase = ''
|
|
|
|
cd go/src/${goPackagePath}
|
|
|
|
patchShebangs .
|
|
|
|
./build
|
|
|
|
./functional/build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-04-27 18:50:57 -07:00
|
|
|
install -Dm755 bin/* bin/functional/cmd/* -t $out/bin
|
2020-04-25 22:42:50 -07:00
|
|
|
'';
|
2016-06-03 23:40:17 -07:00
|
|
|
|
2020-08-31 17:13:42 -07:00
|
|
|
passthru.tests = { inherit (nixosTests) etcd etcd-cluster; };
|
2016-09-03 05:02:53 -07:00
|
|
|
|
2020-04-25 22:42:50 -07:00
|
|
|
meta = with lib; {
|
2016-09-03 05:02:53 -07:00
|
|
|
description = "Distributed reliable key-value store for the most critical data of a distributed system";
|
|
|
|
license = licenses.asl20;
|
2020-04-25 22:42:50 -07:00
|
|
|
homepage = "https://etcd.io/";
|
2020-05-19 20:27:36 -07:00
|
|
|
maintainers = with maintainers; [ offline zowoq ];
|
2020-04-25 22:42:50 -07:00
|
|
|
platforms = platforms.unix;
|
2016-09-03 05:02:53 -07:00
|
|
|
};
|
2016-06-03 23:40:17 -07:00
|
|
|
}
|