Nix: Querying packages' packages

2019-05-24 21:05发布

I can query available packages w/ nix-env -qa [package] but how can I look for optional packages (e.g. libraries) that depend on a primary package and can be loaded or installed separately? Example: Coq (coq-8.6) has packages coqPackages_8_6.ssreflect and coqPackages_8_6.mathcomp that I can get no information about in Nix AFAIK

标签: package nix
1条回答
虎瘦雄心在
2楼-- · 2019-05-24 22:01

I personally never use nix-env -qa because it is very slow. Instead, when I'm looking for a top-level package (an application), I use http://nixos.org/nixos/packages.html. When (like in your question), I'm looking for a non-top-level package, I use the auto-completion of nix repl. Run it with

nix repl '<nixpkgs>'

Now type for instance coqPackages and use auto-complete to see all the available versions. Type coqPackages_8_6. and use auto-complete to see all the available packages in this set.

查看更多
登录 后发表回答