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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

NixPkgs version badge #10025

Open
peterbecich opened this issue Mar 15, 2024 · 2 comments
Open

NixPkgs version badge #10025

peterbecich opened this issue Mar 15, 2024 · 2 comments
Labels
service-badge Accepted and actionable changes, features, and bugs

Comments

@peterbecich
Copy link

peterbecich commented Mar 15, 2024

馃搵 Description

I see the Hackage badge: https://shields.io/badges/hackage-version
Here is an example of it in use: https://github.com/haskell/haskell-language-server?tab=readme-ov-file#haskell-language-server
I assume that functions by making a call to Hackage Server.

It would be very cool to have a similar badge for NixPkgs. This is not limited to Haskell.

馃敆 Data

$ nix search nixpkgs#haskellPackages '^haskell-language-server' 
* legacyPackages.x86_64-linux.haskellPackages.haskell-language-server (2.5.0.0)
  LSP server for GHC
  • Keeping a local copy of NixPkgs Git repo and searching it:
$ nix search .#haskellPackages '^haskell-language-server' 
* legacyPackages.x86_64-linux.haskellPackages.haskell-language-server (2.5.0.0)
  LSP server for GHC
  • another example:
$ nix search .#haskell-language-server
* legacyPackages.x86_64-linux.haskell-language-server (2.5.0.0)
  LSP server for GHC
  • another example:
$ nix search .#firefox    
* legacyPackages.x86_64-linux.firefox (123.0.1)
  A web browser built from Firefox source tree

馃帳 Motivation

Encourage the use of packages hosted on NixPkgs, and also encourage contribution to update the NixPkgs

Thanks

@peterbecich peterbecich added the service-badge Accepted and actionable changes, features, and bugs label Mar 15, 2024
@chris48s
Copy link
Member

We don't do badges that scrape web pages or require installing CLI tools to get the data. Is the necessary data available via some documented public API?

Also, is this the same as #9551 or are they 2 different things?

@peterbecich
Copy link
Author

peterbecich commented Mar 19, 2024

Is the necessary data available via some documented public API?

I will look into this, https://search.nixos.org/packages may not have this API.

No, it is different from #9551
NixPkgs is a larger set of packages than FlakeHub, about 80K. I think most Nix packages are based on a GitHub repository. However, the repository owner is often not the same person who maintains the corresponding Nix package. Sometimes someone packages a repository with Nix and then does not maintain it ongoing. If the repository displays a badge with the Nix package version, it may encourage contributions to update the Nix package. More than anything I think it would raise awareness of the availability of Nix packages.

I'm referring only to official Nix packages in this repo https://github.com/NixOS/nixpkgs searchable here https://search.nixos.org/packages ; I'm not using the correct definition of "Nix package", which could be anywhere.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

No branches or pull requests

2 participants