diff options
Diffstat (limited to 'pkgs/tools/security/clamav')
-rw-r--r-- | pkgs/tools/security/clamav/default.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix index 0cb34b2e73c9..88df4d78d26b 100644 --- a/pkgs/tools/security/clamav/default.nix +++ b/pkgs/tools/security/clamav/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl -, libmilter, pcre, freshclamConf ? null }: +, libmilter, pcre }: stdenv.mkDerivation rec { name = "clamav-${version}"; @@ -10,9 +10,17 @@ stdenv.mkDerivation rec { sha256 = "0yh2q318bnmf2152g2h1yvzgqbswn0wvbzb8p4kf7v057shxcyqn"; }; - buildInputs = [ zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre ]; + # 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}" @@ -22,10 +30,12 @@ stdenv.mkDerivation rec { "--with-libcurl=${curl.dev}" "--with-pcre=${pcre.dev}" "--enable-milter" - "--disable-clamav" ]; - fixupPhase = if (freshclamConf != null) then ''echo "${freshclamConf}" > $out/etc/freshclam.conf'' else ""; + postInstall = '' + mkdir $out/etc + cp etc/*.sample $out/etc + ''; meta = with stdenv.lib; { homepage = http://www.clamav.net; |