13 # Enabling python support while cross compiling would be possible, but the
14 # configure script tries executing python to gather info instead of relying on
15 # python3-config exclusively
16 , enablePython ? stdenv.hostPlatform == stdenv.buildPlatform,
19 stdenv.mkDerivation (finalAttrs: {
24 url = "https://people.redhat.com/sgrubb/audit/audit-${finalAttrs.version}.tar.gz";
25 hash = "sha256-v0ItQSard6kqTDrDneVHPyeNw941ck0lGKSMe+FdVNg=";
31 url = "https://github.com/linux-audit/audit-userspace/commit/64cb48e1e5137b8a389c7528e611617a98389bc7.patch";
32 hash = "sha256-DN2F5w+2Llm80FZntH9dvdyT00pVBSgRu8DDFILyrlU=";
36 url = "https://github.com/linux-audit/audit-userspace/commit/4192eb960388458c85d76e5e385cfeef48f02c79.patch";
37 hash = "sha256-G6CJ9nBJSsTyJ0qq14PVo+YdInAvLLQtXcR25Q8V5/4=";
42 substituteInPlace bindings/swig/src/auditswig.i \
43 --replace "/usr/include/linux/audit.h" \
44 "${linuxHeaders}/include/linux/audit.h"
47 outputs = [ "bin" "dev" "out" "man" ];
52 buildPackages.stdenv.cc
58 ++ lib.optionals enablePython [
68 # z/OS plugin is not useful on Linux, and pulls in an extra openldap
69 # dependency otherwise
70 "--disable-zos-remote"
73 (if enablePython then "--with-python" else "--without-python")
76 enableParallelBuilding = true;
79 musl = pkgsCross.musl64.audit;
83 homepage = "https://people.redhat.com/sgrubb/audit/";
84 description = "Audit Library";
85 changelog = "https://github.com/linux-audit/audit-userspace/releases/tag/v${finalAttrs.version}";
86 license = lib.licenses.gpl2Plus;
87 maintainers = with lib.maintainers; [ AndersonTorres ];
88 platforms = lib.platforms.linux;