2019-03-07 22:01:48 +01:00
|
|
|
{ stdenv, fetchurl, autoreconfHook, pkgconfig, zlib, libuuid, libossp_uuid, CoreFoundation, IOKit, lm_sensors }:
|
2016-04-14 23:43:01 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec{
|
2018-12-15 11:52:27 +01:00
|
|
|
version = "1.11.1";
|
2016-04-14 23:43:01 +02:00
|
|
|
name = "netdata-${version}";
|
|
|
|
|
2018-11-14 17:01:41 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/netdata/netdata/releases/download/v${version}/netdata-v${version}.tar.gz";
|
2018-12-15 11:52:27 +01:00
|
|
|
sha256 = "0djph4586cc14vavj6za6k255lscf3b415dx8k45q3nsc2hb4l01";
|
2016-04-14 23:43:01 +02:00
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
2018-11-14 17:01:41 +01:00
|
|
|
buildInputs = [ zlib ]
|
|
|
|
++ (if stdenv.isDarwin then [ libossp_uuid CoreFoundation IOKit ] else [ libuuid ]);
|
2016-04-14 23:43:01 +02:00
|
|
|
|
2018-10-12 10:53:36 +02:00
|
|
|
patches = [
|
|
|
|
./no-files-in-etc-and-var.patch
|
|
|
|
];
|
2016-10-25 16:23:19 +02:00
|
|
|
|
2018-10-12 10:57:45 +02:00
|
|
|
postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
|
|
|
# rename this plugin so netdata will look for setuid wrapper
|
|
|
|
mv $out/libexec/netdata/plugins.d/apps.plugin \
|
|
|
|
$out/libexec/netdata/plugins.d/apps.plugin.org
|
|
|
|
'';
|
|
|
|
|
2019-03-07 22:01:48 +01:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace collectors/python.d.plugin/python_modules/third_party/lm_sensors.py \
|
|
|
|
--replace 'ctypes.util.find_library("sensors")' '"${lm_sensors.out}/lib/libsensors${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
|
|
|
'';
|
|
|
|
|
2016-10-25 16:23:19 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
2018-10-12 10:53:36 +02:00
|
|
|
"--sysconfdir=/etc"
|
2016-10-25 16:23:19 +02:00
|
|
|
];
|
|
|
|
|
2018-11-14 17:01:41 +01:00
|
|
|
postFixup = ''
|
|
|
|
rm -r $out/sbin
|
2016-10-14 12:05:42 +02:00
|
|
|
'';
|
2016-04-17 11:15:59 +02:00
|
|
|
|
2016-04-14 23:43:01 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Real-time performance monitoring tool";
|
2018-11-14 17:01:41 +01:00
|
|
|
homepage = https://my-netdata.io/;
|
2016-04-14 23:43:01 +02:00
|
|
|
license = licenses.gpl3;
|
2018-11-14 17:01:41 +01:00
|
|
|
platforms = platforms.unix;
|
2016-04-14 23:43:01 +02:00
|
|
|
maintainers = [ maintainers.lethalman ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|