2024-02-29 20:09:43 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, asio, openssl, zlib }:
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nuraft";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "2.1.0";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eBay";
|
|
|
|
repo = "NuRaft";
|
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-puO8E7tSLqB0oq/NlzEZqQgIZKm7ZUb4HhR0XuI9dco=";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
# Fix gcc-13 build failure:
|
|
|
|
# https://github.com/eBay/NuRaft/pull/435
|
|
|
|
(fetchpatch {
|
|
|
|
name = "gcc-13.patch";
|
|
|
|
url = "https://github.com/eBay/NuRaft/commit/fddf33a4d8cd7fcd0306cc838a30893a4df3d58f.patch";
|
|
|
|
hash = "sha256-JOtR3llE4QwQM7PBx+ILR87zsPB0GZ/aIKbSdHIrePA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [ boost asio openssl zlib ];
|
2020-11-03 02:18:15 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-03 02:18:15 +00:00
|
|
|
homepage = "https://github.com/eBay/NuRaft";
|
|
|
|
description = "C++ implementation of Raft core logic as a replication library";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ wheelsandmetal ];
|
2023-07-15 17:15:38 +00:00
|
|
|
platforms = platforms.all;
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
}
|