Change:
Steps to reproduce the behavior: netdata Add any other context about the problem here. <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. --Please run and paste the result. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
Created a PR to fix the build, can you try it out ?

Discussion:
<del> { lib, stdenv, fetchFromGitHub, cmake, pkg-config, makeWrapper , CoreFoundation, IOKit, libossp_uuid , nixosTests , bash, curl, jemalloc, json_c, libuv, zlib, libyaml, libelf, libbpf , libcap, libuuid, lm_sensors, protobuf , go, buildGoModule, ninja , withCups ? false, cups , withDBengine ? true, lz4 , withIpmi ? (!stdenv.isDarwin), freeipmi , withNetfilter ? (!stdenv.isDarwin), libmnl, libnetfilter_acct , withCloud ? false , withCloudUi ? false , withConnPubSub ? false, google-cloud-cpp, grpc , withConnPrometheus ? false, snappy , withSsl ? true, openssl , withSystemdJournal ? (!stdenv.isDarwin), systemd , withDebug ? false , withEbpf ? false , withNetworkViewer ? (!stdenv.isDarwin) </del> <ins> { lib, stdenv, fetchFromGitHub, bash, buildGoModule, cmake, cups, curl, darwin, freeipmi, go, google-cloud-cpp, grpc, jemalloc, json_c, libbpf, libcap, libelf, libmnl, libnetfilter_acct, libossp_uuid, libuuid, libuv, libyaml, lm_sensors, lz4, makeWrapper, ninja, nixosTests, openssl, overrideSDK, pkg-config, protobuf, snappy, systemd, withCloud ? false, withCloudUi ? false, withConnPrometheus ? false, withConnPubSub ? false, withCups ? false, withDBengine ? true, withDebug ? false, withEbpf ? false, withIpmi ? (stdenv.isLinux), withNetfilter ? (stdenv.isLinux), withNetworkViewer ? (stdenv.isLinux), withSsl ? true, withSystemdJournal ? (stdenv.isLinux), zlib, </ins> }: <del> stdenv.mkDerivation rec { version = "1.47.0"; </del> <ins> let stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; in stdenv'.mkDerivation (finalAttrs: { version = "1.47.1"; </ins> pname = "netdata"; src = fetchFromGitHub { owner = "netdata"; repo = "netdata"; <del> rev = "v${version}"; hash = if withCloudUi then "sha256-eMapy4HQaEblDfZt2uVSfBWRlkstX7TxZDBgSv5bW/I=" </del> <ins> rev = "v${finalAttrs.version}"; hash = if withCloudUi then "sha256-/iXmIjWpZ0s/LELZM7rYYQ9cjLNdfdisyOvDyLddSY4=" </ins> # we delete the v2 GUI after fetching <del> else "sha256-Gx7u3Owh/fVAnSw91xfdcmyx4m+bvQAvDaUxzXQ36/0="; </del> <ins> else "sha256-pAqxxsWYgqbmF6wFBfTCYYc3x/Ufyz2Xs4bwB1ToHjo="; </ins> fetchSubmodules = true; # Remove v2 dashboard distributed under NCUL1. Make sure an empty

strictDeps = true; <del> nativeBuildInputs = [ cmake pkg-config makeWrapper go ninja ] ++ lib.optionals withCups [ cups.dev ]; </del> <ins> nativeBuildInputs = [ cmake pkg-config makeWrapper go ninja ] ++ lib.optionals withCups [ cups.dev ]; </ins> # bash is only used to rewrite shebangs <del> buildInputs = [ bash curl jemalloc json_c libuv zlib libyaml lm_sensors ] ++ lib.optionals stdenv.isDarwin [ CoreFoundation IOKit libossp_uuid ] ++ lib.optionals (!stdenv.isDarwin) [ libcap libuuid ] </del> <ins> buildInputs = [ bash curl jemalloc json_c libuv zlib libyaml ] ++ lib.optionals stdenv.isDarwin ( with darwin.apple_sdk.frameworks; [ CoreFoundation IOKit libossp_uuid ] ) ++ lib.optionals (stdenv.isLinux) [ libcap libuuid lm_sensors ] </ins> ++ lib.optionals withCups [ cups ] ++ lib.optionals withDBengine [ lz4 ] ++ lib.optionals withIpmi [ freeipmi ] <del> ++ lib.optionals withNetfilter [ libmnl libnetfilter_acct ] ++ lib.optionals withConnPubSub [ google-cloud-cpp grpc ] </del> <ins> ++ lib.optionals withNetfilter [ libmnl libnetfilter_acct ] ++ lib.optionals withConnPubSub [ google-cloud-cpp grpc ] </ins> ++ lib.optionals withConnPrometheus [ snappy ] <del> ++ lib.optionals withEbpf [ libelf libbpf ] </del> <ins> ++ lib.optionals withEbpf [ libelf libbpf ] </ins> ++ lib.optionals (withCloud || withConnPrometheus) [ protobuf ] ++ lib.optionals withSystemdJournal [ systemd ] ++ lib.optionals withSsl [ openssl ];

donStrip = withDebug; env.NIX_CFLAGS_COMPILE = lib.optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1"; <del> postInstall = '' # Relocate one folder above. mv $out/usr/* $out/ '' + lib.optionalString (!stdenv.isDarwin) '' # rename this plugin so netdata will look for setuid wrapper mv $out/libexec/netdata/plugins.d/apps.plugin  $out/libexec/netdata/plugins.d/apps.plugin.org mv $out/libexec/netdata/plugins.d/cgroup-network  $out/libexec/netdata/plugins.d/cgroup-network.org mv $out/libexec/netdata/plugins.d/perf.plugin  $out/libexec/netdata/plugins.d/perf.plugin.org mv $out/libexec/netdata/plugins.d/slabinfo.plugin  $out/libexec/netdata/plugins.d/slabinfo.plugin.org mv $out/libexec/netdata/plugins.d/debugfs.plugin  $out/libexec/netdata/plugins.d/debugfs.plugin.org ${lib.optionalString withSystemdJournal '' mv $out/libexec/netdata/plugins.d/systemd-journal.plugin  $out/libexec/netdata/plugins.d/systemd-journal.plugin.org ''} ${lib.optionalString withIpmi '' mv $out/libexec/netdata/plugins.d/freeipmi.plugin  $out/libexec/netdata/plugins.d/freeipmi.plugin.org ''} ${lib.optionalString withNetworkViewer '' mv $out/libexec/netdata/plugins.d/network-viewer.plugin  $out/libexec/netdata/plugins.d/network-viewer.plugin.org ''} ${lib.optionalString (!withCloudUi) '' rm -rf $out/share/netdata/web/index.html cp $out/share/netdata/web/v1/index.html $out/share/netdata/web/index.html ''} ''; </del> <ins> postInstall = '' # Relocate one folder above. mv $out/usr/* $out/ '' + lib.optionalString (stdenv.isLinux) '' # rename this plugin so netdata will look for setuid wrapper mv $out/libexec/netdata/plugins.d/apps.plugin  $out/libexec/netdata/plugins.d/apps.plugin.org mv $out/libexec/netdata/plugins.d/cgroup-network  $out/libexec/netdata/plugins.d/cgroup-network.org mv $out/libexec/netdata/plugins.d/perf.plugin  $out/libexec/netdata/plugins.d/perf.plugin.org mv $out/libexec/netdata/plugins.d/slabinfo.plugin  $out/libexec/netdata/plugins.d/slabinfo.plugin.org mv $out/libexec/netdata/plugins.d/debugfs.plugin  $out/libexec/netdata/plugins.d/debugfs.plugin.org ${lib.optionalString withSystemdJournal '' mv $out/libexec/netdata/plugins.d/systemd-journal.plugin  $out/libexec/netdata/plugins.d/systemd-journal.plugin.org ''} ${lib.optionalString withIpmi '' mv $out/libexec/netdata/plugins.d/freeipmi.plugin  $out/libexec/netdata/plugins.d/freeipmi.plugin.org ''} ${lib.optionalString withNetworkViewer '' mv $out/libexec/netdata/plugins.d/network-viewer.plugin  $out/libexec/netdata/plugins.d/network-viewer.plugin.org ''} ${lib.optionalString (!withCloudUi) '' rm -rf $out/share/netdata/web/index.html cp $out/share/netdata/web/v1/index.html $out/share/netdata/web/index.html ''} ''; </ins> <del> preConfigure = lib.optionalString (!stdenv.isDarwin) '' </del> <ins> preConfigure = '' </ins> export GOCACHE=$TMPDIR/go-cache export GOPATH=$TMPDIR/go export GOSUMDB=off

substituteInPlace packaging/cmake/Modules/NetdataGoTools.cmake  --replace-fail  'GOPROXY=https://proxy.golang.org'  <del> 'GOPROXY=file://${passthru.netdata-go-modules}' </del> <ins> 'GOPROXY=file://${finalAttrs.passthru.netdata-go-modules}' </ins> # Prevent the path to be caught into the Nix store path. substituteInPlace CMakeLists.txt 

enableParallelBuild = true; passthru = rec { <del> netdata-go-modules = (buildGoModule { pname = "netdata-go-plugins"; inherit version src; </del> <ins> netdata-go-modules = (buildGoModule { pname = "netdata-go-plugins"; inherit (finalAttrs) version src; </ins> <del> sourceRoot = "${src.name}/src/go/plugin/go.d"; </del> <ins> sourceRoot = "${finalAttrs.src.name}/src/go/plugin/go.d"; </ins> <del> vendorHash = "sha256-NZ1tg+lvXNgypqmjjb5f7dHH6DIA9VOa4PMM4eq11n0="; doCheck = false; proxyVendor = true; </del> <ins> vendorHash = "sha256-NZ1tg+lvXNgypqmjjb5f7dHH6DIA9VOa4PMM4eq11n0="; doCheck = false; proxyVendor = true; </ins> <del> ldflags = [ "-s" "-w" "-X main.version=${version}" ]; </del> <ins> ldflags = [ "-s" "-w" "-X main.version=${finalAttrs.version}" ]; </ins> <del> passthru.tests = tests; meta = meta // { description = "Netdata orchestrator for data collection modules written in Go"; mainProgram = "godplugin"; license = lib.licenses.gpl3Only; }; }).goModules; </del> <ins> passthru.tests = tests; meta = finalAttrs.meta // { description = "Netdata orchestrator for data collection modules written in Go"; mainProgram = "godplugin"; license = lib.licenses.gpl3Only; }; }).goModules; </ins> inherit withIpmi withNetworkViewer; tests.netdata = nixosTests.netdata; }; meta = with lib; { <del> broken = stdenv.isDarwin || stdenv.buildPlatform != stdenv.hostPlatform || withEbpf; </del> <ins> broken = stdenv.buildPlatform != stdenv.hostPlatform || withEbpf; </ins> description = "Real-time performance monitoring tool"; homepage = "https://www.netdata.cloud/"; changelog = "https://github.com/netdata/netdata/releases/tag/v${version}"; <del> license = [ licenses.gpl3Plus ] ++ lib.optionals (withCloudUi) [ licenses.ncul1 ]; </del> <ins> license = [ licenses.gpl3Plus ] ++ lib.optionals (withCloudUi) [ licenses.ncul1 ]; </ins> platforms = platforms.unix; maintainers = [ ]; }; <del> } </del> <ins> }) </ins>

nerdctl = callPackage ../applications/networking/cluster/nerdctl { }; netdata = callPackage ../tools/system/netdata { <del> inherit (darwin.apple_sdk.frameworks) CoreFoundation IOKit; </del> protobuf = protobuf_21; }; netdataCloud = netdata.override {