diff options
author | Rick van Schijndel <rol3517@gmail.com> | 2020-11-26 21:17:17 +0100 |
---|---|---|
committer | Rick van Schijndel <rol3517@gmail.com> | 2020-11-27 19:22:43 +0100 |
commit | b7bdab77eb96fa0548ca23817bf4df44b7318e84 (patch) | |
tree | 058e0b7bbd792cd8b129e385a004c4d1cee6f7d4 /pkgs/tools/security/clamav | |
parent | ea84f9d409d0a2216b592591a14608d2148067dc (diff) |
clamav: enable unit tests, add libjson-c, disable rar explicitly
- Add libjson-c dependency for --gen-json functionality. - Disable rar functionality - Because it uses non-free software - Because it doesn't work properly without extra patches - This didn't work before either, but a warning was added about failing to load the rar library - Enable unit tests and add check dependency for that
Diffstat (limited to 'pkgs/tools/security/clamav')
-rw-r--r-- | pkgs/tools/security/clamav/default.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix index 3c09951f24f88..d0c9003f1ba2e 100644 --- a/pkgs/tools/security/clamav/default.nix +++ b/pkgs/tools/security/clamav/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig , zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl, libmilter, pcre2 -, libmspack, systemd, Foundation +, libmspack, systemd, Foundation, json_c, check }: stdenv.mkDerivation rec { @@ -17,9 +17,10 @@ stdenv.mkDerivation rec { substituteInPlace Makefile.in --replace ' etc ' ' ' ''; + enableParallelBuilding = true; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ - zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack + zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack json_c check ] ++ stdenv.lib.optional stdenv.isLinux systemd ++ stdenv.lib.optional stdenv.isDarwin Foundation; @@ -31,8 +32,11 @@ stdenv.mkDerivation rec { "--with-xml=${libxml2.dev}" "--with-openssl=${openssl.dev}" "--with-libcurl=${curl.dev}" + "--with-libjson=${json_c.dev}" "--with-system-libmspack" "--enable-milter" + "--disable-unrar" # disable unrar because it's non-free and requires some extra patching to work properly + "--enable-check" ] ++ stdenv.lib.optional stdenv.isLinux "--with-systemdsystemunitdir=$(out)/lib/systemd"; @@ -41,6 +45,10 @@ stdenv.mkDerivation rec { cp etc/*.sample $out/etc ''; + # Only required for the unit tests + hardeningDisable = [ "format" ]; + doCheck = true; + meta = with stdenv.lib; { homepage = "https://www.clamav.net"; description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats"; |