-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grafanaPlugins: use API to generate plugins.nix #272033
base: master
Are you sure you want to change the base?
Conversation
This makes sure that all the plugins are available
1687e6a
to
7f0f47a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it, conceptually, and I think this will make things much easier to maintain.
I have a nit though; see my review comment.
pkgs/servers/monitoring/grafana/plugins/update-grafana-plugins.sh
Outdated
Show resolved
Hide resolved
@lukegb what do you think now? |
My remaining concern here is that we lose information about licenses; https://grafana.com/legal/plugins/?plcmt=footer claims that it needs to be one of the listed AGPL-compatible licenses, but I don't think it's particularly easy for us to determine which one from the Grafana API. I'm also not sure whether this also applies to Grafana's own plugins published in the catalog... |
@lukegb correct, this is the only downside of this approach. All of grafana's own plugins are licensed apache2, which is why I set the license to apache2 in |
@lukegb do you reckon there's a way forward with this change? Or do we need to scrape the license information somehow if we want to include the plugins? We could also default the plugins to |
Since free packages are cached by hydra, and in nixos we haven't reached a consensus even regarding caching unfree-redistributable (#83884), it makes sense to avoid any problems and consider plugin to be unfree until proven free. Information about license can be obtained by fetching single plugin JSON (E.g https://grafana.com/api/plugins/quickwit-quickwit-datasource), there we can see a link to the license, but to convert this license to nix expression, this link needs to be fetched (Which isn't always possible, because it is not always pointing to github), and then it needs to be somehow parsed, which is too much for nixpkgs I think |
Description of changes
This makes sure that all the plugins are available by using a jq script that generates plugins.nix from the API.
@NukaDuka @lukegb what do y'all think?
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)