-
Notifications
You must be signed in to change notification settings - Fork 1
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
Difference to nix-index? #19
Comments
Sure! Maybe I need to explain that better in the README.md.
Here's a motivation for Why
|
command | cache size | speed | readability |
---|---|---|---|
nix-env -qaP avahi |
? | 9720 ms | ++ |
nix search nixpkgs avahi |
? | 1055 ms | + |
nix-locate "bin/avahi" |
73 M | 806.0 ms | -- |
nps avahi |
5.9 M | 4.1 ms | +++ |
nix-index
/nix-locate
Maybe it was a glitch, but creating the nix-index
cache stalled my internet connection and took such a long time that I decided to run it over night. Using the pre-generated nix-index-database
would certainly help here.
This tool scores rather low, it is not really meant for simple package searching.
Output (cropped, way too long):
Usecase nix-index
:
command-not-found
replacement- Query derivations for certain paths
Benefits
- Can find derivation paths, even if the name of the executable does not match the package name, e.g.
ripgrep
with executablerg
.
Drawbacks
- Long, confusing output
- Unsorted
- Slow
nix search nixpkgs
I'm throwing nix search
a bone here and used a repeated search for benchmarking. This makes it much faster and omits a ton of "evaluation warning"s that clutter the output. Output content is rather similar to nps
, since we cache the (JSON) output of this command. I don't know if this commands use any cache of some sorts.
Benefits
- Rather brief output
Drawbacks
- Unsorted
- Slow
nix-env -qaP --description
Output content is rather similar to nps
, since we cache the output of this command. I don't know if this commands use any cache of some sorts.
Benefits
- Brief output!
- Can search available or installed packages
Drawbacks
- Unsorted
- Very slow
- Does not search package descriptions
nps
Benefits
- Brief output
- Color coded
- Sorted by relevance, most important match is below
- Configurable output, choose desired columns
Drawbacks
- Only search nixpkgs (for now)
- Cannot filter for only installed packages
Thank you for the explanation! |
Hi, may I ask what the advantages/disadvantages are of
nps
in comparison tonix-index
/nix-locate
?The text was updated successfully, but these errors were encountered: