From 2500d0b83c265c95285bb0eed0d1f0f893a0d99d Mon Sep 17 00:00:00 2001 From: phanirithvij Date: Fri, 12 Dec 2025 14:02:01 +0530 Subject: [PATCH] reaction: add examples to package - link passthru.tests Signed-off-by: phanirithvij --- pkgs/by-name/re/reaction/package.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/re/reaction/package.nix b/pkgs/by-name/re/reaction/package.nix index 93ccd3182523..1f57cbeb1e87 100644 --- a/pkgs/by-name/re/reaction/package.nix +++ b/pkgs/by-name/re/reaction/package.nix @@ -1,7 +1,8 @@ { lib, - fetchFromGitLab, + nixosTests, rustPlatform, + fetchFromGitLab, nix-update-script, installShellFiles, }: @@ -19,9 +20,7 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoHash = "sha256-Bf9XmlY0IMPY4Convftd0Hv8mQbYoiE8WrkkAeaS6Z8="; - nativeBuildInputs = [ - installShellFiles - ]; + nativeBuildInputs = [ installShellFiles ]; checkFlags = [ # Those time-based tests behave poorly in low-resource environments (CI...) @@ -41,9 +40,12 @@ rustPlatform.buildRustPackage (finalAttrs: { --bash $releaseDir/reaction.bash \ --fish $releaseDir/reaction.fish \ --zsh $releaseDir/_reaction + mkdir -p $out/share/examples + install -Dm444 config/example* config/README.md $out/share/examples ''; passthru.updateScript = nix-update-script { }; + passthru.tests = { inherit (nixosTests) reaction reaction-firewall; }; meta = { description = "Scan logs and take action: an alternative to fail2ban";