From a0875e9e0a4e5e53be0b64d5d2b7f7fea52a72ca Mon Sep 17 00:00:00 2001 From: Hermes Date: Fri, 19 Jun 2026 07:54:30 -0400 Subject: [PATCH] fix: add clamav cross-compile workaround (cmake try_run for FD passing, uname POSIX, struct packing, SAR) --- flake.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/flake.nix b/flake.nix index 776ce98..04005ec 100644 --- a/flake.nix +++ b/flake.nix @@ -184,6 +184,16 @@ (x: x?pname && x.pname != "perl-ldap") (old.propagatedBuildInputs or []); }); + # clamav try_run fails cross-compile (cmake modules all use the same + # generic `test_run_result` cache variable name for FD passing, uname + # POSIX, struct packing, and signed right-shift checks). + # On aarch64 Linux (glibc + GCC) all four return 0, so pre-set it. + clamav = prev.clamav.overrideAttrs (old: { + cmakeFlags = (old.cmakeFlags or []) ++ [ + "-Dtest_run_result=0" + "-Dtest_run_result__TRYRUN_OUTPUT=" + ]; + }); }; uconsoleRpiPipewireOverlay = final: prev: {