2023-10-19 13:55:26 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, libuv
|
|
|
|
, lz4
|
|
|
|
, pkg-config
|
|
|
|
, incus
|
|
|
|
, gitUpdater
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "raft-cowsql";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.22.1";
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cowsql";
|
|
|
|
repo = "raft";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-aGw/ATu8Xdjfqa0qWg8Sld9PKCmQsMtZhuNBwagER7M=";
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
|
|
|
buildInputs = [ libuv lz4 ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# network tests either hang indefinitely, or fail outright
|
|
|
|
./disable-net-tests.patch
|
|
|
|
|
|
|
|
# missing dir check is flaky
|
|
|
|
./disable-missing-dir-test.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace configure --replace /usr/bin/ " "
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
outputs = [ "dev" "out" ];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru = {
|
|
|
|
inherit (incus) tests;
|
|
|
|
|
|
|
|
updateScript = gitUpdater {
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Asynchronous C implementation of the Raft consensus protocol";
|
|
|
|
homepage = "https://github.com/cowsql/raft";
|
|
|
|
license = licenses.lgpl3Only;
|
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = teams.lxc.members;
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
|
|
|
}
|