audit: 4.0 -> 4.0.2 (#352164)

This commit is contained in:
Emily
2024-11-26 10:53:09 +00:00
committed by GitHub
+35 -41
View File
@@ -1,50 +1,43 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, autoreconfHook
, bash
, buildPackages
, linuxHeaders
, python3
, swig
, pkgsCross
{
lib,
stdenv,
fetchurl,
fetchpatch,
autoreconfHook,
bash,
buildPackages,
linuxHeaders,
python3,
swig,
pkgsCross,
# Enabling python support while cross compiling would be possible, but the
# configure script tries executing python to gather info instead of relying on
# python3-config exclusively
, enablePython ? stdenv.hostPlatform == stdenv.buildPlatform,
# Enabling python support while cross compiling would be possible, but the
# configure script tries executing python to gather info instead of relying on
# python3-config exclusively
enablePython ? stdenv.hostPlatform == stdenv.buildPlatform,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "audit";
version = "4.0";
version = "4.0.2";
src = fetchurl {
url = "https://people.redhat.com/sgrubb/audit/audit-${finalAttrs.version}.tar.gz";
hash = "sha256-v0ItQSard6kqTDrDneVHPyeNw941ck0lGKSMe+FdVNg=";
hash = "sha256-1dG11Q7kotDReHW8aua9an1bNNlVfqhHo5+uxTH6qgo=";
};
patches = [
(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" \
"${linuxHeaders}/include/linux/audit.h"
--replace-fail "/usr/include/linux/audit.h" \
"${linuxHeaders}/include/linux/audit.h"
'';
outputs = [ "bin" "dev" "out" "man" ];
outputs = [
"bin"
"lib"
"dev"
"out"
"man"
];
strictDeps = true;
@@ -52,13 +45,14 @@ stdenv.mkDerivation (finalAttrs: {
buildPackages.stdenv.cc
];
nativeBuildInputs = [
autoreconfHook
]
++ lib.optionals enablePython [
python3
swig
];
nativeBuildInputs =
[
autoreconfHook
]
++ lib.optionals enablePython [
python3
swig
];
buildInputs = [
bash