fex: skip checkPhase on non-4K pagesize systems

This commit is contained in:
andre4ik3
2025-12-08 01:47:11 +00:00
parent b6118e5072
commit 14c8db99b2
+14 -2
View File
@@ -192,7 +192,6 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
(lib.cmakeFeature "USE_LINKER" "lld")
(lib.cmakeFeature "OVERRIDE_VERSION" finalAttrs.version)
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
(lib.cmakeBool "BUILD_THUNKS" true)
(lib.cmakeBool "BUILD_FEXCONFIG" withQt)
(lib.cmakeFeature "X86_32_TOOLCHAIN_FILE" "${toolchain32}")
@@ -202,8 +201,21 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: {
strictDeps = true;
# Unsupported on non-4K page size kernels (e.g. Apple Silicon)
# Running the tests isn't supported on non-4K pagesize systems, but the build
# itself doesn't require 4K pagesize. So, to avoid breaking the build, enable
# checkPhase by default (so that the check inputs are included) and then
# manually disable it if we're running on a non-4K pagesize system.
doCheck = true;
preConfigure = ''
if [ "$(getconf PAGESIZE)" != "4096" ]; then
echo "Disabling checkPhase due to non-4K pagesize environment"
unset doCheck
cmakeFlagsArray+=("-DBUILD_TESTING:BOOL=FALSE")
else
echo "Keeping checkPhase as-is"
cmakeFlagsArray+=("${lib.cmakeBool "BUILD_TESTING" finalAttrs.doCheck}")
fi
'';
nativeCheckInputs = [ nasm ];
checkInputs = [ catch2_3 ];