Building on the Devbox Package Index
In May, we released Devbox 0.5.0, which included Version Pinning and Devbox Search. This release allowed developers to easily find and install a specific version of a package from the Nix store, even if it's not available in the latest commit. It quickly became one of our most popular features: many developers told us it was the killer feature that let them switch to Devbox.
To support version pinning and search, we built the Devbox Package Index. The Devbox Package Index parses build outputs from Hydra (Nix's CI system) to index the available packages and versions in Nixpkg's Git history. Devbox users can search this index from the CLI using
$ devbox search ripgrep
Found 2+ results for "ripgrep":
* ripgrep (13.0.0, 12.1.1, 12.1.0, 12.0.1, 12.0.0, 11.0.2, 11.0.1, 0.10.0)
* ripgrep-all (0.9.6, 0.9.5, 0.9.3, 0.9.2)
While Devbox Search provides a helpful way to find the packages you need from the terminal, we wanted to provide an easier way for developers to find and install packages. We also realized that the version index could be useful for regular Nix users, and we wanted to provide a way to access the index, even if you don't use Devbox.
Find the Package you Need at Nixhub.io
Nixhub.io is a web frontend for the Devbox Package Index. It provides an easy way to find specific versions for the over 80,000 packages in the Nix Packages Repo. Nixhub is designed to support Nix and Devbox developers and provides package references for both use cases.
Finding a package with Nixhub is as easy as entering the name of the package you want in the search bar. Nixhub will present a list of matching packages and the versions available. We even provide static URLs for each package, making them easy to bookmark or revisit as needed. For example, you can view all the available versions for NodeJS at https://www.nixhub.io/packages/nodejs:
Each version listed on the page provides two different references. The first is a Nixpkgs reference, which provides the commit hash and package name Nix requires to install that specific version. You can install the package using
nix profile install or add it as an input to a Nix Flake. For more on how to do this, see the Nix Manual.
We also provide a Devbox reference so you can add the package as a dependency for a Devbox project. To install the package in your dev environment, copy the example command or run
devbox add <pkg>@<version>. If you want to install the package globally, use
devbox global add <pkg>@<version>.
We've been working hard to build the initial index and user experience for Nixhub.io, but we have big plans for the future! Some enhancements we have on our roadmap include the following:
- Indexing by binaries and outputs. We currently search only using the official Nix package name — future updates to Nixhub to return results based on the actual binaries or libraries the packages will install.
- More metadata and filters for search results. Some high-priority options include supported platforms and architectures, so you can see whether a package is available for your system
- Expanding the Index. Currently, our index only captures packages built and reported by the Hydra build system. We've added some indexing for packages like
nodePackages, but we'd ultimately like to make the entire Nixpkgs outputs searchable by version.
Share your Feedback!
We'd love to hear your feedback on Nixhub.io! If you'd like to keep up with our progress, you can follow us on Twitter, or chat with our developers on our Discord Server. We also welcome issues and pull requests on our Github Repo.