How do you find non-top-level packages in nixpkgs?
This is something that I struggle with. I know how to find top-level packages like git or cowsay. But what about utilities under nested paths? I always spend ages digging through the nixpkgs source code to try to find utilities to use in my nix expressions.
Today I want to use buildRustPackage. It's defined here, and is propagated here. But how do I access it given a pkgs variable? I have no idea!
I was trying to use nix repl nixpkgs to interactively query packages. But I forgot that that command loads the flake, not the package set. You have to prefix everything with legacyPackages.x86_64-linux. to access packages in this environment. I got better results running nix repl followed by :l angle-bracket nixpkgs angle-bracket. (Btw the repl tells me how many variables have been loaded. Is there a way to list them? That would be helpful.) (Edit:nix repl nixpkgs#legacyPackages.x86_64-linux also works)