diff options
| author | Robert Scott <code@humanleg.org.uk> | 2021-06-01 15:34:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-01 15:34:44 +0100 |
| commit | 37b13b3d08bdaeab42112674141848d0f8e75141 (patch) | |
| tree | 4b93d33baacb0b256f13b91262a5b3f72dff5a3f | |
| parent | Merge #125185: zstd: patch test flakiness on i686 (diff) | |
| parent | yara: add enableStatic mode (diff) | |
| download | nixpkgs-37b13b3d08bdaeab42112674141848d0f8e75141.tar.gz | |
Merge pull request #125226 from NixOS/backport-124892-to-release-21.05
[Backport release-21.05] yara: 4.0.5 -> 4.1.1
| -rw-r--r-- | pkgs/tools/security/yara/default.nix | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/pkgs/tools/security/yara/default.nix b/pkgs/tools/security/yara/default.nix index 506bf0f719d7..3eb5495d2c96 100644 --- a/pkgs/tools/security/yara/default.nix +++ b/pkgs/tools/security/yara/default.nix @@ -1,5 +1,4 @@ { lib, stdenv -, fetchpatch , fetchFromGitHub , autoreconfHook , pcre @@ -11,17 +10,18 @@ , enableDotNet ? true , enableMacho ? true , enableMagic ? true, file +, enableStatic ? false }: stdenv.mkDerivation rec { - version = "4.0.5"; + version = "4.1.1"; pname = "yara"; src = fetchFromGitHub { owner = "VirusTotal"; repo = "yara"; rev = "v${version}"; - sha256 = "1gkdll2ygdlqy1f27a5b84gw2bq75ss7acsx06yhiss90qwdaalq"; + sha256 = "185j7firn7i5506rcp0va7sxdbminwrm06jsm4c70jf98qxmv522"; }; nativeBuildInputs = [ autoreconfHook pkg-config ]; @@ -34,19 +34,6 @@ stdenv.mkDerivation rec { preConfigure = "./bootstrap.sh"; - # If static builds are disabled, `make all-am` will fail to find libyara.a and - # cause a build failure. It appears that somewhere between yara 4.0.1 and - # 4.0.5, linking the yara binaries dynamically against libyara.so was broken. - # - # This was already fixed in yara master. Backport the patch to yara 4.0.5. - patches = [ - (fetchpatch { - name = "fix-build-with-no-static.patch"; - url = "https://github.com/VirusTotal/yara/commit/52e6866023b9aca26571c78fb8759bc3a51ba6dc.diff"; - sha256 = "074cf99j0rqiyacp60j1hkvjqxia7qwd11xjqgcr8jmfwihb38nr"; - }) - ]; - configureFlags = [ (lib.withFeature withCrypto "crypto") (lib.enableFeature enableCuckoo "cuckoo") @@ -54,8 +41,11 @@ stdenv.mkDerivation rec { (lib.enableFeature enableDotNet "dotnet") (lib.enableFeature enableMacho "macho") (lib.enableFeature enableMagic "magic") + (lib.enableFeature enableStatic "static") ]; + doCheck = enableStatic; + meta = with lib; { description = "The pattern matching swiss knife for malware researchers"; homepage = "http://Virustotal.github.io/yara/"; |
