2015-06-07 05:34:43 -07:00
|
|
|
{ stdenv, fetchurl, zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl
|
2016-11-14 17:02:25 -08:00
|
|
|
, libmilter, pcre }:
|
2015-09-29 11:08:53 -07:00
|
|
|
|
2012-07-23 07:21:25 -07:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "clamav-${version}";
|
2016-07-28 14:36:38 -07:00
|
|
|
version = "0.99.2";
|
2012-07-23 07:21:25 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-07-28 14:36:38 -07:00
|
|
|
url = "https://www.clamav.net/downloads/production/${name}.tar.gz";
|
|
|
|
sha256 = "0yh2q318bnmf2152g2h1yvzgqbswn0wvbzb8p4kf7v057shxcyqn";
|
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 ' ' '
|
|
|
|
'';
|
|
|
|
|
2016-11-14 17:02:25 -08:00
|
|
|
buildInputs = [
|
|
|
|
zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre
|
|
|
|
];
|
2012-07-23 07:21:25 -07:00
|
|
|
|
|
|
|
configureFlags = [
|
2016-11-14 19:40:33 -08:00
|
|
|
"--sysconfdir=/etc/clamav"
|
2016-04-16 10:50:01 -07:00
|
|
|
"--with-zlib=${zlib.dev}"
|
2017-01-08 05:18:28 -08:00
|
|
|
"--disable-zlib-vcheck" # it fails to recognize that 1.2.10 >= 1.2.2
|
2017-08-26 02:22:15 -07:00
|
|
|
"--disable-llvm" # enabling breaks the build at the moment
|
2016-04-16 09:46:12 -07:00
|
|
|
"--with-libbz2-prefix=${bzip2.dev}"
|
2014-11-26 15:16:50 -08:00
|
|
|
"--with-iconv-dir=${libiconv}"
|
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 10:41:10 -07:00
|
|
|
"--with-libncurses-prefix=${ncurses.dev}"
|
2016-04-16 09:47:59 -07:00
|
|
|
"--with-libcurl=${curl.dev}"
|
2016-04-16 10:45:26 -07:00
|
|
|
"--with-pcre=${pcre.dev}"
|
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; {
|
|
|
|
homepage = http://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;
|
2015-05-02 17:28:13 -07:00
|
|
|
maintainers = with maintainers; [ phreedom robberer qknight ];
|
2012-07-23 07:21:25 -07:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|