nixpkgs-suyu/pkgs/tools/system/netdata/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2016-10-14 12:05:42 +02:00
{ stdenv, fetchFromGitHub, autoreconfHook, zlib, pkgconfig, libuuid }:
2016-04-14 23:43:01 +02:00
stdenv.mkDerivation rec{
2017-01-23 22:48:09 +01:00
version = "1.5.0";
2016-04-14 23:43:01 +02:00
name = "netdata-${version}";
src = fetchFromGitHub {
rev = "v${version}";
owner = "firehol";
repo = "netdata";
2017-01-23 22:48:09 +01:00
sha256 = "1nsv0s11ai1kvig9xr4cz2f2lalvilpbfjpd8fdfqk9fak690zhz";
2016-04-14 23:43:01 +02:00
};
2016-10-14 12:05:42 +02:00
buildInputs = [ autoreconfHook zlib pkgconfig libuuid ];
2016-04-14 23:43:01 +02:00
# Allow UI to load when running as non-root
patches = [ ./web_access.patch ];
# Build will fail trying to create /var/{cache,lib,log}/netdata without this
postPatch = ''
sed -i '/dist_.*_DATA = \.keep/d' src/Makefile.am
'';
configureFlags = [
"--localstatedir=/var"
];
# App fails on runtime if the default config file is not detected
# The upstream installer does prepare an empty file too
postInstall = ''
touch $out/etc/netdata/netdata.conf
2016-10-14 12:05:42 +02:00
'';
2016-04-14 23:43:01 +02:00
meta = with stdenv.lib; {
description = "Real-time performance monitoring tool";
homepage = http://netdata.firehol.org;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ maintainers.lethalman ];
};
}