From 8b5f49b12ffa70ad37a25a4c597646c6048cfec9 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 9 Feb 2024 15:07:53 +0100 Subject: [PATCH] pkgsMusl.yara: fix segfaults --- pkgs/tools/security/yara/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/tools/security/yara/default.nix b/pkgs/tools/security/yara/default.nix index 83f772d48410..946a424ca681 100644 --- a/pkgs/tools/security/yara/default.nix +++ b/pkgs/tools/security/yara/default.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchFromGitHub +, fetchpatch , autoreconfHook , pcre , pkg-config @@ -24,6 +25,15 @@ stdenv.mkDerivation rec { hash = "sha256-axHFy7YwLhhww+lh+ORyW6YG+T385msysIHK5SMyhMk="; }; + # FIXME: make unconditional on staging + patches = lib.optionals (!stdenv.hostPlatform.isGnu && !stdenv.hostPlatform.isDarwin) [ + (fetchpatch { + name = "musl.patch"; + url = "https://github.com/VirusTotal/yara/commit/515ed861cf30e154b14a69ffd46c347fb81df72f.patch"; + hash = "sha256-2scnUyz0SSkNRlsVQapPgI1ATIPXEogqtxbimYYq4Jo="; + }) + ]; + nativeBuildInputs = [ autoreconfHook pkg-config