Change:
owner = "netdata"; repo = "netdata"; rev = "v${version}"; <del> hash = "sha256-8L8PhPgNIHvw+Dcx2D6OE8fp2+GEYOc9wEIoPJSqXME="; </del> <ins> hash = if withCloudUi then "sha256-8L8PhPgNIHvw+Dcx2D6OE8fp2+GEYOc9wEIoPJSqXME=" else "sha256-J/pKKxTNoSwvsyVaRsnazQQqu2C8zx1QEAkB+gkR5lU="; </ins> fetchSubmodules = true; <ins> # Remove v2 dashboard distributed under NCUL1. Make sure an empty # Makefile.am exists, as autoreconf will get confused otherwise. postFetch = lib.optionalString (!withCloudUi) '' rm -rf $out/web/gui/v2/* touch $out/web/gui/v2/Makefile.am ''; </ins> }; strictDeps = true;

Discussion:
(Apology for the kind label, I'm just unable to find the right one (or the right template) for the licensing issue.) Starting from version 1.41.0, Netdata has started to include their new agent dashboard - the so-called Cloud UI (or sometimes v2) [1]. This, however, is distributed under a different license than the rest of Netdata - the Netdata Cloud UI License v1.0 (NCUL1) [2]. This license restricts the use of the software, allowing it "only to interface with the licensor's other software components". Moreover, the UI itself is distributed in the minified form. This makes this license non-free. Luckily, the license does not restrict the redistribution, so NixOS is probably not in a legal trouble just yet (disclaimer: IANAL). The old versions of dashboard is still distributed with Netdata. To the best of my knowledge, the old version of the dashboard is still distributed under GPL-3+. Users can choose to go to the old (so-called v1) dashboard by going to e.g. http://localhost:/v1/. As a related issue, also since version 1.41.0 Netdata will, by default, download the latest version of the Cloud UI from their server to the browser, falling back to the local copy of the UI distributed with itself if it fails to do so. So, in this case, I believe it's possible for NixOS to remove the new UI from its build. The relevant code will have to be patched so that it redirects the the v1 version of dashboard. I plan to solve this by using 's to remove the source code for the new dashboard, then provide a patch (potentially upstreamable) to disable the build of the directory using a configuration flag. I also plan to build the v1 dashboard from source [3] since it'll help us comply with its GPLv3 license. Is acceptable for making the source derivation free from non-free content? [1] [2] [3]
Argh, I missed this, this is sad. Le sam. 23 sept. 2023 à 22:37, Ratchanan Srirattanamet < écrit :
Making Netdata exclude the v2 dashboard is simple (and the fallback to v1 Just works).

The PR [1[ does just that, and I also file a PR to upstream to see how they think [2]. On the other hand, making v1 dashboard build by itself is more complex than I thought. The NPM dependencies in is ancient. It's so old that it won't build with NodeJS 18 and node2nix's dependency resolution. I get it to build with NodeJS 14, but that's marked insecure now. Even with dashboard already in the store, the NodeJS 14's insecure flag is still being evaluated as netdata's transitive dependency. So I give up on that front for now. The branch containing the work is at [3]. I'll open another issue for getting the v1 built by itself, but for now, the v2 dashboard is now excluded. [1] [2] [3]
Gotcha, thank you for your work. Will review this. Le dim. 24 sept. 2023 à 23:53, Ratchanan Srirattanamet < écrit :
Is this the reason netdata can't talk to cloud any more? It seems to me that the actions were overzealous. By all means exclude the minified dashboard, but don't remove the open source connector that connects to the netdata cloud?
No it's not. This was done in another PR for maintenance reasons, there's a attribute which you can build. If you want to restore a , feel free to do so, but I won't maintain it, requires enough attention and coordination with upstream like this ; though we could have a proper NixOS module option "I really need cloud" that ensures that your package has cloud support.