Query all pnames in Nixpkgs with flakes

IIRC flake evaluation caching doesn’t work for nested package sets (as nixpkgs is) and thus is not disabled for anything that is in legacyPackages (normal packages has to be a flat attribute set).

On a more general note, I don’t think that plan for opam will be very fruitful – installing has a very different sense on NixOS to other linux distributions. Specifically depext for libraries won’t work, as NixOS doesn’t have something akin to /usr/lib where linkers will look for libraries, so not all depext will work as expected – or rather only depext that just want to make an executable available may work. (I seem to remember nixos depext where added as a way for opam2nix to track some needed metadata in the opam repository.)

Overall the use of nix-env has some pitfalls and there is a risk of messing up an users environment when invoking it in this way. If I were to add a Nix integration to opam, I’d rather have it set up a switch specific nix-shell environment and execute build commands within that environment (which of course would be a very different approach to other depext integration, but I believe necessarily so).