Quickly locate Nix packages containing specific files by indexing binary caches.
nix-index is a command-line tool that indexes files from built Nix package derivations available in binary caches. It solves the problem of quickly identifying which Nix package provides a specific file, such as a binary or library, without needing to manually search through nixpkgs. The tool generates a local database that can be queried via `nix-locate` to find package attribute paths.
NixOS users, Nix package managers, and developers working in Nix environments who need to efficiently locate packages based on file contents. It's particularly valuable for those using shells where command-not-found functionality is desired.
Developers choose nix-index because it dramatically speeds up package discovery by searching pre-built binary caches instead of requiring local builds. Its integration as a command-not-found replacement provides immediate, actionable suggestions when commands are missing in the shell.
Quickly locate nix packages with specific files [maintainers=@bennofs @figsoda @raitobezarius]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Indexes pre-built packages from Nix binary caches, avoiding local builds and saving time, as generating a database takes only around 5 minutes per the README.
Provides shell hooks for Bash, Zsh, Fish, and Nushell that suggest Nix package installations when commands are missing, with examples like Blender in the README.
Supports using community-maintained databases from nix-index-database to skip local generation, saving setup time as mentioned in the Usage section.
Offers a home-manager module for easy configuration of shell hooks, simplifying setup for NixOS users with provided code snippets.
Creating the database locally takes approximately 5 minutes, which can be a significant wait for users wanting immediate results without pre-generated databases.
Only functions within Nix or NixOS environments, making it irrelevant for projects using other package management systems, as it relies on nixpkgs.
Relies on external binary caches; if caches are updated or inaccessible, the database may become outdated without manual regeneration, requiring frequent updates.