python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / security / clamav / default.nix
blob16cd827b8f3ba1c9918805c7d4f738c9d509d4b7
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
5 }:
7 stdenv.mkDerivation rec {
8   pname = "clamav";
9   version = "0.105.1";
11   src = fetchurl {
12     url = "https://www.clamav.net/downloads/production/${pname}-${version}.tar.gz";
13     sha256 = "sha256-0rwWN024iablpqxA+MbnACVKA5rKpTaIWgnu6kuFKfY=";
14   };
16   patches = [
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
20   ];
22   enableParallelBuilding = true;
23   nativeBuildInputs = [ cmake pkg-config rustc rust-bindgen rustfmt cargo python3 ];
24   buildInputs = [
25     zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack json_c check
26   ] ++ lib.optional stdenv.isLinux systemd
27     ++ lib.optional stdenv.isDarwin Foundation;
29   cmakeFlags = [
30     "-DSYSTEMD_UNIT_DIR=${placeholder "out"}/lib/systemd"
31     "-DAPP_CONFIG_DIRECTORY=/etc/clamav"
32   ];
34   doCheck = true;
36   meta = with lib; {
37     homepage = "https://www.clamav.net";
38     description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";
39     license = licenses.gpl2;
40     maintainers = with maintainers; [ robberer qknight globin ];
41     platforms = platforms.unix;
42   };