From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GPRGJWK7A2TdrAAAbAwnHQ (envelope-from ) for ; Sat, 04 Mar 2023 22:42:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kHAvJWK7A2QA1AAAauVa8A (envelope-from ) for ; Sat, 04 Mar 2023 22:42:58 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 74A8A8417 for ; Sat, 4 Mar 2023 22:42:58 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NYNCeJ1G; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677966178; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MvdIBctOzv7Ob9238VhNKdY0sH9F9jfQM+YyLWc6a1A=; b=pIwl2SvK6tXPNjvBXiZMVW3sn4ljLE2gMwKGP1SsuVbmodBccVF0CdqSltVHzCg3i5kOM+ Wyko+QlN9eKk03W2P3zPls0yN9DY1xOzXvpCFGHxawgD+XPX02+B5zI26fOD+rt7aqUHSX aZvDiyRWCBN6BYN33EPt/cZpJKFfARs4b93rzrthJTbNR44j5VWlOO+A7qB9EqvnnMnVb5 jqfZnLlv190kZRv4yqbty5ON9ok/1CO6jxLpjHWpcxYT8zrZgC3R/v8aBrklPfRtzGd3rm TKaLaPw4bcOSw0E4MYdtyM5ftLhr5s2maNLNJhfbJdCfTOedz/VPEjHPdSmayA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NYNCeJ1G; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677966178; a=rsa-sha256; cv=none; b=BqS9bJODZ8HkBQZ48apilqc4mgbPcUYUNLARal8UAoIpjUL/iZ0QN+Uhc35czuN4Oo/nCZ ym1R9WIW5INPWxXh9XXXrSa6YUB2hpLJZ/u9hiYa7lsoIC0cxqFNQSW2Q/GqO4nmaxxCm6 Y7JcWGFD+ieKJBrey+g9wQhI/LmJtILoR0bgOczW+p6EaLGr4IPKcakD1UXWieSnxk4Syy JwWvPXS9IvRtnu7QUcSvD2cED6bOIz+d0zFKeosn4CTQlv5W+e8SpbyPR9GAfv05Z7Nt3J Pvoflx8cWMIQD1qej477ocISeTj0Nk3m/H9vR10EJ7HhQWBehkcOtIQA9WnXkQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYZeI-0001BN-F5; Sat, 04 Mar 2023 16:42:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYZeG-0001B8-OL for guix-devel@gnu.org; Sat, 04 Mar 2023 16:42:36 -0500 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYZeF-0006Hx-3p for guix-devel@gnu.org; Sat, 04 Mar 2023 16:42:36 -0500 Received: by mail-qk1-x72e.google.com with SMTP id j10so1924570qkg.12 for ; Sat, 04 Mar 2023 13:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677966154; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=MvdIBctOzv7Ob9238VhNKdY0sH9F9jfQM+YyLWc6a1A=; b=NYNCeJ1GdqEIQKDxjhLruZGrhliZceQ9ZGxAmifjGdoVoO90Omt44haX6mDgc7AMGs mmcj1fKguovojHjtjVtNgBVcXiHdl8uXRm8MCz1qBZ9mXda2pumvI5ceKUofrndCRqzg OZE0V7D//Tou5vvWLT7LlvHcvOHqQVqJR66L7C40hwUSn3WFLnq0ywjKTNeQ43Nr2MS5 mzeUiGD4QvgCpAl7ZZX/GAtKN/D+5hgOyXRNFElBIDi9tmGy1Jx7UH+anVEbS+mDrxH8 DovjWek8xwuozIYXjvd/E/sWH7BKlhYs6q45AInKk42l/Y46VznD3RB7HfKXyf1AEgcr pUJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677966154; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=MvdIBctOzv7Ob9238VhNKdY0sH9F9jfQM+YyLWc6a1A=; b=DccHAJ7MGIRAr13fTQ+8olD5D+FrpablQVc0I1oNwUkXccUDTwlh3+po917OrHiL7/ pADUw8tOlcuWVVPT4syyVsokF0NAkRwJGnmSpwbybJHbFtJ+ZqAjWO7HtB3mL9pdkMqC ahP7Vk/y2zouyxiFCt+o4bsZz+CFBUQfJj4UY6/wabWJNOSy+bsmehHFOQFAm+hEpNih sZkkyRmA4eUjdreJC5WQUnwwCtH2/730U+PzIahqd7ayUcxJwfl0TOJhztse5rpdt98h sV6jBdpWm98PHr26jR9ttIsAYRLL6gha4WRP4uE4lsK4iytZq0UJwhTlbk9wDJb8GWmQ cMJw== X-Gm-Message-State: AO0yUKVrgG9ARdoko8KmKE1VvNmb/f8cDJ7nEDHnuUnsHrHQjkScluUA /KKiSBtkdJuAwE61v5YGx4PqBdxut16r1FvZC9+mJ2RK4PwF/Q== X-Google-Smtp-Source: AK7set+uoytV+7KtCx+fAQU0sXAS4/zE5CdHoPM/EoCQOvK0QPmzRwYlGrScYu2c6pNXQ9WO771gDRZ+u7u0M7yvOw4= X-Received: by 2002:a05:620a:d44:b0:742:817f:5f41 with SMTP id o4-20020a05620a0d4400b00742817f5f41mr1631817qkl.3.1677966153649; Sat, 04 Mar 2023 13:42:33 -0800 (PST) MIME-Version: 1.0 From: Sarthak Shah Date: Sun, 5 Mar 2023 03:12:22 +0530 Message-ID: Subject: Implementing Nix's command-not-found in Guix To: guix-devel@gnu.org Content-Type: multipart/alternative; boundary="00000000000088a8f905f619f00d" Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=shahsarthakw@gmail.com; helo=mail-qk1-x72e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Spam-Score: -9.93 X-Spam-Score: -9.93 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 74A8A8417 List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: SRJ6k20PMq3H --00000000000088a8f905f619f00d Content-Type: text/plain; charset="UTF-8" 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) --00000000000088a8f905f619f00d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Guix!

I'd like to implement something sim= ilar to NixOS's command-not-found in Guix.
As you can see in the rep= ository below, it contains a nix file which is essentially a shell script w= hich runs the second file, a perl script, if the user enters a command whic= h is not found on this system. The perl script suggests names of packages c= ontaining said command which it pulls from an SQL database.
https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/progr= ams/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=C2=A0to 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=C2=A0implementing something similar for= Guix?
I have unfortunately been unable to find a database or anything s= imilar listing files outputted to /bin by each package, which would in my o= pinion be the starting step.

Happy Hacking!
Sarthak (cel7t)
--00000000000088a8f905f619f00d--