@ -1,6 +1,6 @@
{ stdenv , fetchurl , pkgconfig
, zlib , bzip2 , libiconv , libxml2 , openssl , ncurses , curl , libmilter , pcre2
, libmspack , systemd , Foundation
, libmspack , systemd , Foundation , json_c , check
} :
stdenv . mkDerivation rec {
@ -17,9 +17,10 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile . in - - replace ' etc ' ' '
'' ;
enableParallelBuilding = true ;
nativeBuildInputs = [ pkgconfig ] ;
buildInputs = [
zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack
zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre2 libmspack json_c check
] ++ stdenv . lib . optional stdenv . isLinux systemd
++ stdenv . lib . optional stdenv . isDarwin Foundation ;
@ -31,8 +32,11 @@ stdenv.mkDerivation rec {
" - - w i t h - x m l = ${ libxml2 . dev } "
" - - w i t h - o p e n s s l = ${ openssl . dev } "
" - - w i t h - l i b c u r l = ${ curl . dev } "
" - - w i t h - l i b j s o n = ${ json_c . dev } "
" - - w i t h - s y s t e m - l i b m s p a c k "
" - - e n a b l e - m i l t e r "
" - - d i s a b l e - u n r a r " # disable unrar because it's non-free and requires some extra patching to work properly
" - - e n a b l e - c h e c k "
] ++ stdenv . lib . optional stdenv . isLinux
" - - w i t h - s y s t e m d s y s t e m u n i t d i r = $ ( o u t ) / l i b / s y s t e m d " ;
@ -41,6 +45,10 @@ stdenv.mkDerivation rec {
cp etc /* . s a m p l e $ o u t / e t c
'' ;
# Only required for the unit tests
hardeningDisable = [ " f o r m a t " ] ;
doCheck = true ;
meta = with stdenv . lib ; {
homepage = " h t t p s : / / w w w . c l a m a v . n e t " ;
description = " A n t i v i r u s e n g i n e d e s i g n e d f o r d e t e c t i n g T r o j a n s , v i r u s e s , m a l w a r e a n d o t h e r m a l i c i o u s t h r e a t s " ;