nixpkgs/pkgs/servers/etcd/default.nix

37 lines
880 B
Nix
Raw Normal View History

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