From 0e1066e8e431a3756825cceb94381a0ba05c1a43 Mon Sep 17 00:00:00 2001 From: Kranium Gikos Mendoza Date: Tue, 25 Oct 2016 22:23:19 +0800 Subject: [PATCH] netdata: allow execution without a config file --- pkgs/tools/system/netdata/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index 28ec7f1be4273f..bd40ceac377620 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -15,6 +15,21 @@ stdenv.mkDerivation rec{ 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 + ''; + meta = with stdenv.lib; { description = "Real-time performance monitoring tool"; homepage = http://netdata.firehol.org;