1 { lib, stdenv, fetchurl, fetchpatch, darwin, callPackage
9 plugins = callPackage ./plugins.nix args;
11 stdenv.mkDerivation rec {
16 url = "https://collectd.org/files/${pname}-${version}.tar.bz2";
17 sha256 = "1mh97afgq6qgmpvpr84zngh58m0sl1b4wimqgvvk376188q09bjv";
21 # fix -t never printing syntax errors
22 # should be included in next release
24 url = "https://github.com/collectd/collectd/commit/3f575419e7ccb37a3b10ecc82adb2e83ff2826e1.patch";
25 sha256 = "0jwjdlfl0dp7mlbwygp6h0rsbaqfbgfm5z07lr5l26z6hhng2h2y";
28 name = "no_include_longintrepr.patch";
29 url = "https://github.com/collectd/collectd/commit/623e95394e0e62e7f9ced2104b786d21e9c0bf53.patch";
30 hash = "sha256-0eD7yNW3TWVyNMpLsADhYFDvy6COoCaI0kS1XJrwDgM=";
34 nativeBuildInputs = [ pkg-config autoreconfHook ];
37 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
38 darwin.apple_sdk.frameworks.ApplicationServices
39 ] ++ plugins.buildInputs;
42 "--localstatedir=/var"
44 ] ++ plugins.configureFlags
45 ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "--with-fp-layout=nothing" ];
47 # do not create directories in /var during installPhase
49 substituteInPlace Makefile --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/' '#'
53 if [ -d $out/share/collectd/java ]; then
54 mv $out/share/collectd/java $out/share/
58 enableParallelBuilding = true;
61 inherit (nixosTests) collectd;
65 description = "Daemon which collects system performance statistics periodically";
66 homepage = "https://collectd.org";
67 license = licenses.gpl2Plus;
68 platforms = platforms.unix;
69 maintainers = with maintainers; [ bjornfor ];