1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule rec {
8 pname = "etcd";
9 version = "3.4.37";
10
11 src = fetchFromGitHub {
12 owner = "etcd-io";
13 repo = "etcd";
14 rev = "v${version}";
15 hash = "sha256-PZ+8hlxSwayR1yvjHmStMDur9e1uc2s+YB8qdz+42mA=";
16 };
17
18 proxyVendor = true;
19 vendorHash = "sha256-VeB0A+freNwgETQMIokiOPWovGq1FANUexnzxVg2aRA=";
20
21 preBuild = ''
22 go mod tidy
23 '';
24
25 buildPhase = ''
26 runHook preBuild
27 patchShebangs .
28 ./build
29 ./functional/build
30 runHook postBuild
31 '';
32
33 doCheck = false;
34
35 postInstall = ''
36 install -Dm755 bin/* bin/functional/cmd/* -t $out/bin
37 '';
38
39 meta = {
40 description = "Distributed reliable key-value store for the most critical data of a distributed system";
41 downloadPage = "https://github.com/etcd-io/etcd/";
42 license = lib.licenses.asl20;
43 homepage = "https://etcd.io/";
44 maintainers = with lib.maintainers; [ ];
45 };
46}