From 42949532a350cd490e3752ad476cf76cf28163b9 Mon Sep 17 00:00:00 2001 From: Hermes Date: Fri, 19 Jun 2026 12:09:33 -0400 Subject: [PATCH] fix: set CC=gcc for clamav Rust proc-macro builds in cross-compile --- flake.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flake.nix b/flake.nix index 04005ec..63d4bc2 100644 --- a/flake.nix +++ b/flake.nix @@ -193,6 +193,13 @@ "-Dtest_run_result=0" "-Dtest_run_result__TRYRUN_OUTPUT=" ]; + # Rust proc-macro build scripts need a native linker; cmake overrides + # CC/CXX to the cross-compiler, confusing cargo. Set CC to native gcc + # so proc-macros can compile and run on the build host. + preConfigure = (old.preConfigure or "") + '' + export CC=gcc + export CXX=g++ + ''; }); };