all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sarthak Shah <shahsarthakw@gmail.com>
To: guix-devel@gnu.org
Subject: Implementing Nix's command-not-found in Guix
Date: Sun, 5 Mar 2023 03:12:22 +0530	[thread overview]
Message-ID: <CADBZEVkEu9Rv8PaC=a+XLUGKEU1uRhf9V4pv-a9RToWEF9gBFw@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2023-03-04 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-04 21:42 Sarthak Shah [this message]
2023-03-05  2:19 ` Implementing Nix's command-not-found in Guix indieterminacy
2023-03-06 20:19 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADBZEVkEu9Rv8PaC=a+XLUGKEU1uRhf9V4pv-a9RToWEF9gBFw@mail.gmail.com' \
    --to=shahsarthakw@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.