netdata: allow execution without a config file

This commit is contained in:
Kranium Gikos Mendoza 2016-10-25 22:23:19 +08:00
parent 237c15d883
commit 8ce23cfec2

View File

@ -16,11 +16,19 @@ stdenv.mkDerivation rec{
# Allow UI to load when running as non-root # Allow UI to load when running as non-root
patches = [ ./web_access.patch ]; patches = [ ./web_access.patch ];
preConfigure = '' # Build will fail trying to create /var/{cache,lib,log}/netdata without this
export ZLIB_CFLAGS=" " postPatch = ''
export ZLIB_LIBS="-lz" sed -i '/dist_.*_DATA = \.keep/d' src/Makefile.am
export UUID_CFLAGS=" " '';
export UUID_LIBS="-luuid"
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; { meta = with stdenv.lib; {