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