diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index d5612331e829..321b5ab84fa6 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, callPackage, fetchFromGitHub, autoreconfHook, pkg-config, makeWrapper , CoreFoundation, IOKit, libossp_uuid , nixosTests -, curl, jemalloc, libuv, zlib +, netdata-go-d-plugin +, bash, curl, jemalloc, libuv, zlib , libcap, libuuid, lm_sensors, protobuf , withCups ? false, cups , withDBengine ? true, lz4 @@ -14,9 +15,7 @@ , withDebug ? false }: -let - go-d-plugin = callPackage ./go.d.plugin.nix {}; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { # Don't forget to update go.d.plugin.nix as well version = "1.38.1"; pname = "netdata"; @@ -32,7 +31,8 @@ in stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper protobuf ]; - buildInputs = [ curl jemalloc libuv zlib ] + # bash is only used to rewrite shebangs + buildInputs = [ bash curl jemalloc libuv zlib ] ++ lib.optionals stdenv.isDarwin [ CoreFoundation IOKit libossp_uuid ] ++ lib.optionals (!stdenv.isDarwin) [ libcap libuuid ] ++ lib.optionals withCups [ cups ] @@ -65,13 +65,14 @@ in stdenv.mkDerivation rec { # to bootstrap tools: # https://github.com/NixOS/nixpkgs/pull/175719 # We pick zlib.dev as a simple canary package with pkg-config input. - disallowedReferences = [ zlib.dev ]; + disallowedReferences = if withDebug then [] else [ zlib.dev ]; + donStrip = withDebug; env.NIX_CFLAGS_COMPILE = lib.optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1"; postInstall = '' - ln -s ${go-d-plugin}/lib/netdata/conf.d/* $out/lib/netdata/conf.d - ln -s ${go-d-plugin}/bin/godplugin $out/libexec/netdata/plugins.d/go.d.plugin + ln -s ${netdata-go-d-plugin}/lib/netdata/conf.d/* $out/lib/netdata/conf.d + ln -s ${netdata-go-d-plugin}/bin/godplugin $out/libexec/netdata/plugins.d/go.d.plugin '' + lib.optionalString (!stdenv.isDarwin) '' # rename this plugin so netdata will look for setuid wrapper mv $out/libexec/netdata/plugins.d/apps.plugin \ diff --git a/pkgs/tools/system/netdata/go.d.plugin.nix b/pkgs/tools/system/netdata/go.d.plugin.nix index 5b45ddbb3ae2..8118a480f3d2 100644 --- a/pkgs/tools/system/netdata/go.d.plugin.nix +++ b/pkgs/tools/system/netdata/go.d.plugin.nix @@ -1,16 +1,16 @@ { lib, fetchFromGitHub, buildGo119Module }: buildGo119Module rec { - pname = "netdata-go.d.plugin"; - version = "0.50.0"; + pname = "netdata-go-plugins"; + version = "0.51.2"; src = fetchFromGitHub { owner = "netdata"; repo = "go.d.plugin"; rev = "v${version}"; - sha256 = "5kDc6zszVuFTDkNMuHBRwrfDnH+AdD6ULzmywtvL8iA="; + sha256 = "sha256-u87kTNM1oAmJRtm/iEESjVvQ9qEpFCGqRT8M+iVEwlI="; }; - vendorSha256 = "sha256-Wv6xqzpQxlZCrVnS+g9t1qiYCkm3NfXfW8XDYA9Txxs="; + vendorSha256 = "sha256-QB+Sf7biNPD8/3y9pFxOJZXtc6BaBcQsUGP7y9Wukwg="; doCheck = false; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 04074f2a09e7..ac0e38c1946e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9292,6 +9292,8 @@ with pkgs; netdata = callPackage ../tools/system/netdata { inherit (darwin.apple_sdk.frameworks) CoreFoundation IOKit; }; + # Exposed here so the bots can auto-upgrade it + netdata-go-plugins = callPackage ../tools/system/netdata/go.d.plugin.nix {}; netsurf = recurseIntoAttrs (callPackage ../applications/networking/browsers/netsurf { }); netsurf-browser = netsurf.browser;