2017-02-02 04:58:13 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, pcre
|
2015-10-31 22:59:34 +01:00
|
|
|
, withCrypto ? true, openssl
|
|
|
|
, enableMagic ? true, file
|
|
|
|
, enableCuckoo ? true, jansson
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-05-13 15:00:16 +02:00
|
|
|
version = "3.10.0";
|
2015-10-31 22:59:34 +01:00
|
|
|
name = "yara-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-02-02 04:58:13 +01:00
|
|
|
owner = "VirusTotal";
|
2015-10-31 22:59:34 +01:00
|
|
|
repo = "yara";
|
|
|
|
rev = "v${version}";
|
2019-05-13 15:00:16 +02:00
|
|
|
sha256 = "1qxqk324cyvi4n09s79786ciig1gdyhs9dnsm07hf95a3kh6w5z2";
|
2015-10-31 22:59:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ autoconf automake libtool pcre]
|
|
|
|
++ stdenv.lib.optionals withCrypto [ openssl ]
|
|
|
|
++ stdenv.lib.optionals enableMagic [ file ]
|
|
|
|
++ stdenv.lib.optionals enableCuckoo [ jansson ]
|
|
|
|
;
|
|
|
|
|
|
|
|
preConfigure = "./bootstrap.sh";
|
|
|
|
|
2018-07-25 23:44:21 +02:00
|
|
|
configureFlags = [
|
|
|
|
(stdenv.lib.withFeature withCrypto "crypto")
|
|
|
|
(stdenv.lib.enableFeature enableMagic "magic")
|
|
|
|
(stdenv.lib.enableFeature enableCuckoo "cuckoo")
|
|
|
|
];
|
2015-10-31 22:59:34 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "The pattern matching swiss knife for malware researchers";
|
2017-11-22 00:22:08 +01:00
|
|
|
homepage = http://Virustotal.github.io/yara/;
|
2015-10-31 22:59:34 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|