Files
nixpkgs/pkgs/by-name/re/reaction/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.5 KiB
Nix

{
lib,
fetchFromGitLab,
rustPlatform,
nix-update-script,
installShellFiles,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "reaction";
version = "2.2.1";
src = fetchFromGitLab {
domain = "framagit.org";
owner = "ppom";
repo = "reaction";
tag = "v${finalAttrs.version}";
hash = "sha256-81i0bkrf86adQWxeZgIoZp/zQQbRJwPqQqZci0ANRFw=";
};
cargoHash = "sha256-Bf9XmlY0IMPY4Convftd0Hv8mQbYoiE8WrkkAeaS6Z8=";
nativeBuildInputs = [
installShellFiles
];
checkFlags = [
# Those time-based tests behave poorly in low-resource environments (CI...)
"--skip=daemon::filter::tests"
"--skip=treedb::raw::tests::write_then_read_1000"
"--skip=ip_pattern_matches"
];
cargoTestFlags = [
# Skip integration tests for the same reason
"--lib"
];
postInstall = ''
installBin $releaseDir/ip46tables $releaseDir/nft46
installManPage $releaseDir/reaction*.1
installShellCompletion --cmd reaction \
--bash $releaseDir/reaction.bash \
--fish $releaseDir/reaction.fish \
--zsh $releaseDir/_reaction
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Scan logs and take action: an alternative to fail2ban";
homepage = "https://framagit.org/ppom/reaction";
changelog = "https://framagit.org/ppom/reaction/-/releases/v${finalAttrs.version}";
license = lib.licenses.agpl3Plus;
mainProgram = "reaction";
maintainers = with lib.maintainers; [ ppom ];
platforms = lib.platforms.unix;
};
})