diff --git a/pkgs/tools/security/yara/default.nix b/pkgs/tools/security/yara/default.nix new file mode 100644 index 00000000000..6a5269c03dc --- /dev/null +++ b/pkgs/tools/security/yara/default.nix @@ -0,0 +1,64 @@ +{ stdenv, fetchurl, fetchFromGitHub, autoconf, automake, libtool, pcre +, withCrypto ? true, openssl +, enableMagic ? true, file +, enableCuckoo ? true, jansson +}: + +stdenv.mkDerivation rec { + version = "3.4.0"; + name = "yara-${version}"; + + src = fetchFromGitHub { + owner = "plusvic"; + repo = "yara"; + rev = "v${version}"; + sha256 = "1rv1xixbjqx1vkcij8r01rq08ncqgy6nn98xvkrpixwvi4fy956s"; + }; + + # FIXME: this is probably not the right way to make it work + # make[2]: *** No rule to make target 'libyara/.libs/libyara.a', needed by 'yara'. Stop. + dynamic_library_extension = "" + + stdenv.lib.optionalString stdenv.isLinux "so" + + stdenv.lib.optionalString stdenv.isDarwin "dylib" + ; + prePatch = '' + cat >staticlibrary.patch <