Hi Pierre, on NixOS, if you try to run the name of a program that you don't have installed (eg: $ endlessh) you get:
The program ‘endlessh’ is currently not installed. You can install it by typing: nix-env -iA nixos.endlessh program-not-found is a perl script that uses an sqlite file placed under: /nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite I don't know how this database is created. Table structure: CREATE TABLE Programs ( name text not null, system text not null, package text not null, primary key (name, system, package) ); like kbdinfo|i686-linux|kbd (a nice thing I just found reading it: if you set NIX_AUTO_INSTALL=1 it automatically spawns a nix-shell with the required package and starts the program) Nicolò Pierre Neidhardt <m...@ambrevar.xyz> writes: > Ludovic Courtès <l...@gnu.org> writes: > >> You should look at how NixOS does it for its ‘command-not-found’ support >> (I think it’s part of NixOS, not Nix). IIRC they distribute an SQLite >> database, but it’s a pretty ad-hoc mechanism without authentication. > > I haven't found this yet, but I found this instead: > > https://github.com/bennofs/nix-index/pulls > > Tobias, are you sure Nix has such a feature? > > -- > Pierre Neidhardt > https://ambrevar.xyz/