Searching packages: Difference between revisions

imported>Berquist
m packages and options links under flakes were switched
Klinger (talk | contribs)
Package search does not only search package names, but also the description. Added pro/contra to a subsection. Added idea of search engines in browser)
Line 1: Line 1:
There are multiple ways to search for a package name in <code>nixpkgs</code>.
There are numerous approaches available for searching substrings within both package names and package descriptions in <code>nixpkgs</code>.


== Using <code>search.nixos.org</code> website ==
== Using <code>search.nixos.org</code> website ==
Line 14: Line 14:
* easy to use
* easy to use
* allows filters
* allows filters
* nice GUI in browser
* browser extensions possible (like @nixpgs as search engine in Firefox)
; cons:
; cons:
* requires Internet connection
* always requires Internet connection  


== Using the <code>nix search</code> command ==
== Using the <code>nix search</code> command ==
Line 22: Line 24:


<syntaxhighlight lang="bash">nix --extra-experimental-features "nix-command flakes" search nixpkgs firefox</syntaxhighlight>
<syntaxhighlight lang="bash">nix --extra-experimental-features "nix-command flakes" search nixpkgs firefox</syntaxhighlight>
; pros:
* fast
* possible offline usage
; cons:
* requires disk space for caching
* quite long command


== Using the <code>nix-env</code> command ==
== Using the <code>nix-env</code> command ==