Change:
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

Discussion:
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 ?