nixpkgs/pkgs/by-name/ra/raft-canonical/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

76 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
file,
libuv,
lz4,
lxd-lts,
}:
stdenv.mkDerivation rec {
pname = "raft-canonical";
version = "0.18.1";
src = fetchFromGitHub {
owner = "canonical";
repo = "raft";
rev = "refs/tags/v${version}";
hash = "sha256-ogTw0+ZFhMRaLAxAAXzHSlLRYFuX8W/zjqglXHfvUv4=";
};
nativeBuildInputs = [
autoreconfHook
file
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.tests = {
inherit lxd-lts;
};
meta = with lib; {
description = ''
Fully asynchronous C implementation of the Raft consensus protocol
'';
longDescription = ''
The library has modular design: its core part implements only the core
Raft algorithm logic, in a fully platform independent way. On top of
that, a pluggable interface defines the I/O implementation for networking
(send/receive RPC messages) and disk persistence (store log entries and
snapshots).
'';
homepage = "https://github.com/canonical/raft";
license = licenses.asl20;
platforms = platforms.linux;
maintainers = [ ];
};
}