You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 8, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 8, 2026. It is now read-only.
We no longer generate programs.sqlite because that would require downloading all packages from cache.nixos.org. Need a solution. E.g. Hydra could upload a content listing of every NAR to the cache, which generate-programs-index.pl could download (with some local caching).
Reacted by Chris Martin, Charles Strahan, Domen Kožar, Gabriel Ebner, Alexey Lebedeff, Ollie Charles, Matthew Bauer, Bjørn Forsman, Danny Martini and Matthew O'Gorman
I'm thinking how command-not-found could also work for custom hydra installations. Maybe we could use multiple outputs to generate a list of installed files and command-not-found would depend on that output for all pkgs?
It would need to be pluggable, so maybe that's not ideal as it would have a different hash on hydra vs normal installation that wouldn't generate the lists.
It would be nice if the hook worked in 16.03, but we should at least put it into release notes if it won't. (funnily enough, we have an item in there improving the hook :)
I hoped the file list in a NAR would be decodable from a very short prefix of the NAR, but that seems not to be the case.
As you suggest, it currently seems easiest to:
Create *.narlist next to *.narinfo when uploading to the cache; perhaps it might include listing of all files, as the extra size should be bearable at this point. (And we might compress this file; it should compress well.)
After all is finished and release should happen, download all .narlist and generate file database(s) (at least the one for bin/).
Optionally, add a web service querying those databases.
While we are designing a new system, it may be a nice bonus to make it general enough to support other use cases.
I am thinking in particular to LaTeX wrappers able to download the right packages for a given document. That would be very useful for per-document nix-shell environments now that we have a fully modular tex distribution.
In case of TeX the situation is easier due to upstream providing listings of all package contents. ftp://tug.ctan.org/pub/tex/historic/systems/texlive/2015/tlnet-final/tlpkg/texlive.tlpdb.xz
Would it be absurd to suggest explicitly passing a list of expected bin/ outputs to mkDerivation? It might be nice to have that anyway so the build process can do a sanity check to verify that bin contains the right things.
So... how do I get this working? If I run command-not-found I get:
DBI connect('dbname=/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite','',...) failed: unable to open database file at /run/current-system/sw/bin/command-not-found line 13.
cannot open database `/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite' at /run/current-system/sw/bin/command-not-found line 13.
Is there a way to fix it on an existing NixOS install?
Nope, that didn't change anything. I have nix.nixPath set to point at my own local clone of nixpkgs but that is currently up-to-date with nixpkgs-channels/nixos-unstable. Also I only installed NixOS a couple of weeks ago, after this bug was closed.
Activity
domenkozar commentedon Mar 2, 2016
I'm thinking how
command-not-foundcould also work for custom hydra installations. Maybe we could use multiple outputs to generate a list of installed files andcommand-not-foundwould depend on that output for allpkgs?domenkozar commentedon Mar 2, 2016
It would need to be pluggable, so maybe that's not ideal as it would have a different hash on hydra vs normal installation that wouldn't generate the lists.
vcunat commentedon Mar 17, 2016
It would be nice if the hook worked in 16.03, but we should at least put it into release notes if it won't. (funnily enough, we have an item in there improving the hook :)
vcunat commentedon Mar 17, 2016
I hoped the file list in a NAR would be decodable from a very short prefix of the NAR, but that seems not to be the case.
As you suggest, it currently seems easiest to:
layus commentedon Mar 28, 2016
While we are designing a new system, it may be a nice bonus to make it general enough to support other use cases.
I am thinking in particular to LaTeX wrappers able to download the right packages for a given document. That would be very useful for per-document nix-shell environments now that we have a fully modular tex distribution.
vcunat commentedon Mar 28, 2016
In case of TeX the situation is easier due to upstream providing listings of all package contents. ftp://tug.ctan.org/pub/tex/historic/systems/texlive/2015/tlnet-final/tlpkg/texlive.tlpdb.xz
aloiscochard commentedon May 19, 2016
Is there a workaround for this, so it could fail temporarily silently?
The error is very verbose when using
fish.command-not-found: disable module until it's fixed again
domenkozar commentedon May 19, 2016
I've disabled it for now: NixOS/nixpkgs@2a3c0ca
chris-martin commentedon May 19, 2016
Thanks, it was getting embarrassing while I'm trying to show nix off 😄
command-not-found: disable module until it's fixed again
FRidh commentedon May 20, 2016
There was also talk of some kind of dependency solver for precompiled binaries. That could also benefit from such database.
chris-martin commentedon May 20, 2016
Would it be absurd to suggest explicitly passing a list of expected
bin/outputs tomkDerivation? It might be nice to have that anyway so the build process can do a sanity check to verify that bin contains the right things.2 remaining items
bjornfor commentedon Jul 18, 2016
My current workaround: use a Ubuntu VM to figure out command -> package-name mapping... Should I laugh or cry? :-)
Myrl commentedon Jul 24, 2016
@bjornfor I have an outdated VPS just for this.
copumpkin commentedon Aug 10, 2016
NixOS/nixpkgs@dc7e32e
Revert "command-not-found: disable module until it's fixed again"
domenkozar commentedon Aug 11, 2016
Thanks!!
puffnfresh commentedon Aug 11, 2016
🎆
bjornfor commentedon Aug 22, 2016
Yay! Thank you, @edolstra!
canndrew commentedon Oct 14, 2016
So... how do I get this working? If I run
command-not-foundI get:Is there a way to fix it on an existing NixOS install?
vcunat commentedon Oct 14, 2016
@canndrew: apparently your channel isn't new enough; try
sudo nix-channel --update.canndrew commentedon Oct 14, 2016
Nope, that didn't change anything. I have
nix.nixPathset to point at my own local clone of nixpkgs but that is currently up-to-date with nixpkgs-channels/nixos-unstable. Also I only installed NixOS a couple of weeks ago, after this bug was closed.Any more ideas?
chris-martin commentedon Oct 14, 2016
I also haven't seen this working yet. I don't use
nix-channelat all anymore. Is that a requirement?edolstra commentedon Oct 14, 2016
Yeah, you have to use
nix-channelbecausecommand-not-foundlooks specifically in/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite.domenkozar commentedon Nov 10, 2016
Note that generation was disabled again, please comment on #9