badges / badges/shields

NixPkgs version badge

Open
#10,025 3 comments 5 reactions 0 assignees View on GitHub
service-badge
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

### 📋 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` tool; this pulls from NixPkgs directly:
https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-search
```
$ 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
```

* Less usable, UI search
https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=haskell-language-server

### 🎤 Motivation

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

Thanks

Contributor guide

Open the contributing guide

Research direction

Start by comparing the existing Hackage version badge at shields.io/badges/hackage-version with the proposed NixPkgs behavior. Review the documented nix search examples and the NixOS package search URL to determine the supported package lookup and version source. Done means a NixPkgs version badge can identify a package and display its current version reliably.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.