blob: 8a11953502341509bb05771bdb9d01e9022820de (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{ stdenv
, fetchFromGitHub
, autoreconfHook
, pcre
, pkg-config
, protobufc
, withCrypto ? true, openssl
, enableMagic ? true, file
, enableCuckoo ? true, jansson
}:
stdenv.mkDerivation rec {
version = "4.0.1";
pname = "yara";
src = fetchFromGitHub {
owner = "VirusTotal";
repo = "yara";
rev = "v${version}";
sha256 = "0dy8jf0pdn0wilxy1pj6pqjxg7icxkwax09w54np87gl9p00f5rk";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ pcre protobufc ]
++ stdenv.lib.optionals withCrypto [ openssl ]
++ stdenv.lib.optionals enableMagic [ file ]
++ stdenv.lib.optionals enableCuckoo [ jansson ]
;
preConfigure = "./bootstrap.sh";
configureFlags = [
(stdenv.lib.withFeature withCrypto "crypto")
(stdenv.lib.enableFeature enableMagic "magic")
(stdenv.lib.enableFeature enableCuckoo "cuckoo")
];
meta = with stdenv.lib; {
description = "The pattern matching swiss knife for malware researchers";
homepage = "http://Virustotal.github.io/yara/";
license = licenses.asl20;
platforms = platforms.all;
};
}
|