lol

clamav: Fix cli clamav programs not finding configuration files

+35 -2
+6 -2
pkgs/tools/security/clamav/default.nix
··· 13 13 sha256 = "sha256-JwIDpUxFgEnbVPzZNoP/Wy2xkVHzY8SOgs7O/d4rNdQ="; 14 14 }; 15 15 16 - # Flaky test, remove this when https://github.com/Cisco-Talos/clamav/issues/343 is fixed 17 - patches = [ ./remove-freshclam-test.patch ]; 16 + patches = [ 17 + # Flaky test, remove this when https://github.com/Cisco-Talos/clamav/issues/343 is fixed 18 + ./remove-freshclam-test.patch 19 + ./sample-cofiguration-file-install-location.patch 20 + ]; 18 21 19 22 enableParallelBuilding = true; 20 23 nativeBuildInputs = [ cmake pkg-config rustc rust-bindgen rustfmt cargo python3 ]; ··· 25 28 26 29 cmakeFlags = [ 27 30 "-DSYSTEMD_UNIT_DIR=${placeholder "out"}/lib/systemd" 31 + "-DAPP_CONFIG_DIRECTORY=/etc/clamav" 28 32 ]; 29 33 30 34 doCheck = true;
+29
pkgs/tools/security/clamav/sample-cofiguration-file-install-location.patch
··· 1 + diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt 2 + index 826fff1..3cefc34 100644 3 + --- a/etc/CMakeLists.txt 4 + +++ b/etc/CMakeLists.txt 5 + @@ -6,14 +6,14 @@ install( 6 + FILES 7 + ${CMAKE_CURRENT_SOURCE_DIR}/clamd.conf.sample 8 + DESTINATION 9 + - ${APP_CONFIG_DIRECTORY} 10 + + ${CMAKE_INSTALL_PREFIX}/${APP_CONFIG_DIRECTORY} 11 + COMPONENT programs) 12 + 13 + install( 14 + FILES 15 + ${CMAKE_CURRENT_SOURCE_DIR}/freshclam.conf.sample 16 + DESTINATION 17 + - ${APP_CONFIG_DIRECTORY} 18 + + ${CMAKE_INSTALL_PREFIX}/${APP_CONFIG_DIRECTORY} 19 + COMPONENT programs) 20 + 21 + if(ENABLE_MILTER) 22 + @@ -21,6 +21,6 @@ if(ENABLE_MILTER) 23 + FILES 24 + ${CMAKE_CURRENT_SOURCE_DIR}/clamav-milter.conf.sample 25 + DESTINATION 26 + - ${APP_CONFIG_DIRECTORY} 27 + + ${CMAKE_INSTALL_PREFIX}/${APP_CONFIG_DIRECTORY} 28 + COMPONENT programs) 29 + endif()