nixpkgs/pkgs/tools/security/clamav/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.3 KiB
Nix
Raw Normal View History

2022-05-13 12:33:40 +02:00
{ lib, stdenv, fetchurl, pkg-config, cmake
2018-07-15 22:02:26 +02:00
, zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl, libmilter, pcre2
, libmspack, systemd, Foundation, json_c, check
2022-05-13 12:33:40 +02:00
, rustc, rust-bindgen, rustfmt, cargo, python3
2018-01-26 16:02:29 +01:00
}:
2012-07-23 16:21:25 +02:00
stdenv.mkDerivation rec {
pname = "clamav";
2022-05-13 12:33:40 +02:00
version = "0.105.0";
2012-07-23 16:21:25 +02:00
src = fetchurl {
url = "https://www.clamav.net/downloads/production/${pname}-${version}.tar.gz";
2022-05-13 12:33:40 +02:00
sha256 = "sha256-JwIDpUxFgEnbVPzZNoP/Wy2xkVHzY8SOgs7O/d4rNdQ=";
2012-07-23 16:21:25 +02:00
};
2022-05-13 12:33:40 +02:00
# Flaky test, remove this when https://github.com/Cisco-Talos/clamav/issues/343 is fixed
patches = [ ./remove-freshclam-test.patch ];
enableParallelBuilding = true;
2022-05-13 12:33:40 +02:00
nativeBuildInputs = [ cmake pkg-config rustc rust-bindgen rustfmt cargo python3 ];
buildInputs = [
zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack json_c check
2021-01-15 10:19:50 +01:00
] ++ lib.optional stdenv.isLinux systemd
++ lib.optional stdenv.isDarwin Foundation;
2012-07-23 16:21:25 +02:00
2022-05-13 12:33:40 +02:00
cmakeFlags = [
"-DSYSTEMD_UNIT_DIR=${placeholder "out"}/lib/systemd"
];
2012-07-23 16:21:25 +02:00
doCheck = true;
meta = with lib; {
homepage = "https://www.clamav.net";
description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";
2012-07-23 16:21:25 +02:00
license = licenses.gpl2;
2021-12-18 10:25:46 +01:00
maintainers = with maintainers; [ robberer qknight fpletz globin ];
2020-06-15 12:09:27 +02:00
platforms = platforms.unix;
2012-07-23 16:21:25 +02:00
};
}