2018-07-20 17:44:44 -07:00
|
|
|
{ stdenv, fetchurl, pkgconfig
|
2018-07-15 13:02:26 -07:00
|
|
|
, zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl, libmilter, pcre2
|
|
|
|
, libmspack, systemd
|
2018-01-26 07:02:29 -08:00
|
|
|
}:
|
2015-09-29 11:08:53 -07:00
|
|
|
|
2012-07-23 07:21:25 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "clamav";
|
2020-02-07 19:32:48 -08:00
|
|
|
version = "0.102.2";
|
2012-07-23 07:21:25 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 05:41:18 -07:00
|
|
|
url = "https://www.clamav.net/downloads/production/${pname}-${version}.tar.gz";
|
2020-02-07 19:32:48 -08:00
|
|
|
sha256 = "1lq7r6r2yl8pp3fkn32b0bsmbbl9pg90kpvhsa2clad3xg0drz49";
|
2012-07-23 07:21:25 -07:00
|
|
|
};
|
|
|
|
|
2016-11-14 19:40:33 -08:00
|
|
|
# don't install sample config files into the absolute sysconfdir folder
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.in --replace ' etc ' ' '
|
|
|
|
'';
|
|
|
|
|
2018-01-26 07:02:29 -08:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-11-14 17:02:25 -08:00
|
|
|
buildInputs = [
|
2018-07-15 13:02:26 -07:00
|
|
|
zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack
|
|
|
|
systemd
|
2016-11-14 17:02:25 -08:00
|
|
|
];
|
2012-07-23 07:21:25 -07:00
|
|
|
|
|
|
|
configureFlags = [
|
2018-07-15 13:02:26 -07:00
|
|
|
"--libdir=$(out)/lib"
|
2016-11-14 19:40:33 -08:00
|
|
|
"--sysconfdir=/etc/clamav"
|
2018-07-15 13:02:26 -07:00
|
|
|
"--with-systemdsystemunitdir=$(out)/lib/systemd"
|
2017-08-26 02:22:15 -07:00
|
|
|
"--disable-llvm" # enabling breaks the build at the moment
|
2018-01-26 07:02:29 -08:00
|
|
|
"--with-zlib=${zlib.dev}"
|
2016-08-29 16:57:21 -07:00
|
|
|
"--with-xml=${libxml2.dev}"
|
2016-04-16 10:44:32 -07:00
|
|
|
"--with-openssl=${openssl.dev}"
|
2016-04-16 09:47:59 -07:00
|
|
|
"--with-libcurl=${curl.dev}"
|
2018-07-15 13:02:26 -07:00
|
|
|
"--with-system-libmspack"
|
2015-06-07 05:34:43 -07:00
|
|
|
"--enable-milter"
|
2014-11-26 15:16:50 -08:00
|
|
|
];
|
2012-07-23 07:21:25 -07:00
|
|
|
|
2016-11-14 19:40:33 -08:00
|
|
|
postInstall = ''
|
|
|
|
mkdir $out/etc
|
|
|
|
cp etc/*.sample $out/etc
|
|
|
|
'';
|
|
|
|
|
2012-07-23 07:21:25 -07:00
|
|
|
meta = with stdenv.lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://www.clamav.net";
|
2013-10-05 07:22:46 -07:00
|
|
|
description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";
|
2012-07-23 07:21:25 -07:00
|
|
|
license = licenses.gpl2;
|
2019-08-20 10:36:05 -07:00
|
|
|
maintainers = with maintainers; [ phreedom robberer qknight fpletz globin ];
|
2012-07-23 07:21:25 -07:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|