nixpkgs/pkgs/servers/etcd/3.5.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

79 lines
1.8 KiB
Nix
Raw Normal View History

2023-05-23 22:54:43 +02:00
{ lib, buildGoModule, fetchFromGitHub, symlinkJoin, nixosTests }:
2022-01-07 02:18:53 +01:00
let
version = "3.5.9";
src = fetchFromGitHub {
2022-01-07 02:18:53 +01:00
owner = "etcd-io";
repo = "etcd";
rev = "v${version}";
hash = "sha256-Vp8U49fp0FowIuSSvbrMWjAKG2oDO1o0qO4izSnTR3U=";
2022-01-07 02:18:53 +01:00
};
CGO_ENABLED = 0;
meta = with lib; {
2022-01-07 02:18:53 +01:00
description = "Distributed reliable key-value store for the most critical data of a distributed system";
license = licenses.asl20;
homepage = "https://etcd.io/";
2023-08-07 04:21:02 +02:00
maintainers = with maintainers; [ offline endocrimes ];
2022-01-07 02:18:53 +01:00
platforms = platforms.darwin ++ platforms.linux;
};
etcdserver = buildGoModule rec {
pname = "etcdserver";
inherit CGO_ENABLED meta src version;
2022-01-07 02:18:53 +01:00
vendorHash = "sha256-vu5VKHnDbvxSd8qpIFy0bA88IIXLaQ5S8dVUJEwnKJA=";
2022-01-07 02:18:53 +01:00
modRoot = "./server";
2023-02-04 14:50:22 +01:00
preInstall = ''
2022-01-07 02:18:53 +01:00
mv $GOPATH/bin/{server,etcd}
'';
# We set the GitSHA to `GitNotFound` to match official build scripts when
# git is unavailable. This is to avoid doing a full Git Checkout of etcd.
# User facing version numbers are still available in the binary, just not
# the sha it was built from.
ldflags = [ "-X go.etcd.io/etcd/api/v3/version.GitSHA=GitNotFound" ];
};
etcdutl = buildGoModule rec {
pname = "etcdutl";
inherit CGO_ENABLED meta src version;
2022-01-07 02:18:53 +01:00
vendorHash = "sha256-i60rKCmbEXkdFOZk2dTbG5EtYKb5eCBSyMcsTtnvATs=";
2022-01-07 02:18:53 +01:00
modRoot = "./etcdutl";
};
etcdctl = buildGoModule rec {
2022-06-01 05:30:16 +02:00
pname = "etcdctl";
inherit CGO_ENABLED meta src version;
2022-01-07 02:18:53 +01:00
vendorHash = "sha256-awl/4kuOjspMVEwfANWK0oi3RId6ERsFkdluiRaaXlA=";
2022-01-07 02:18:53 +01:00
modRoot = "./etcdctl";
};
in
symlinkJoin {
name = "etcd-${version}";
inherit meta version;
2023-05-23 22:54:43 +02:00
passthru = {
inherit etcdserver etcdutl etcdctl;
tests = { inherit (nixosTests) etcd etcd-cluster; };
};
2022-01-07 02:18:53 +01:00
paths = [
etcdserver
etcdutl
etcdctl
];
}