Merge pull request #218980 from wmertens/netdata-go-plugin

netdata-go-d-plugin: 0.50.0 -> 0.51.2 + expose
This commit is contained in:
Wout Mertens 2023-03-05 21:11:10 +01:00 committed by GitHub
commit 0fc5cb5c8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 12 deletions

View file

@ -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 \

View file

@ -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;

View file

@ -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;