nixpkgs/pkgs/tools/security/yara/default.nix

39 lines
1.0 KiB
Nix
Raw Normal View History

2017-02-01 19:58:13 -08:00
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, pcre
2015-10-31 14:59:34 -07:00
, withCrypto ? true, openssl
, enableMagic ? true, file
, enableCuckoo ? true, jansson
}:
stdenv.mkDerivation rec {
version = "3.8.1";
2015-10-31 14:59:34 -07:00
name = "yara-${version}";
src = fetchFromGitHub {
2017-02-01 19:58:13 -08:00
owner = "VirusTotal";
2015-10-31 14:59:34 -07:00
repo = "yara";
rev = "v${version}";
sha256 = "1ys2y5f2cif3g42daq646jcrn2na19zkx7fds2gnavj5c1rk7463";
2015-10-31 14:59:34 -07: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 14:44:21 -07:00
configureFlags = [
(stdenv.lib.withFeature withCrypto "crypto")
(stdenv.lib.enableFeature enableMagic "magic")
(stdenv.lib.enableFeature enableCuckoo "cuckoo")
];
2015-10-31 14:59:34 -07:00
meta = with stdenv.lib; {
description = "The pattern matching swiss knife for malware researchers";
2017-11-21 15:22:08 -08:00
homepage = http://Virustotal.github.io/yara/;
2015-10-31 14:59:34 -07:00
license = licenses.asl20;
platforms = stdenv.lib.platforms.all;
};
}