3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/security/yara/default.nix

48 lines
1.4 KiB
Nix
Raw Normal View History

2019-11-10 14:26:49 +00:00
{ stdenv, fetchFromGitHub, fetchpatch, autoconf, automake, libtool, pcre
2015-10-31 21:59:34 +00:00
, withCrypto ? true, openssl
, enableMagic ? true, file
, enableCuckoo ? true, jansson
}:
stdenv.mkDerivation rec {
2019-11-10 14:26:49 +00:00
version = "3.11.0";
pname = "yara";
2015-10-31 21:59:34 +00:00
src = fetchFromGitHub {
2017-02-02 03:58:13 +00:00
owner = "VirusTotal";
2015-10-31 21:59:34 +00:00
repo = "yara";
rev = "v${version}";
2019-11-10 14:26:49 +00:00
sha256 = "0mx3xm2a70fx8vlynkavq8gfd9w5yjcix5rx85444i2s1h6kcd0j";
2015-10-31 21:59:34 +00:00
};
2019-11-10 14:26:49 +00:00
# See: https://github.com/VirusTotal/yara/issues/1036
# TODO: This patch should not be necessary in the next release
patches = [
(fetchpatch {
url = "https://github.com/VirusTotal/yara/commit/04df811fa61fa54390b274bfcf56d7403c184404.patch";
sha256 = "0hsbc2k7nmk2kskll971draz0an4rmcs5v0iql47mz596vqvkzmb";
})
];
buildInputs = [ autoconf automake libtool pcre ]
2015-10-31 21:59:34 +00:00
++ stdenv.lib.optionals withCrypto [ openssl ]
++ stdenv.lib.optionals enableMagic [ file ]
++ stdenv.lib.optionals enableCuckoo [ jansson ]
;
preConfigure = "./bootstrap.sh";
2018-07-25 22:44:21 +01:00
configureFlags = [
(stdenv.lib.withFeature withCrypto "crypto")
(stdenv.lib.enableFeature enableMagic "magic")
(stdenv.lib.enableFeature enableCuckoo "cuckoo")
];
2015-10-31 21:59:34 +00:00
meta = with stdenv.lib; {
description = "The pattern matching swiss knife for malware researchers";
2017-11-21 23:22:08 +00:00
homepage = http://Virustotal.github.io/yara/;
2015-10-31 21:59:34 +00:00
license = licenses.asl20;
platforms = stdenv.lib.platforms.all;
};
}