10 , libmemcached, cyrus_sasl
15 , libnotify, gdk-pixbuf
42 # Defaults to `null` for all supported plugins (except xen, which is marked as
43 # insecure), otherwise a list of plugin names for a custom build
44 , enabledPlugins ? null
49 # Plugins that have dependencies.
50 # Please help to extend these!
54 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ rabbitmq-c ];
55 apache.buildInputs = [ curl ];
56 ascent.buildInputs = [ curl libxml2 ];
57 battery.buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
60 bind.buildInputs = [ curl libxml2 ];
61 ceph.buildInputs = [ yajl ];
62 curl.buildInputs = [ curl ];
63 curl_json.buildInputs = [ curl yajl ];
64 curl_xml.buildInputs = [ curl libxml2 ];
65 dbi.buildInputs = [ libdbi ];
66 disk.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
68 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
71 dns.buildInputs = [ libpcap ];
72 ipmi.buildInputs = [ openipmi ];
73 iptables.buildInputs = [
75 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
78 java.buildInputs = [ jdk libgcrypt libxml2 ];
79 log_logstash.buildInputs = [ yajl ];
80 lua.buildInputs = [ lua ];
81 memcachec.buildInputs = [ libmemcached cyrus_sasl ];
82 modbus.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libmodbus ];
83 mqtt.buildInputs = [ mosquitto ];
84 mysql.buildInputs = lib.optionals (libmysqlclient != null) [
87 netlink.buildInputs = [
89 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
92 network.buildInputs = [ libgcrypt ];
93 nginx.buildInputs = [ curl ];
94 notify_desktop.buildInputs = [ libnotify gdk-pixbuf ];
95 notify_email.buildInputs = [ libesmtp ];
96 openldap.buildInputs = [ openldap ];
97 ovs_events.buildInputs = [ yajl ];
98 ovs_stats.buildInputs = [ yajl ];
99 perl.buildInputs = [ perl ];
100 pinba.buildInputs = [ protobufc ];
101 ping.buildInputs = [ liboping ];
102 postgresql.buildInputs = [ postgresql ];
103 python.buildInputs = [ python3 ];
104 redis.buildInputs = [ hiredis ];
105 rrdcached.buildInputs = [ rrdtool libxml2 ];
106 rrdtool.buildInputs = [ rrdtool libxml2 ];
107 sensors.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ lm_sensors ];
108 sigrok.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libsigrok udev ];
109 smart.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libatasmart udev ];
110 snmp.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ net-snmp ];
111 snmp_agent.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ net-snmp ];
112 varnish.buildInputs = [ curl varnish ];
115 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ lvm2 udev ];
116 write_http.buildInputs = [ curl yajl ];
117 write_kafka.buildInputs = [ yajl rdkafka ];
118 write_log.buildInputs = [ yajl ];
119 write_mongodb.buildInputs = [ mongoc ];
120 write_prometheus.buildInputs = [ protobufc libmicrohttpd ];
121 write_redis.buildInputs = [ hiredis ];
122 write_riemann.buildInputs = [ protobufc riemann_c_client ];
123 xencpu.buildInputs = [ xen ];
126 configureFlags = lib.optionals (enabledPlugins != null) (
127 [ "--disable-all-plugins" ]
128 ++ (map (plugin: "--enable-${plugin}") enabledPlugins));
130 pluginBuildInputs = plugin:
131 lib.optionals (plugins ? ${plugin} && plugins.${plugin} ? buildInputs)
132 plugins.${plugin}.buildInputs;
135 if enabledPlugins == null
136 then builtins.concatMap pluginBuildInputs
137 (builtins.attrNames (builtins.removeAttrs plugins ["xencpu"]))
138 else builtins.concatMap pluginBuildInputs enabledPlugins;
140 inherit configureFlags buildInputs;