1 { lib, buildGoModule, fetchFromGitHub, symlinkJoin, nixosTests }:
6 src = fetchFromGitHub {
10 hash = "sha256-Vp8U49fp0FowIuSSvbrMWjAKG2oDO1o0qO4izSnTR3U=";
16 description = "Distributed reliable key-value store for the most critical data of a distributed system";
17 license = licenses.asl20;
18 homepage = "https://etcd.io/";
19 maintainers = with maintainers; [ offline endocrimes ];
20 platforms = platforms.darwin ++ platforms.linux;
23 etcdserver = buildGoModule rec {
26 inherit CGO_ENABLED meta src version;
28 vendorHash = "sha256-vu5VKHnDbvxSd8qpIFy0bA88IIXLaQ5S8dVUJEwnKJA=";
33 mv $GOPATH/bin/{server,etcd}
36 # We set the GitSHA to `GitNotFound` to match official build scripts when
37 # git is unavailable. This is to avoid doing a full Git Checkout of etcd.
38 # User facing version numbers are still available in the binary, just not
39 # the sha it was built from.
40 ldflags = [ "-X go.etcd.io/etcd/api/v3/version.GitSHA=GitNotFound" ];
43 etcdutl = buildGoModule rec {
46 inherit CGO_ENABLED meta src version;
48 vendorHash = "sha256-i60rKCmbEXkdFOZk2dTbG5EtYKb5eCBSyMcsTtnvATs=";
50 modRoot = "./etcdutl";
53 etcdctl = buildGoModule rec {
56 inherit CGO_ENABLED meta src version;
58 vendorHash = "sha256-awl/4kuOjspMVEwfANWK0oi3RId6ERsFkdluiRaaXlA=";
60 modRoot = "./etcdctl";
64 name = "etcd-${version}";
69 inherit etcdserver etcdutl etcdctl;
70 tests = { inherit (nixosTests) etcd etcd-cluster; };