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