2018-03-03 17:33:48 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch, darwin
|
2018-12-21 12:39:23 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, pkgconfig
|
|
|
|
, curl
|
|
|
|
, iptables
|
|
|
|
, jdk
|
|
|
|
, libapparmor
|
|
|
|
, libatasmart
|
|
|
|
, libcap_ng
|
|
|
|
, libcredis
|
|
|
|
, libdbi
|
|
|
|
, libgcrypt
|
|
|
|
, libmemcached, cyrus_sasl
|
|
|
|
, libmicrohttpd
|
|
|
|
, libmodbus
|
2019-05-22 11:03:39 +00:00
|
|
|
, libnotify, gdk-pixbuf
|
2018-12-21 12:39:23 +00:00
|
|
|
, liboping
|
|
|
|
, libpcap
|
|
|
|
, libsigrok
|
|
|
|
, libvirt
|
|
|
|
, libxml2
|
|
|
|
, libtool
|
|
|
|
, lm_sensors
|
|
|
|
, lvm2
|
|
|
|
, mysql
|
|
|
|
, numactl
|
|
|
|
, postgresql
|
|
|
|
, protobufc
|
|
|
|
, python
|
|
|
|
, rabbitmq-c
|
|
|
|
, riemann_c_client
|
|
|
|
, rrdtool
|
|
|
|
, udev
|
|
|
|
, varnish
|
|
|
|
, yajl
|
|
|
|
, net_snmp
|
|
|
|
, hiredis
|
|
|
|
, libmnl
|
|
|
|
, mosquitto
|
|
|
|
, rdkafka
|
|
|
|
, mongoc
|
2014-06-15 08:51:43 +00:00
|
|
|
}:
|
2013-08-30 09:58:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-11-20 12:41:19 +00:00
|
|
|
version = "5.8.1";
|
2016-03-18 03:25:27 +00:00
|
|
|
name = "collectd-${version}";
|
2014-06-19 04:19:00 +00:00
|
|
|
|
2013-08-30 09:58:02 +00:00
|
|
|
src = fetchurl {
|
2018-06-28 18:43:35 +00:00
|
|
|
url = "https://collectd.org/files/${name}.tar.bz2";
|
2018-11-20 12:41:19 +00:00
|
|
|
sha256 = "1njk8hh56gb755xafsh7ahmqr9k2d4lam4ddj7s7fqz0gjigv5p7";
|
2013-08-30 09:58:02 +00:00
|
|
|
};
|
|
|
|
|
2018-12-21 12:39:23 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/rpv-tomsk/collectd/commit/d5a3c020d33cc33ee8049f54c7b4dffcd123bf83.patch";
|
|
|
|
sha256 = "1n65zw4d2k2bxapayaaw51ym7hy72a0cwi2abd8jgxcw3d0m5g15";
|
|
|
|
})
|
|
|
|
];
|
2017-10-22 15:23:32 +00:00
|
|
|
|
2018-12-21 12:39:23 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
2014-06-15 08:51:43 +00:00
|
|
|
buildInputs = [
|
2017-10-02 00:22:12 +00:00
|
|
|
curl libdbi libgcrypt libmemcached
|
2019-05-22 11:03:39 +00:00
|
|
|
cyrus_sasl libnotify gdk-pixbuf liboping libpcap libvirt
|
2017-12-27 15:15:33 +00:00
|
|
|
libxml2 postgresql protobufc rrdtool
|
2017-09-28 20:05:07 +00:00
|
|
|
varnish yajl jdk libtool python hiredis libmicrohttpd
|
2017-12-20 22:37:37 +00:00
|
|
|
riemann_c_client mosquitto rdkafka mongoc
|
2017-12-30 16:04:54 +00:00
|
|
|
] ++ stdenv.lib.optionals (mysql != null) [ mysql.connector-c
|
2017-09-28 20:05:07 +00:00
|
|
|
] ++ stdenv.lib.optionals stdenv.isLinux [
|
|
|
|
iptables libatasmart libcredis libmodbus libsigrok
|
|
|
|
lm_sensors lvm2 rabbitmq-c udev net_snmp libmnl
|
2018-12-21 12:43:10 +00:00
|
|
|
# those might be no longer required when https://github.com/NixOS/nixpkgs/pull/51767
|
|
|
|
# is merged
|
2018-12-21 12:39:23 +00:00
|
|
|
libapparmor numactl libcap_ng
|
2017-09-28 20:05:07 +00:00
|
|
|
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.IOKit
|
|
|
|
darwin.apple_sdk.frameworks.ApplicationServices
|
2016-09-25 17:52:55 +00:00
|
|
|
];
|
|
|
|
|
2018-12-21 12:39:23 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--disable-werror"
|
|
|
|
];
|
2014-06-15 08:51:43 +00:00
|
|
|
|
2017-06-30 20:10:08 +00:00
|
|
|
# do not create directories in /var during installPhase
|
|
|
|
postConfigure = ''
|
|
|
|
substituteInPlace Makefile --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/' '#'
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
if [ -d $out/share/collectd/java ]; then
|
|
|
|
mv $out/share/collectd/java $out/share/
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
2017-12-20 22:37:37 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-07-14 18:16:21 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Daemon which collects system performance statistics periodically";
|
2017-06-19 23:56:37 +00:00
|
|
|
homepage = https://collectd.org;
|
2014-07-14 18:16:21 +00:00
|
|
|
license = licenses.gpl2;
|
2017-09-28 20:05:07 +00:00
|
|
|
platforms = platforms.unix;
|
2016-09-24 04:12:16 +00:00
|
|
|
maintainers = with maintainers; [ bjornfor fpletz ];
|
2013-08-30 09:58:02 +00:00
|
|
|
};
|
|
|
|
}
|