unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Implementing Nix's command-not-found in Guix
@ 2023-03-04 21:42 Sarthak Shah
  2023-03-05  2:19 ` indieterminacy
  2023-03-06 20:19 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Sarthak Shah @ 2023-03-04 21:42 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

Hello Guix!

I'd like to implement something similar to NixOS's command-not-found in
Guix.
As you can see in the repository below, it contains a nix file which is
essentially a shell script which runs the second file, a perl script, if
the user enters a command which is not found on this system. The perl
script suggests names of packages containing said command which it pulls
from an SQL database.
https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/programs/command-not-found
This would make Guix much more user-friendly; for example, new Guix System
users often struggle to figure out how to add the "clear" command to their
shell. command-not-found would immediately inform them that it can be found
in the ncurses package.

How would you recommend I go about implementing something similar for Guix?
I have unfortunately been unable to find a database or anything similar
listing files outputted to /bin by each package, which would in my opinion
be the starting step.

Happy Hacking!
Sarthak (cel7t)

[-- Attachment #2: Type: text/html, Size: 1190 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-06 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-04 21:42 Implementing Nix's command-not-found in Guix Sarthak Shah
2023-03-05  2:19 ` indieterminacy
2023-03-06 20:19 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).