46 # Defaults to `null` for all supported plugins (except xen, which is marked as
47 # insecure), otherwise a list of plugin names for a custom build
48 enabledPlugins ? null,
53 # Plugins that have dependencies.
54 # Please help to extend these!
58 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ rabbitmq-c ];
59 apache.buildInputs = [ curl ];
60 ascent.buildInputs = [
64 battery.buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
71 ceph.buildInputs = [ yajl ];
72 curl.buildInputs = [ curl ];
73 curl_json.buildInputs = [
77 curl_xml.buildInputs = [
81 dbi.buildInputs = [ libdbi ];
83 lib.optionals stdenv.hostPlatform.isLinux [
86 ++ lib.optionals stdenv.hostPlatform.isDarwin [
89 dns.buildInputs = [ libpcap ];
90 ipmi.buildInputs = [ openipmi ];
91 iptables.buildInputs =
95 ++ lib.optionals stdenv.hostPlatform.isLinux [
104 log_logstash.buildInputs = [ yajl ];
105 lua.buildInputs = [ lua ];
106 memcachec.buildInputs = [
110 modbus.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libmodbus ];
111 mqtt.buildInputs = [ mosquitto ];
112 mysql.buildInputs = lib.optionals (libmysqlclient != null) [
115 netlink.buildInputs =
119 ++ lib.optionals stdenv.hostPlatform.isLinux [
122 network.buildInputs = [ libgcrypt ];
123 nginx.buildInputs = [ curl ];
124 notify_desktop.buildInputs = [
128 notify_email.buildInputs = [ libesmtp ];
129 openldap.buildInputs = [ openldap ];
130 ovs_events.buildInputs = [ yajl ];
131 ovs_stats.buildInputs = [ yajl ];
132 perl.buildInputs = [ perl ];
133 pinba.buildInputs = [ protobufc ];
134 ping.buildInputs = [ liboping ];
135 postgresql.buildInputs = [ postgresql ];
136 python.buildInputs = [ python3 ];
137 redis.buildInputs = [ hiredis ];
138 rrdcached.buildInputs = [
142 rrdtool.buildInputs = [
146 sensors.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ lm_sensors ];
147 sigrok.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
151 smart.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
155 snmp.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ net-snmp ];
156 snmp_agent.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ net-snmp ];
157 varnish.buildInputs = [
167 ++ lib.optionals stdenv.hostPlatform.isLinux [
171 write_http.buildInputs = [
175 write_kafka.buildInputs = [
179 write_log.buildInputs = [ yajl ];
180 write_mongodb.buildInputs = [ mongoc ];
181 write_prometheus.buildInputs = [
185 write_redis.buildInputs = [ hiredis ];
186 write_riemann.buildInputs = [
190 xencpu.buildInputs = [ xen ];
193 configureFlags = lib.optionals (enabledPlugins != null) (
194 [ "--disable-all-plugins" ] ++ (map (plugin: "--enable-${plugin}") enabledPlugins)
200 plugins ? ${plugin} && plugins.${plugin} ? buildInputs
201 ) plugins.${plugin}.buildInputs;
204 if enabledPlugins == null then
205 builtins.concatMap pluginBuildInputs (
206 builtins.attrNames (builtins.removeAttrs plugins [ "xencpu" ])
209 builtins.concatMap pluginBuildInputs enabledPlugins;
212 inherit configureFlags buildInputs;