1 { lib, stdenv, fetchurl, pkg-config, cmake
2 , zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl, libmilter, pcre2
3 , libmspack, systemd, Foundation, json_c, check
4 , rustc, rust-bindgen, rustfmt, cargo, python3
7 stdenv.mkDerivation rec {
12 url = "https://www.clamav.net/downloads/production/${pname}-${version}.tar.gz";
13 hash = "sha256-oxjngKw5prPWxGlxOC+W7d6Xzki442HrgOY0Fe1Batg=";
17 # Flaky test, remove this when https://github.com/Cisco-Talos/clamav/issues/343 is fixed
18 ./remove-freshclam-test.patch
19 ./sample-cofiguration-file-install-location.patch
22 enableParallelBuilding = true;
23 nativeBuildInputs = [ cmake pkg-config rustc rust-bindgen rustfmt cargo python3 ];
25 zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack json_c check
26 ] ++ lib.optional stdenv.hostPlatform.isLinux systemd
27 ++ lib.optional stdenv.hostPlatform.isDarwin Foundation;
30 "-DSYSTEMD_UNIT_DIR=${placeholder "out"}/lib/systemd"
31 "-DAPP_CONFIG_DIRECTORY=/etc/clamav"
41 homepage = "https://www.clamav.net";
42 description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";
43 license = licenses.gpl2Only;
44 maintainers = with maintainers; [ robberer qknight globin ];
45 platforms = platforms.unix;