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