Merge pull request #90463 from mroi/patch-clamav

clamav: enable build on darwin
This commit is contained in:
Daiderd Jordan 2020-06-23 22:11:52 +02:00 committed by GitHub
commit 70084e80a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig
, zlib, bzip2, libiconv, libxml2, openssl, ncurses, curl, libmilter, pcre2
, libmspack, systemd
, libmspack, systemd, Foundation
}:
stdenv.mkDerivation rec {
@ -20,13 +20,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack
systemd
];
] ++ stdenv.lib.optional stdenv.isLinux systemd
++ stdenv.lib.optional stdenv.isDarwin Foundation;
configureFlags = [
"--libdir=$(out)/lib"
"--sysconfdir=/etc/clamav"
"--with-systemdsystemunitdir=$(out)/lib/systemd"
"--disable-llvm" # enabling breaks the build at the moment
"--with-zlib=${zlib.dev}"
"--with-xml=${libxml2.dev}"
@ -34,7 +33,8 @@ stdenv.mkDerivation rec {
"--with-libcurl=${curl.dev}"
"--with-system-libmspack"
"--enable-milter"
];
] ++ stdenv.lib.optional stdenv.isLinux
"--with-systemdsystemunitdir=$(out)/lib/systemd";
postInstall = ''
mkdir $out/etc
@ -46,6 +46,6 @@ stdenv.mkDerivation rec {
description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";
license = licenses.gpl2;
maintainers = with maintainers; [ phreedom robberer qknight fpletz globin ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@ -2718,7 +2718,9 @@ in
ckb-next = libsForQt5.callPackage ../tools/misc/ckb-next { };
clamav = callPackage ../tools/security/clamav { };
clamav = callPackage ../tools/security/clamav {
inherit (darwin.apple_sdk.frameworks) Foundation;
};
clex = callPackage ../tools/misc/clex { };