3

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.

3

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...
  • 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 Nov 16 '17 at 17:15
  • 1
    lo se cusku'i ku xamgu – thrig Nov 16 '17 at 17:50
  • :-) mi no pu cusku .i djica nu puba'o romi zmaku'i lo cusku (I was hoping the Area51 proposal would give me the chance to practice.) – jpaugh Nov 17 '17 at 3:07
  • ma se cusku le do mlatu? Is it, "What exists if I do, but only when it is negated?" – jpaugh Nov 17 '17 at 3:22
  • note: not all packages have descriptions – Knu Jan 11 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.