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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-05-24 08:41:26 +03:00
, fetchFromGitHub
, autoreconfHook
, pcre
, pkg-config
, protobufc
2015-11-01 00:59:34 +03:00
, withCrypto ? true, openssl
, enableCuckoo ? true, jansson
2021-03-28 14:15:33 +03:00
, enableDex ? true
, enableDotNet ? true
, enableMacho ? true
, enableMagic ? true, file
, enableStatic ? false
2015-11-01 00:59:34 +03:00
}:
stdenv.mkDerivation rec {
pname = "yara";
2022-08-09 23:05:02 +03:00
version = "4.2.3";
2015-11-01 00:59:34 +03:00
src = fetchFromGitHub {
2017-02-02 06:58:13 +03:00
owner = "VirusTotal";
2022-02-21 01:43:22 +03:00
repo = pname;
2015-11-01 00:59:34 +03:00
rev = "v${version}";
2022-08-09 23:05:02 +03:00
hash = "sha256-Ol2btm1A8JdvYrjD0hPtc17A4L9wgr4l30C8VrImVoE=";
2015-11-01 00:59:34 +03:00
};
2022-02-21 01:43:22 +03:00
nativeBuildInputs = [
autoreconfHook
pkg-config
];
2019-11-10 17:26:49 +03:00
2022-02-21 01:43:22 +03:00
buildInputs = [
pcre
protobufc
] ++ lib.optionals withCrypto [
openssl
] ++ lib.optionals enableMagic [
file
] ++ lib.optionals enableCuckoo [
jansson
];
2015-11-01 00:59:34 +03:00
preConfigure = "./bootstrap.sh";
2018-07-26 00:44:21 +03:00
configureFlags = [
2021-01-15 12:19:50 +03:00
(lib.withFeature withCrypto "crypto")
(lib.enableFeature enableCuckoo "cuckoo")
2021-03-28 14:15:33 +03:00
(lib.enableFeature enableDex "dex")
(lib.enableFeature enableDotNet "dotnet")
(lib.enableFeature enableMacho "macho")
(lib.enableFeature enableMagic "magic")
(lib.enableFeature enableStatic "static")
2018-07-26 00:44:21 +03:00
];
2015-11-01 00:59:34 +03:00
doCheck = enableStatic;
meta = with lib; {
2015-11-01 00:59:34 +03:00
description = "The pattern matching swiss knife for malware researchers";
2020-05-24 08:41:26 +03:00
homepage = "http://Virustotal.github.io/yara/";
license = licenses.asl20;
2021-04-12 20:53:11 +03:00
maintainers = with maintainers; [ fab ];
2020-05-24 08:41:26 +03:00
platforms = platforms.all;
2015-11-01 00:59:34 +03:00
};
}