nixpkgs/pkgs/tools/security/clamav/default.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

94 lines
1.6 KiB
Nix

{
lib,
stdenv,
fetchurl,
pkg-config,
cmake,
zlib,
bzip2,
libiconv,
libxml2,
openssl,
ncurses,
curl,
libmilter,
pcre2,
libmspack,
systemd,
Foundation,
json_c,
check,
rustc,
rust-bindgen,
rustfmt,
cargo,
python3,
}:
stdenv.mkDerivation rec {
pname = "clamav";
version = "1.4.1";
src = fetchurl {
url = "https://www.clamav.net/downloads/production/${pname}-${version}.tar.gz";
hash = "sha256-oxjngKw5prPWxGlxOC+W7d6Xzki442HrgOY0Fe1Batg=";
};
patches = [
# Flaky test, remove this when https://github.com/Cisco-Talos/clamav/issues/343 is fixed
./remove-freshclam-test.patch
./sample-cofiguration-file-install-location.patch
];
enableParallelBuilding = true;
nativeBuildInputs = [
cmake
pkg-config
rustc
rust-bindgen
rustfmt
cargo
python3
];
buildInputs =
[
zlib
bzip2
libxml2
openssl
ncurses
curl
libiconv
libmilter
pcre2
libmspack
json_c
check
]
++ lib.optional stdenv.hostPlatform.isLinux systemd
++ lib.optional stdenv.hostPlatform.isDarwin Foundation;
cmakeFlags = [
"-DSYSTEMD_UNIT_DIR=${placeholder "out"}/lib/systemd"
"-DAPP_CONFIG_DIRECTORY=/etc/clamav"
];
doCheck = true;
checkInputs = [
python3.pkgs.pytest
];
meta = with lib; {
homepage = "https://www.clamav.net";
description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";
license = licenses.gpl2Only;
maintainers = with maintainers; [
robberer
qknight
globin
];
platforms = platforms.unix;
};
}