From 9485537de608224d1751ebcbf88ac55e56bf24fd Mon Sep 17 00:00:00 2001 From: Robert Kovacsics Date: Fri, 12 Jul 2024 11:36:58 +0100 Subject: [PATCH] clamav: Fix check failure of clamscan no tests It seems like clamav uses `pytest` as a test runner preferentially, then falls back to `unittest`. For some reason `unittest` isn't discovering the tests inside clamav/unit_test/clamscan, and instead exitting with `sys.exit(_NO_TESTS_EXITCODE)`. I have checked actual `clamscan` tests are being run using `nix develop .#clamscan`, `genericBuild`, `checkPhase` then manually running `ctest -V`. Fixes https://github.com/NixOS/nixpkgs/issues/325510 --- pkgs/tools/security/clamav/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix index be40a271cc92..4f9ca4fe9e9f 100644 --- a/pkgs/tools/security/clamav/default.nix +++ b/pkgs/tools/security/clamav/default.nix @@ -33,6 +33,10 @@ stdenv.mkDerivation rec { doCheck = true; + checkInputs = [ + python3.pkgs.pytest + ]; + meta = with lib; { homepage = "https://www.clamav.net"; description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";