From 2b7a01a6ea32740777ebd6396bffb369fe618d0b Mon Sep 17 00:00:00 2001 From: Yurii Izorkin Date: Tue, 12 Jul 2022 16:00:48 +0300 Subject: [PATCH] netdata: update build options, build with jemalloc (#179848) --- pkgs/tools/system/netdata/default.nix | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index 7db1472431e5..0d5b7e23c121 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -1,12 +1,15 @@ { lib, stdenv, callPackage, fetchFromGitHub, autoreconfHook, pkg-config, makeWrapper , CoreFoundation, IOKit, libossp_uuid , nixosTests -, curl, libcap, libuuid, lm_sensors, zlib, protobuf +, curl, jemalloc, libuv, zlib +, libcap, libuuid, lm_sensors, protobuf , withCups ? false, cups -, withDBengine ? true, libuv, lz4, judy +, withDBengine ? true, judy, lz4 , withIpmi ? (!stdenv.isDarwin), freeipmi , withNetfilter ? (!stdenv.isDarwin), libmnl, libnetfilter_acct , withCloud ? (!stdenv.isDarwin), json_c +, withConnPubSub ? false, google-cloud-cpp, grpc +, withConnPrometheus ? false, snappy , withSsl ? true, openssl , withDebug ? false }: @@ -30,14 +33,17 @@ in stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper protobuf ]; - buildInputs = [ curl.dev zlib.dev protobuf ] + buildInputs = [ curl.dev jemalloc libuv zlib.dev ] ++ optionals stdenv.isDarwin [ CoreFoundation IOKit libossp_uuid ] ++ optionals (!stdenv.isDarwin) [ libcap.dev libuuid.dev ] ++ optionals withCups [ cups ] - ++ optionals withDBengine [ libuv lz4.dev judy ] + ++ optionals withDBengine [ judy lz4.dev ] ++ optionals withIpmi [ freeipmi ] ++ optionals withNetfilter [ libmnl libnetfilter_acct ] ++ optionals withCloud [ json_c ] + ++ optionals withConnPubSub [ google-cloud-cpp grpc ] + ++ optionals withConnPrometheus [ snappy ] + ++ optionals (withCloud || withConnPrometheus) [ protobuf ] ++ optionals withSsl [ openssl.dev ]; patches = [ @@ -92,9 +98,11 @@ in stdenv.mkDerivation rec { "--localstatedir=/var" "--sysconfdir=/etc" "--disable-ebpf" - ] ++ optionals withCloud [ - "--enable-cloud" - "--with-aclk-ng" + "--with-jemalloc=${jemalloc}" + ] ++ optional (!withDBengine) [ + "--disable-dbengine" + ] ++ optional (!withCloud) [ + "--disable-cloud" ]; postFixup = ''