diff options
Diffstat (limited to 'pkgs/tools/security/yara/default.nix')
-rw-r--r-- | pkgs/tools/security/yara/default.nix | 66 |
1 files changed, 40 insertions, 26 deletions
diff --git a/pkgs/tools/security/yara/default.nix b/pkgs/tools/security/yara/default.nix index 36a77102eb432..44b1544ab935f 100644 --- a/pkgs/tools/security/yara/default.nix +++ b/pkgs/tools/security/yara/default.nix @@ -1,16 +1,22 @@ -{ lib, stdenv -, fetchFromGitHub -, autoreconfHook -, pcre -, pkg-config -, protobufc -, withCrypto ? true, openssl -, enableCuckoo ? true, jansson -, enableDex ? true -, enableDotNet ? true -, enableMacho ? true -, enableMagic ? true, file -, enableStatic ? false +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + autoreconfHook, + pcre, + pkg-config, + protobufc, + withCrypto ? true, + openssl, + enableCuckoo ? true, + jansson, + enableDex ? true, + enableDotNet ? true, + enableMacho ? true, + enableMagic ? true, + file, + enableStatic ? false, }: stdenv.mkDerivation rec { @@ -19,26 +25,32 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "VirusTotal"; - repo = pname; - rev = "v${version}"; + repo = "yara"; + rev = "refs/tags/v${version}"; hash = "sha256-AecHsUBtBleUkWuYMQ4Tx/PY8cs9j7JwqncBziJD0hA="; }; + patches = [ + (fetchpatch { + name = "LFS64.patch"; + url = "https://github.com/VirusTotal/yara/commit/833a580430abe0fbc9bc17a21fb95bf36dacf367.patch"; + hash = "sha256-EmwyDsxaNd9zfpAOu6ZB9kzg04qB7LAD7UJB3eAuKd8="; + }) + ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ - pcre - protobufc - ] ++ lib.optionals withCrypto [ - openssl - ] ++ lib.optionals enableMagic [ - file - ] ++ lib.optionals enableCuckoo [ - jansson - ]; + buildInputs = + [ + pcre + protobufc + ] + ++ lib.optionals withCrypto [ openssl ] + ++ lib.optionals enableMagic [ file ] + ++ lib.optionals enableCuckoo [ jansson ]; preConfigure = "./bootstrap.sh"; @@ -55,10 +67,12 @@ stdenv.mkDerivation rec { doCheck = enableStatic; meta = with lib; { - description = "The pattern matching swiss knife for malware researchers"; + description = "Tool to perform pattern matching for malware-related tasks"; homepage = "http://Virustotal.github.io/yara/"; + changelog = "https://github.com/VirusTotal/yara/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; + mainProgram = "yara"; platforms = platforms.all; }; } |