Merge pull request #105074 from Mindavi/clamav/0.103.0

This commit is contained in:
Sandro 2020-12-08 04:30:24 +01:00 committed by GitHub
commit 662d2ff82f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig { stdenv, fetchurl, pkg-config
, zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl, libmilter, pcre2 , zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl, libmilter, pcre2
, libmspack, systemd, Foundation , libmspack, systemd, Foundation, json_c, check
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -17,9 +17,10 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile.in --replace ' etc ' ' ' substituteInPlace Makefile.in --replace ' etc ' ' '
''; '';
nativeBuildInputs = [ pkgconfig ]; enableParallelBuilding = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ 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.isLinux systemd
++ stdenv.lib.optional stdenv.isDarwin Foundation; ++ stdenv.lib.optional stdenv.isDarwin Foundation;
@ -31,8 +32,11 @@ stdenv.mkDerivation rec {
"--with-xml=${libxml2.dev}" "--with-xml=${libxml2.dev}"
"--with-openssl=${openssl.dev}" "--with-openssl=${openssl.dev}"
"--with-libcurl=${curl.dev}" "--with-libcurl=${curl.dev}"
"--with-libjson=${json_c.dev}"
"--with-system-libmspack" "--with-system-libmspack"
"--enable-milter" "--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 ] ++ stdenv.lib.optional stdenv.isLinux
"--with-systemdsystemunitdir=$(out)/lib/systemd"; "--with-systemdsystemunitdir=$(out)/lib/systemd";
@ -41,6 +45,10 @@ stdenv.mkDerivation rec {
cp etc/*.sample $out/etc cp etc/*.sample $out/etc
''; '';
# Only required for the unit tests
hardeningDisable = [ "format" ];
doCheck = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://www.clamav.net"; homepage = "https://www.clamav.net";
description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats"; description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";