rsyslog: replace mkFlag with lib.enableFeature

This commit is contained in:
Pavol Rusnak 2022-06-29 21:44:48 +02:00
parent 4646c62ecb
commit daa8d8b42c
No known key found for this signature in database
GPG key ID: 91F3B339B9A02A3D

View file

@ -9,9 +9,6 @@
}: }:
with lib; with lib;
let
mkFlag = cond: name: if cond then "--enable-${name}" else "--disable-${name}";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rsyslog"; pname = "rsyslog";
version = "8.2204.1"; version = "8.2204.1";
@ -36,72 +33,72 @@ stdenv.mkDerivation rec {
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--localstatedir=/var" "--localstatedir=/var"
"--with-systemdsystemunitdir=\${out}/etc/systemd/system" "--with-systemdsystemunitdir=\${out}/etc/systemd/system"
(mkFlag true "largefile") (enableFeature true "largefile")
(mkFlag true "regexp") (enableFeature true "regexp")
(mkFlag (libkrb5 != null) "gssapi-krb5") (enableFeature (libkrb5 != null) "gssapi-krb5")
(mkFlag true "klog") (enableFeature true "klog")
(mkFlag true "kmsg") (enableFeature true "kmsg")
(mkFlag (systemd != null) "imjournal") (enableFeature (systemd != null) "imjournal")
(mkFlag true "inet") (enableFeature true "inet")
(mkFlag (jemalloc != null) "jemalloc") (enableFeature (jemalloc != null) "jemalloc")
(mkFlag true "unlimited-select") (enableFeature true "unlimited-select")
(mkFlag false "debug") (enableFeature false "debug")
(mkFlag false "debug-symbols") (enableFeature false "debug-symbols")
(mkFlag true "debugless") (enableFeature true "debugless")
(mkFlag false "valgrind") (enableFeature false "valgrind")
(mkFlag false "diagtools") (enableFeature false "diagtools")
(mkFlag true "usertools") (enableFeature true "usertools")
(mkFlag (libmysqlclient != null) "mysql") (enableFeature (libmysqlclient != null) "mysql")
(mkFlag (postgresql != null) "pgsql") (enableFeature (postgresql != null) "pgsql")
(mkFlag (libdbi != null) "libdbi") (enableFeature (libdbi != null) "libdbi")
(mkFlag (net-snmp != null) "snmp") (enableFeature (net-snmp != null) "snmp")
(mkFlag (libuuid != null) "uuid") (enableFeature (libuuid != null) "uuid")
(mkFlag (curl != null) "elasticsearch") (enableFeature (curl != null) "elasticsearch")
(mkFlag (gnutls != null) "gnutls") (enableFeature (gnutls != null) "gnutls")
(mkFlag (libgcrypt != null) "libgcrypt") (enableFeature (libgcrypt != null) "libgcrypt")
(mkFlag true "rsyslogrt") (enableFeature true "rsyslogrt")
(mkFlag true "rsyslogd") (enableFeature true "rsyslogd")
(mkFlag true "mail") (enableFeature true "mail")
(mkFlag (liblognorm != null) "mmnormalize") (enableFeature (liblognorm != null) "mmnormalize")
(mkFlag (libmaxminddb != null) "mmdblookup") (enableFeature (libmaxminddb != null) "mmdblookup")
(mkFlag true "mmjsonparse") (enableFeature true "mmjsonparse")
(mkFlag true "mmaudit") (enableFeature true "mmaudit")
(mkFlag true "mmanon") (enableFeature true "mmanon")
(mkFlag true "mmutf8fix") (enableFeature true "mmutf8fix")
(mkFlag true "mmcount") (enableFeature true "mmcount")
(mkFlag true "mmsequence") (enableFeature true "mmsequence")
(mkFlag true "mmfields") (enableFeature true "mmfields")
(mkFlag true "mmpstrucdata") (enableFeature true "mmpstrucdata")
(mkFlag (openssl != null) "mmrfc5424addhmac") (enableFeature (openssl != null) "mmrfc5424addhmac")
(mkFlag (librelp != null) "relp") (enableFeature (librelp != null) "relp")
(mkFlag (libksi != null) "ksi-ls12") (enableFeature (libksi != null) "ksi-ls12")
(mkFlag (liblogging != null) "liblogging-stdlog") (enableFeature (liblogging != null) "liblogging-stdlog")
(mkFlag (liblogging != null) "rfc3195") (enableFeature (liblogging != null) "rfc3195")
(mkFlag true "imfile") (enableFeature true "imfile")
(mkFlag false "imsolaris") (enableFeature false "imsolaris")
(mkFlag true "imptcp") (enableFeature true "imptcp")
(mkFlag true "impstats") (enableFeature true "impstats")
(mkFlag true "omprog") (enableFeature true "omprog")
(mkFlag (libnet != null) "omudpspoof") (enableFeature (libnet != null) "omudpspoof")
(mkFlag true "omstdout") (enableFeature true "omstdout")
(mkFlag (systemd != null) "omjournal") (enableFeature (systemd != null) "omjournal")
(mkFlag true "pmlastmsg") (enableFeature true "pmlastmsg")
(mkFlag true "pmcisconames") (enableFeature true "pmcisconames")
(mkFlag true "pmciscoios") (enableFeature true "pmciscoios")
(mkFlag true "pmaixforwardedfrom") (enableFeature true "pmaixforwardedfrom")
(mkFlag true "pmsnare") (enableFeature true "pmsnare")
(mkFlag true "omruleset") (enableFeature true "omruleset")
(mkFlag true "omuxsock") (enableFeature true "omuxsock")
(mkFlag true "mmsnmptrapd") (enableFeature true "mmsnmptrapd")
(mkFlag (hadoop != null) "omhdfs") (enableFeature (hadoop != null) "omhdfs")
(mkFlag (rdkafka != null) "omkafka") (enableFeature (rdkafka != null) "omkafka")
(mkFlag (libmongo-client != null) "ommongodb") (enableFeature (libmongo-client != null) "ommongodb")
(mkFlag (czmq != null) "imczmq") (enableFeature (czmq != null) "imczmq")
(mkFlag (czmq != null) "omczmq") (enableFeature (czmq != null) "omczmq")
(mkFlag (rabbitmq-c != null) "omrabbitmq") (enableFeature (rabbitmq-c != null) "omrabbitmq")
(mkFlag (hiredis != null) "omhiredis") (enableFeature (hiredis != null) "omhiredis")
(mkFlag (curl != null) "omhttpfs") (enableFeature (curl != null) "omhttpfs")
(mkFlag true "generate-man-pages") (enableFeature true "generate-man-pages")
]; ];
passthru.tests = { passthru.tests = {