Searching packages: Difference between revisions

From NixOS Wiki
imported>Fricklerhandwerk
add category: Reference
imported>Rapenne-s
m Better display
Line 1: Line 1:
There are a different ways to search for a package name in the nix package manager.
There are a different ways to search for a package name in the nix package manager.


* https://search.nixos.org/
 
** easy to use
== The NixOS packages search engine ==
** requires internet
 
* <code>nix-env -qaP</code>
There is a website that let you search for Nix packages and NixOS options at https://search.nixos.org/
** very slow
 
* [https://github.com/bennofs/nix-index nix-index] to find which package provides a given file
* pros
** it's easy to use
** allow filters
* cons
** it requires Internet
 
== Using the nix-env command ==
 
It's possible to search for a package using <code>nix-env -qaP</code>
 
* pros
** works offline
* cons
** it's very slow and requires a lot of memory
 
== Reverse search: searching which package provides a file ==
 
It's possible to use the third party program [https://github.com/bennofs/nix-index nix-index] to find which package provides a given file, this is particularly useful when you are looking for a very specific file but you don't know which package installs it.


[[Category:Reference]]
[[Category:Reference]]

Revision as of 12:24, 4 August 2022

There are a different ways to search for a package name in the nix package manager.


The NixOS packages search engine

There is a website that let you search for Nix packages and NixOS options at https://search.nixos.org/

  • pros
    • it's easy to use
    • allow filters
  • cons
    • it requires Internet

Using the nix-env command

It's possible to search for a package using nix-env -qaP

  • pros
    • works offline
  • cons
    • it's very slow and requires a lot of memory

Reverse search: searching which package provides a file

It's possible to use the third party program nix-index to find which package provides a given file, this is particularly useful when you are looking for a very specific file but you don't know which package installs it.