2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, darwin, callPackage
|
2018-12-21 13:39:23 +01:00
|
|
|
, autoreconfHook
|
2021-01-17 10:17:16 +01:00
|
|
|
, pkg-config
|
2018-12-21 13:39:23 +01:00
|
|
|
, libtool
|
2019-10-20 00:35:55 +02:00
|
|
|
, ...
|
|
|
|
}@args:
|
|
|
|
let
|
|
|
|
plugins = callPackage ./plugins.nix args;
|
|
|
|
in
|
2013-08-30 11:58:02 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2020-09-07 18:12:19 +02:00
|
|
|
version = "5.12.0";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "collectd";
|
2014-06-19 06:19:00 +02:00
|
|
|
|
2013-08-30 11:58:02 +02:00
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://collectd.org/files/${pname}-${version}.tar.bz2";
|
2020-09-07 18:12:19 +02:00
|
|
|
sha256 = "1mh97afgq6qgmpvpr84zngh58m0sl1b4wimqgvvk376188q09bjv";
|
2013-08-30 11:58:02 +02:00
|
|
|
};
|
|
|
|
|
2021-01-17 10:17:16 +01:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
2014-06-15 10:51:43 +02:00
|
|
|
buildInputs = [
|
2019-10-20 00:35:55 +02:00
|
|
|
libtool
|
2021-01-15 10:19:50 +01:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2017-09-28 22:05:07 +02:00
|
|
|
darwin.apple_sdk.frameworks.ApplicationServices
|
2019-10-20 00:35:55 +02:00
|
|
|
] ++ plugins.buildInputs;
|
2016-09-25 19:52:55 +02:00
|
|
|
|
2018-12-21 13:39:23 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--disable-werror"
|
2019-10-20 00:35:55 +02:00
|
|
|
] ++ plugins.configureFlags;
|
2014-06-15 10:51:43 +02:00
|
|
|
|
2017-06-30 22:10:08 +02: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 23:37:37 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2014-07-14 20:16:21 +02:00
|
|
|
description = "Daemon which collects system performance statistics periodically";
|
2020-03-10 15:58:43 +01:00
|
|
|
homepage = "https://collectd.org";
|
2014-07-14 20:16:21 +02:00
|
|
|
license = licenses.gpl2;
|
2017-09-28 22:05:07 +02:00
|
|
|
platforms = platforms.unix;
|
2016-09-24 06:12:16 +02:00
|
|
|
maintainers = with maintainers; [ bjornfor fpletz ];
|
2013-08-30 11:58:02 +02:00
|
|
|
};
|
|
|
|
}
|