From bd170cbef6c93943bed37719d2d8539661f8c977 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 4 Jul 2019 13:08:11 +0300 Subject: [PATCH] netdata: add debug option --- pkgs/tools/system/netdata/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index 5018ede8f53..a749595b415 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -6,6 +6,7 @@ , withIpmi ? (!stdenv.isDarwin), freeipmi , withNetfilter ? (!stdenv.isDarwin), libmnl, libnetfilter_acct , withSsl ? true, openssl +, withDebug ? false }: with stdenv.lib; @@ -33,6 +34,8 @@ stdenv.mkDerivation rec { ./no-files-in-etc-and-var.patch ]; + NIX_CFLAGS_COMPILE = optional withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1"; + postInstall = optionalString (!stdenv.isDarwin) '' # rename this plugin so netdata will look for setuid wrapper mv $out/libexec/netdata/plugins.d/apps.plugin \