14 # Enabling python support while cross compiling would be possible, but the
15 # configure script tries executing python to gather info instead of relying on
16 # python3-config exclusively
17 enablePython ? stdenv.hostPlatform == stdenv.buildPlatform,
20 stdenv.mkDerivation (finalAttrs: {
25 url = "https://people.redhat.com/sgrubb/audit/audit-${finalAttrs.version}.tar.gz";
26 hash = "sha256-v0ItQSard6kqTDrDneVHPyeNw941ck0lGKSMe+FdVNg=";
32 url = "https://github.com/linux-audit/audit-userspace/commit/64cb48e1e5137b8a389c7528e611617a98389bc7.patch";
33 hash = "sha256-DN2F5w+2Llm80FZntH9dvdyT00pVBSgRu8DDFILyrlU=";
37 url = "https://github.com/linux-audit/audit-userspace/commit/4192eb960388458c85d76e5e385cfeef48f02c79.patch";
38 hash = "sha256-G6CJ9nBJSsTyJ0qq14PVo+YdInAvLLQtXcR25Q8V5/4=";
43 substituteInPlace bindings/swig/src/auditswig.i \
44 --replace "/usr/include/linux/audit.h" \
45 "${linuxHeaders}/include/linux/audit.h"
58 buildPackages.stdenv.cc
65 ++ lib.optionals enablePython [
75 # z/OS plugin is not useful on Linux, and pulls in an extra openldap
76 # dependency otherwise
77 "--disable-zos-remote"
80 (if enablePython then "--with-python" else "--without-python")
83 enableParallelBuilding = true;
86 musl = pkgsCross.musl64.audit;
90 homepage = "https://people.redhat.com/sgrubb/audit/";
91 description = "Audit Library";
92 changelog = "https://github.com/linux-audit/audit-userspace/releases/tag/v${finalAttrs.version}";
93 license = lib.licenses.gpl2Plus;
94 maintainers = with lib.maintainers; [ ];
95 platforms = lib.platforms.linux;