summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/security/clamav
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2016-11-15 04:40:33 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2016-11-15 04:47:14 +0100
commit9e1e3b288062abf37847307adeee17f3c8dddc42 (patch)
treee6daf4a90e37c7f860c8040b975f299176e75262 /pkgs/tools/security/clamav
parent02e9c88d778b06909d4ef5a2e7e417aaeecb89a7 (diff)
clamav service: refactor
* Sync systemd units with upstream. Upstream uses SIGUSR2 instead of SIGHUP to reload the clamd service. * Convert freshclam service to a oneshot service activated by a systemd timer. This way we can make clamd wait for freshclam to finish fetching the virus database before failing to start if the database doesn't exist yet. * Fixes console tools to work as expected as they require hardcoded config file locations.
Diffstat (limited to 'pkgs/tools/security/clamav')
-rw-r--r--pkgs/tools/security/clamav/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix
index 7473f056ce97..88df4d78d26b 100644
--- a/pkgs/tools/security/clamav/default.nix
+++ b/pkgs/tools/security/clamav/default.nix
@@ -10,11 +10,17 @@ stdenv.mkDerivation rec {
sha256 = "0yh2q318bnmf2152g2h1yvzgqbswn0wvbzb8p4kf7v057shxcyqn";
};
+ # don't install sample config files into the absolute sysconfdir folder
+ postPatch = ''
+ substituteInPlace Makefile.in --replace ' etc ' ' '
+ '';
+
buildInputs = [
zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre
];
configureFlags = [
+ "--sysconfdir=/etc/clamav"
"--with-zlib=${zlib.dev}"
"--with-libbz2-prefix=${bzip2.dev}"
"--with-iconv-dir=${libiconv}"
@@ -26,6 +32,11 @@ stdenv.mkDerivation rec {
"--enable-milter"
];
+ postInstall = ''
+ mkdir $out/etc
+ cp etc/*.sample $out/etc
+ '';
+
meta = with stdenv.lib; {
homepage = http://www.clamav.net;
description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";