fix: add native gcc for clamav Rust build scripts in cross-compile
This commit is contained in:
12
flake.nix
12
flake.nix
@@ -193,13 +193,11 @@
|
|||||||
"-Dtest_run_result=0"
|
"-Dtest_run_result=0"
|
||||||
"-Dtest_run_result__TRYRUN_OUTPUT="
|
"-Dtest_run_result__TRYRUN_OUTPUT="
|
||||||
];
|
];
|
||||||
# Rust proc-macro build scripts need a native linker; cmake overrides
|
# Give cargo access to a native C compiler for Rust build script
|
||||||
# CC/CXX to the cross-compiler, confusing cargo. Set CC to native gcc
|
# compilations (proc-macros run on the BUILD host, not the target).
|
||||||
# so proc-macros can compile and run on the build host.
|
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [
|
||||||
preConfigure = (old.preConfigure or "") + ''
|
prev.buildPackages.gcc
|
||||||
export CC=gcc
|
];
|
||||||
export CXX=g++
|
|
||||||
'';
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user