Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bouk
Copy link
Contributor

@bouk bouk commented Dec 4, 2023

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

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@bouk bouk force-pushed the grafana-all-plugins branch from 1687e6a to 7f0f47a Compare December 4, 2023 13:21
@bouk bouk requested a review from lukegb December 4, 2023 13:23
Copy link
Contributor

@lukegb lukegb left a 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.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Dec 4, 2023
@bouk bouk requested a review from lukegb December 4, 2023 14:25
@bouk
Copy link
Contributor Author

bouk commented Dec 4, 2023

@lukegb what do you think now?

@lukegb
Copy link
Contributor

lukegb commented Dec 6, 2023

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...

@bouk
Copy link
Contributor Author

bouk commented Dec 7, 2023

@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 grafana-plugin.nix.

@bouk
Copy link
Contributor Author

bouk commented Feb 13, 2024

@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 unfree and provide overrides

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@CertainLach
Copy link
Member

CertainLach commented Jul 5, 2024

We could also default the plugins to unfree and provide overrides

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

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 5, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants