12

How do I get more details about a nix package, e.g. to verify that it actually is what I think it is.

In Debian, I would use apt-cache show; but how do I get similar information for nix? A command to show the derivation for an arbitrary package would be good enough, since I can probably use the src line to find the website hosting the project.

1

1 Answer 1

11

Pass the --description flag to nix-env -qa ("query available") for a brief summary, or pass --json (or --xml --meta) for more verbose output, with similar content to that available on Debian; though you'll probably also need something that can wrangle those forms to human readable

# nix-env -qa --description neovim
neovim-0.2.0  Vim text editor fork focused on extensibility and agility
# nix-env -qa --json neovim
{"nixos.neovim":{"name":"neovim-0.2.0","system":"x86_64-linux","meta":{"descriptio...
2
  • Thanks! I wonder why --description is not the default? I made an edit to emphasize the needed options, since I didn't realize nix-env -qa had an alternate output.
    – jpaugh
    Commented Nov 16, 2017 at 17:15
  • 1
    note: not all packages have descriptions
    – Knu
    Commented Jan 11, 2019 at 3:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .