Why isn't there an official / built-in way to find what package provides a specific executable?

It also sounds like there are some flake-compatibility issues with that approach: `command-not-found` flake support by RyanGibb · Pull Request #187894 · NixOS/nixpkgs · GitHub. Some other issues with useful detail:

2 Likes