From 8fbb95ca8deae8bc8fbabbe54eda8d9a8a46493d Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 26 Jun 2024 13:00:39 +0200 Subject: [PATCH] pkgsMusl.audit: fix build Fixes: c01ada8c551f ("audit: 3.1.2 -> 4.0") --- pkgs/os-specific/linux/audit/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/os-specific/linux/audit/default.nix b/pkgs/os-specific/linux/audit/default.nix index 6095e258acec..846d21c56d83 100644 --- a/pkgs/os-specific/linux/audit/default.nix +++ b/pkgs/os-specific/linux/audit/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch , autoreconfHook , bash , buildPackages @@ -23,6 +24,19 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-v0ItQSard6kqTDrDneVHPyeNw941ck0lGKSMe+FdVNg="; }; + patches = lib.optionals (!stdenv.hostPlatform.isGnu) [ + (fetchpatch { + name = "musl.patch"; + url = "https://github.com/linux-audit/audit-userspace/commit/64cb48e1e5137b8a389c7528e611617a98389bc7.patch"; + hash = "sha256-DN2F5w+2Llm80FZntH9dvdyT00pVBSgRu8DDFILyrlU="; + }) + (fetchpatch { + name = "musl.patch"; + url = "https://github.com/linux-audit/audit-userspace/commit/4192eb960388458c85d76e5e385cfeef48f02c79.patch"; + hash = "sha256-G6CJ9nBJSsTyJ0qq14PVo+YdInAvLLQtXcR25Q8V5/4="; + }) + ]; + postPatch = '' substituteInPlace bindings/swig/src/auditswig.i \ --replace "/usr/include/linux/audit.h" \