forked from mirrors/nixpkgs
0254ae4e80
The web_access.patch would no longer apply. It disabled a check that required the static files for the web UI to be owned by the user the daemon runs as (not root, so it doesn't work well with nix). Besides updating netdata, this commit removes that patch, changes the netdata service config to set the "web files owner/group" option to "root" and adds a test that checks that the web UI is being served. This allows the web files to be owned by root without patching.
41 lines
1 KiB
Nix
41 lines
1 KiB
Nix
{ stdenv, fetchFromGitHub, autoreconfHook, zlib, pkgconfig, libuuid }:
|
|
|
|
stdenv.mkDerivation rec{
|
|
version = "1.10.0";
|
|
name = "netdata-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
rev = "v${version}";
|
|
owner = "firehol";
|
|
repo = "netdata";
|
|
sha256 = "02spfisabjkkgd9fairldlf84n83vbv2xafg0g5jrpfa972pjl9r";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
|
buildInputs = [ zlib libuuid ];
|
|
|
|
# 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
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Real-time performance monitoring tool";
|
|
homepage = http://netdata.firehol.org;
|
|
license = licenses.gpl3;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.lethalman ];
|
|
};
|
|
|
|
}
|