nixpkgs-suyu/pkgs/servers/etcd/default.nix

40 lines
909 B
Nix
Raw Normal View History

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