nix-community / nix-index

Quickly locate nix packages with specific files [maintainers=@bennofs @figsoda @raitobezarius]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

index flake inputs beyond nixpkgs

KiaraGrouwstra opened this issue · comments

nix-index now describes itself as a 'files database for nixpkgs'.
in practice, users may well end up using packages from more nix package repositories than those from nixpkgs.
as such, it would be nice if nix-index were generalized so as to say index packages among all of one's inputs, maybe treating nixpkgs as just one such input.

implementing this seems more viable if one accepts flakes as a de facto part of today's standard, and probably includes:

  • extending the database to include a field recording which flake a package is in
  • the nix-env command
  • its passed --file argument <nixpkgs>
  • the command-not-found.sh script which should be generalized to not use a hardcoded toplevel=nixpkgs but actually name the correct flake as per the (extended) database
  • .. maybe other bits using the database that would need updating as per such an extended schema