-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos programs.sqlite missing large numbers of packages #45
Comments
The programs and scripts that do the job are at https://github.com/NixOS/nixos-channel-scripts/blob/7c442a2f67c77344a71e5aae7e4cd2a1554420a9/generate-programs-index.cc. Will have someone move this to that tracker. |
I'm not sure ... it seems to work here;
this is on 20.09. |
@grahamc are you using the most recent version of nixos-20.09? I was able to reproduce this again on my nixos machine with 20.09:
I can also try querying the programs:sqlite database directly:
|
@benwbooth It seems to be ok now? $ sqlite3 /nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite 'select count(*) from programs'
104572 Also would like to know your progress on your command-not-found handler :) |
bumping this, as I made a similar observation This JSON snippet was logged into a git repo via a GitHub action at
A few hours later I did a |
I'm writing a custom bash
command_not_found_handle
that does a lookup into/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite
to find out which nix package to install for a given program. This is a sqlite database that's generated on the nixos cache servers, and is distributed via the nixos channel.I'm noticing that a lot of very commonly used programs are missing from both the unstable nixos and the 20.09 nixos versions. For example, the "vim" binary is not found. Looking at the 20.03 version, I can find vim, but the record count in the programs table seems suspiciously low, around ~40,000 program records for all recent versions of programs.sqlite. The nix package database at search.nixos.org claims to have over ~80,000 packages so I would expect at least 80,000 records or more in the programs table.
I noticed a similar issue cropping up with nix-index: nix-community/nix-index#163
In the case of nix-index, it looks like there are mal-formed JSON records being generated at cache.nixos.org, which is causing nix-index to skip the creation of records for many popular packages, such as vim and emacs. I'm not sure if this is the same problem afflicting programs.sqlite, but it may be a possibility.
Is this the right issue tracker for this problem, or is there a more appropriate place to put this? It looks like the cache.nixos.org server scripts that generate JSON files need to be fixed.
Thanks!
The text was updated successfully, but these errors were encountered: