Searching packages: Difference between revisions

Adda0 (talk | contribs)
Ole.mn (talk | contribs)
Add `nps` as an option for searching packages
 
(One intermediate revision by one other user not shown)
Line 15: Line 15:
* allows filters
* allows filters
* nice GUI in browser
* nice GUI in browser
* browser extensions possible (like @nixpgs as search engine in Firefox)  
* browser extensions possible (like @nixpkgs as search engine in Firefox)  
; cons:
; cons:
* always requires Internet connection
* always requires Internet connection
Line 55: Line 55:
; cons:
; cons:
* it's very slow and requires a lot of memory
* it's very slow and requires a lot of memory
== Using the <code>nps</code> command ==
<code>nps</code> caches entire <code>nix search nixpkgs ^</code> and <code>nix-env -qaP --description</code> results locally and queries the cache.
<syntaxhighlight lang="bash">nps firefox</syntaxhighlight>
; pros:
* works offline
* very fast
* easy syntax
* output sorted by relevance
; cons:
* [https://github.com/OleMussmann/nps/blob/main/README.md third party program]
* [https://github.com/OleMussmann/nps/blob/main/README.md#automatic-cache-refresh-optional-recommended- cache needs regular refreshing (automatable)]


== Using the <code>nix repl</code> environment ==
== Using the <code>nix repl</code> environment ==