1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/tools/system/collectd/default.nix

59 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, fetchpatch, darwin, callPackage
, autoreconfHook
, pkgconfig
, libtool
, ...
}@args:
let
plugins = callPackage ./plugins.nix args;
in
2013-08-30 10:58:02 +01:00
stdenv.mkDerivation rec {
2018-11-20 12:41:19 +00:00
version = "5.8.1";
pname = "collectd";
2013-08-30 10:58:02 +01:00
src = fetchurl {
url = "https://collectd.org/files/${pname}-${version}.tar.bz2";
2018-11-20 12:41:19 +00:00
sha256 = "1njk8hh56gb755xafsh7ahmqr9k2d4lam4ddj7s7fqz0gjigv5p7";
2013-08-30 10:58:02 +01:00
};
patches = [
(fetchpatch {
url = "https://github.com/rpv-tomsk/collectd/commit/d5a3c020d33cc33ee8049f54c7b4dffcd123bf83.patch";
sha256 = "1n65zw4d2k2bxapayaaw51ym7hy72a0cwi2abd8jgxcw3d0m5g15";
})
];
2017-10-22 16:23:32 +01:00
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [
libtool
] ++ stdenv.lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.ApplicationServices
] ++ plugins.buildInputs;
configureFlags = [
"--localstatedir=/var"
"--disable-werror"
] ++ plugins.configureFlags;
# 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
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Daemon which collects system performance statistics periodically";
2017-06-20 00:56:37 +01:00
homepage = https://collectd.org;
license = licenses.gpl2;
platforms = platforms.unix;
2016-09-24 05:12:16 +01:00
maintainers = with maintainers; [ bjornfor fpletz ];
2013-08-30 10:58:02 +01:00
};
}