2019-10-20 00:35:55 +02:00
|
|
|
{ stdenv, fetchurl, fetchpatch, darwin, callPackage
|
2018-12-21 13:39:23 +01:00
|
|
|
, autoreconfHook
|
|
|
|
, pkgconfig
|
|
|
|
, 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-04-05 13:40:55 +02:00
|
|
|
version = "5.11.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-04-05 13:40:55 +02:00
|
|
|
sha256 = "1cjxksxdqcqdccz1nbnc2fp6yy84qq361ynaq5q8bailds00mc9p";
|
2013-08-30 11:58:02 +02:00
|
|
|
};
|
|
|
|
|
2018-12-21 13:39:23 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
2014-06-15 10:51:43 +02:00
|
|
|
buildInputs = [
|
2019-10-20 00:35:55 +02:00
|
|
|
libtool
|
2017-09-28 22:05:07 +02:00
|
|
|
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
|
|
|
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;
|
|
|
|
|
2014-07-14 20:16:21 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|