From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id INKyMnCItGITjQAAbAwnHQ (envelope-from ) for ; Thu, 23 Jun 2022 17:36:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SCq/MnCItGLYWgEAauVa8A (envelope-from ) for ; Thu, 23 Jun 2022 17:36:16 +0200 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 755B6EF69 for ; Thu, 23 Jun 2022 17:36:16 +0200 (CEST) Received: from localhost ([::1]:59998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4OsR-0002TO-6j for larch@yhetil.org; Thu, 23 Jun 2022 11:36:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4OsF-0002Pn-Ou for guix-patches@gnu.org; Thu, 23 Jun 2022 11:36:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4OsF-0001xy-A7 for guix-patches@gnu.org; Thu, 23 Jun 2022 11:36:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4OsF-0004aU-8O for guix-patches@gnu.org; Thu, 23 Jun 2022 11:36:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50283] HwInfo Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Jun 2022 15:36:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50283 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Raghav Gururajan Cc: Ricardo Wurmus , 49934-done@debbugs.gnu.org, 50283-done@debbugs.gnu.org Received: via spool by 50283-done@debbugs.gnu.org id=D50283.165599851517529 (code D ref 50283); Thu, 23 Jun 2022 15:36:03 +0000 Received: (at 50283-done) by debbugs.gnu.org; 23 Jun 2022 15:35:15 +0000 Received: from localhost ([127.0.0.1]:39612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4OrS-0004Ye-Pp for submit@debbugs.gnu.org; Thu, 23 Jun 2022 11:35:15 -0400 Received: from mail-qv1-f45.google.com ([209.85.219.45]:45923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4OrP-0004YJ-Id; Thu, 23 Jun 2022 11:35:13 -0400 Received: by mail-qv1-f45.google.com with SMTP id n15so26434654qvh.12; Thu, 23 Jun 2022 08:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=pciV5X2xNLkTa5S7w12QynvqxP7VCLktsl9WUQ3pKkY=; b=KEWJj98e7NcTQMZDZ3wQtqZRaBnqkQU286/btCQOf1CNSmGSgMTr5tm7GE5/f1zBFQ 4pEGbx287fmIN8Zd5ZW9ARDFtB+Xb63nMVyg8bDr4oCVOak/dFIx9EHzuSkMisQ0x07X ai7FzDCoZSP+H20Si1Ww3CNHfRs1dFMgkvH6MhkaOpkD5XbUYlToRGJ3BTrYeTkhNxrN 5JpLgg1kR7Cgf1zIeQTH1xf7A23XgoLq0Fix/rpTMcny7+UP4dGmALQtrh+92LKlp4uc y8KkTmzMFQCZYtEt9rCWmEcp4gb0GkIA6DONaJJCJs6LCys8UkmY4UmojMDT6UuGRQxl GWTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=pciV5X2xNLkTa5S7w12QynvqxP7VCLktsl9WUQ3pKkY=; b=Tfd1CrEmsBzgIPVFYRktJX/c4LvVrkJ3qi3NLTBQR/uzHu7hfaYLavztbDqS/DGjLB 97sGKuhblwJGrg4tTAOFpE6h7nsO8bo1/w2Nv2FuNZMlf23OuqwF+O/6Rnc0SGszS21z 2S8J4H4zwyqK7/g4cYhctR1AYg3EyiuEZLPHFnv1sGQ/w/WiQLJjjvmPK/biVZx/iGh+ wJ6d9rGsqFAm1vQYNtNi+t6qwEAQyGD2trh/XYsIVdUv1fR6Jprfj6ScKW1x9GKSaSpj nysn3bEbS1abWVBUXrFHBSQ1xBSJQr/lNQMhx+4+wMHGYoKCeKEA9kzNzN8JgwM3Km/J mtzw== X-Gm-Message-State: AJIora+sJRi9k5PrUqNy93br9ro6+krJlwYuao2U3Ny7RMX5QgKJW21+ 3T5aeMoFkzevlrH/RCgejEiOvBBj0+2lMrpg X-Google-Smtp-Source: AGRyM1vzewyxDSI81zoanL7ct3ctjvWpxnASR6ONTCsp1L2XiTzcaf66LbFP9rirh7HGOomoIj1RWw== X-Received: by 2002:a05:622a:1715:b0:304:f325:5562 with SMTP id h21-20020a05622a171500b00304f3255562mr8505942qtk.573.1655998505580; Thu, 23 Jun 2022 08:35:05 -0700 (PDT) Received: from hurd (dsl-158-129.b2b2c.ca. [66.158.158.129]) by smtp.gmail.com with ESMTPSA id x67-20020a37ae46000000b006aee8a5fa4bsm2554595qke.43.2022.06.23.08.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 08:35:05 -0700 (PDT) From: Maxim Cournoyer References: <87bl1hks0w.fsf@elephly.net> <314e6ff0-aae0-1af8-cb85-f74b222c6228@raghavgururajan.name> Date: Thu, 23 Jun 2022 11:35:04 -0400 In-Reply-To: <314e6ff0-aae0-1af8-cb85-f74b222c6228@raghavgururajan.name> (Raghav Gururajan's message of "Sat, 25 Dec 2021 16:17:32 -0500") Message-ID: <878rpn4clz.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655998576; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=pciV5X2xNLkTa5S7w12QynvqxP7VCLktsl9WUQ3pKkY=; b=aS1CmlpwkdPQFNap4IvvUJNZ3dW2TwUgeXmiHuV4f2yg7grVSMDmGSM/arfXmrX/PedL1a gXG9LVAl8VVzV2Mj9TFiAAvOxfDu32le4M6MvGxcwQWMMghcUlPHvUQljJZ1lVThliYBY5 8Yq6pwoXcN3KkcAB9f63AIoJL579GjJWkgIIJfxWUJ9eHDjHnWrQcb7fWD4BJi5DjM+Z5L zR1XpsRzk/QAJl6ArvUeUjC8YTppBd5qrUID9yPPtUUrWpEsZkqovXiye4qoSVfhW+Liuq qR6oWX/t9KMl+XU0rx0XS7KxvV+lBB2IY0/jwNQt4sECmGfo0ZxR+7IdkcDp8w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655998576; a=rsa-sha256; cv=none; b=Nu5/1nHI1f2KTL4/2JI2XKdedCQWAiZ3Fk6Dt86GDuyrSoad59ZnQkZOxZb48nGvDkda5k snzIxW/r5G2pC/IDpcdRy7Mn2Xt0SzJOUsx0WzXf0xeRp4138ksHhCi6uAQuiBC7pkKs2M FGGfPJhvT0aTQQqIIiaV1Kd/GXQRbK8ovTFdLXL+hqsh+IBIc2bhNzsilJWtcs7+M8aUjR WIpECFw/n+b/qaFZh/dvdQ2ZOvAyYSAvWjbRlTe9mb5nxrfevyjeY2kIAV8R1M/EEH0NCr bSBWHj4gyvIUUpLG0F22vCtrP846Ur2e09MzMg4C01Yzg6La3Bh3yMDA565jGg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KEWJj98e; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KEWJj98e; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 755B6EF69 X-Spam-Score: 5.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: I+X40XWo6xC+ Hi, Raghav Gururajan writes: > Hi Ricardo! > >> --8<---------------cut here---------------start------------->8--- >> (substitute* "hw-probe.pl" >> (("Cmd\\(\"([^\"]+)" _ command) >> (string-append "Cmd(\"" (which command)))) >> --8<---------------cut here---------------end--------------->8--- > > Thanks for the snippet and explanation. > > I am wondering these, > [1] Does require import of specific modules? No. `which', the Scheme procedure, is part of (guix build utils). > [2] If `(which command)`'s output is empty, will it return #f? Yes, and I agree that's a problem. Fortunately, the recently added search-input-file more usefully raises an error when the file it is looking for doesn't exist, so I used that. It was a bit painful to hunt all the commands but in the end it works beautifully! I pushed the result as 3611f99affc4d2edcf4141e3022dd0d2a0b04068. Closing, thanks! Maxim