@@ -1,61 +1,29 @@
1−{ stdenv, fetchurl
2−, libcap_ng
3−
4−# Optional Dependencies
5−, openldap ? null, python ? null, go ? null, krb5 ? null, tcp_wrappers ? null
6−
7−# Extra arguments
8−, prefix ? ""
1+{ stdenv, fetchurl, openldap
2+, enablePython ? false, python ? null
93}:
104
11−with stdenv;
12−let
13− libOnly = prefix == "lib";
5+assert enablePython -> python != null;
146
15− optOpenldap = if libOnly then null else shouldUsePkg openldap;
16− optPython = shouldUsePkg python;
17− optGo = shouldUsePkg go;
18− optKrb5 = if libOnly then null else shouldUsePkg krb5;
19− optTcp_wrappers = if libOnly then null else shouldUsePkg tcp_wrappers;
20−in
21−with stdenv.lib;
227stdenv.mkDerivation rec {
23− name = "${prefix}audit-${version}";
24− version = "2.4.2";
8+ name = "audit-2.4.1";
259
2610 src = fetchurl {
27− url = "http://people.redhat.com/sgrubb/audit/audit-${version}.tar.gz";
28− sha256 = "08j134s4509rxfi3hwsp8yyxzlqqxl8kqgv2rfv6p3qng5pjd80j";
11+ url = "http://people.redhat.com/sgrubb/audit/${name}.tar.gz";
12+ sha256 = "09ihn392pmac1pyjrs22966csia83yr84hq5ri6sybwj1vx4d4q5";
2913 };
3014
31− buildInputs = [ libcap_ng optOpenldap optPython optGo optKrb5 optTcp_wrappers ];
15+ buildInputs = [ openldap ]
16+ ++ stdenv.lib.optional enablePython python;
3217
33− # For libs only build and install the lib portion
34− preBuild = optionalString libOnly ''
35− cd lib
18+ configureFlags = ''
19+ ${if enablePython then "--with-python" else "--without-python"}
3620 '';
3721
38− configureFlags = [
39− (mkWith (optPython != null) "python" null)
40− (mkWith (optGo != null) "golang" null)
41− (mkEnable (!libOnly) "listener" null)
42− (mkEnable (optKrb5 != null) "gssapi-krb5" null)
43− (mkEnable false "systemd" null)
44− (mkWith false "debug" null)
45− (mkWith false "warn" null)
46− (mkWith false "alpha" null) # TODO: Support
47− (mkWith false "arm" null) # TODO: Support
48− (mkWith false "aarch64" null) # TODO: Support
49− (mkWith (!libOnly) "apparmor" null)
50− (mkWith false "prelude" null)
51− (mkWith (optTcp_wrappers != null) "libwrap" optTcp_wrappers)
52− ];
53−
5422 meta = {
5523 description = "Audit Library";
5624 homepage = "http://people.redhat.com/sgrubb/audit/";
57− license = licenses.gpl2;
58− platforms = platforms.linux;
59− maintainers = with maintainers; [ fuuzetsu wkennington ];
25+ license = stdenv.lib.licenses.gpl2;
26+ platforms = stdenv.lib.platforms.linux;
27+ maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
6028 };
6129}