depot/third_party/nixpkgs/pkgs/by-name/ra/raft-cowsql/package.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

59 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, libuv
, lz4
, pkg-config
, incus
, gitUpdater
}:
stdenv.mkDerivation rec {
pname = "raft-cowsql";
version = "0.18.2";
src = fetchFromGitHub {
owner = "cowsql";
repo = "raft";
rev = "refs/tags/v${version}";
hash = "sha256-CMcKXX2u+qiroleg5GIovTOVAg9ycXBsRDqfsOCL3yo=";
};
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" ];
passthru = {
inherit (incus) tests;
updateScript = gitUpdater {
rev-prefix = "v";
};
};
meta = with lib; {
description = "Asynchronous C implementation of the Raft consensus protocol";
homepage = "https://github.com/cowsql/raft";
license = licenses.lgpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ adamcstephens ];
};
}