From 271e87c33878e242fe044a0bc78069bd96af0791 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 27 Nov 2024 01:25:25 +0100 Subject: [PATCH] audit: backport upstream fix for static builds Upstream thinks this is a fix for non-GCC compilers, but it seems to fix static builds with GCC too. Fixes: c22c8ad5b4ef ("audit: 4.0 -> 4.0.2") --- pkgs/by-name/au/audit/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/au/audit/package.nix b/pkgs/by-name/au/audit/package.nix index f1979802228e..5707948dfd63 100644 --- a/pkgs/by-name/au/audit/package.nix +++ b/pkgs/by-name/au/audit/package.nix @@ -25,6 +25,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-1dG11Q7kotDReHW8aua9an1bNNlVfqhHo5+uxTH6qgo="; }; + patches = [ + (fetchpatch { + name = "static.patch"; + url = "https://github.com/linux-audit/audit-userspace/commit/a89664b45c30a853a6f80b19730984bd78432142.patch"; + hash = "sha256-HsaL9Bfo1MQ1JBKIS9ckNTapGk5eshjWWKh4M+e+Y9c="; + }) + ]; + postPatch = '' substituteInPlace bindings/swig/src/auditswig.i \ --replace-fail "/usr/include/linux/audit.h" \