From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wPC6ETz0sWFTtAAAgWs5BA (envelope-from ) for ; Thu, 09 Dec 2021 13:19:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IJyfDTz0sWGcIwAAB5/wlQ (envelope-from ) for ; Thu, 09 Dec 2021 12:19:08 +0000 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 CBE3C17E53 for ; Thu, 9 Dec 2021 13:19:07 +0100 (CET) Received: from localhost ([::1]:54298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvIOB-00038m-0T for larch@yhetil.org; Thu, 09 Dec 2021 07:19:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvIO6-00038b-2e for guix-patches@gnu.org; Thu, 09 Dec 2021 07:19:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvIO5-000208-Qy for guix-patches@gnu.org; Thu, 09 Dec 2021 07:19:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mvIO5-0007F4-Gz for guix-patches@gnu.org; Thu, 09 Dec 2021 07:19:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49934] [PATCH v3] gnu: Add hw-probe. References: In-Reply-To: Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Dec 2021 12:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49934 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49934@debbugs.gnu.org Cc: Raghav Gururajan , maximedevos@telenet.be, Petr Hodina Received: via spool by 49934-submit@debbugs.gnu.org id=B49934.163905229327780 (code B ref 49934); Thu, 09 Dec 2021 12:19:01 +0000 Received: (at 49934) by debbugs.gnu.org; 9 Dec 2021 12:18:13 +0000 Received: from localhost ([127.0.0.1]:42707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvINI-0007Dz-MD for submit@debbugs.gnu.org; Thu, 09 Dec 2021 07:18:13 -0500 Received: from out2.migadu.com ([188.165.223.204]:52814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvINE-0007Dp-HS for 49934@debbugs.gnu.org; Thu, 09 Dec 2021 07:18:12 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1639052287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FiXTVzdlzzEtOaWC1MCFZp4xoQUpqaXWGTNgxl0DDxY=; b=TvwVviscF420Rbe/fcdHJ1cP9PrSSo808wHn94lyN+pwJNBU+XKYWhw6eeZSw0Y3iIPWvV qshtMU+L/stjZVLukiofkUT/Ddt+xN5bvFAOMhFDbgyk95TBNxEEgVY/ae8xSfLKFzFwtE y7p3vPDKTU6gYt/OrzgsQpBOvkhNTNZkDN9cGS7wlZ0WRdSNFF85+bUDRwfFpfBYXpjoUp a/6qHb8dfHGpKoIOKp3WTJgxlpOBB8jFKDIxb4XQ1Fmmkk4RLqaaXWNVGiIjvnxRxpAehf Pl+S79iDK/N20dcGkWFGyv8ss/x6GMLBrB78yhgySDb0ZdmjQOtGgUY1tQMXgA== Date: Thu, 9 Dec 2021 07:18:02 -0500 Message-Id: <20211209121802.952-1-rg@raghavgururajan.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches From: Raghav Gururajan via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639052348; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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=FiXTVzdlzzEtOaWC1MCFZp4xoQUpqaXWGTNgxl0DDxY=; b=C/0D0W20oYwEqik1Rvh9oMBmmi9fp3j3IcH6SqjMDaIrK3JrDzjsfXudkwUiD7wcFJkUyr 6LBjzRUl41LFXVV64VSyEtYMiY35NwY0cvimYUHfyrlrZIFkbj6ygU8fa1s0At7kvIS35U Eb1ejtEpQ/dEPCB4pYeBpPiy77r0+6y0WpVPdr1hBj6KLcH7lEJW1yMtV6pJmIrx6/YDzX tKKUjvwmNIKwgps/zrbRcuBYXrKyRO5vqHb8kRpjh+4WXndG+xPKIWnS3Lhyw6EL6YmGhP CF1oQ+ce0W+H4YF77VNlPLPCPZ0ynjtRtIka30l3uqfM+zNviNMkqoh4LtwRew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639052348; a=rsa-sha256; cv=none; b=TpIQthJHzDhSxKbgfRr973ojFkSdZvH/wc61Js9aZeM8U8hGDEMp8VU95xX5uUz6E7RDw1 doc9JQ74v8x7MulvZJKKSpwdaftbhl31GWWOE5RIKnX5D/zIQvedgVtIf2iqO8VxbYSSPh UKBRBA90bMtlBM/yPB7N6fZph/2xbRdPzVMAQ6lC+taPcMWsheuUqNEpIL1gYA2sigk/UG CnIl3C+Mj19A2NPcacmgaKoTfZqD7JBzebJiFRY7IabH7TUAEEK8LLNbBRTT4vUX8Vb633 +/aXMyA9VWr+1GQPFoEHLkUGKl44HR39jSuzvkb6qDoWILSkMIM6n5kJV2N+gg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=raghavgururajan.name header.s=key1 header.b=TvwVvisc; dmarc=pass (policy=none) header.from=gnu.org; 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: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=raghavgururajan.name header.s=key1 header.b=TvwVvisc; dmarc=pass (policy=none) header.from=gnu.org; 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: CBE3C17E53 X-Spam-Score: -2.95 X-Migadu-Scanner: scn1.migadu.com X-TUID: k1b296nshG9v * gnu/packages/hardware.scm (hw-probe): New variable. Co-authored-by: Petr Hodina --- gnu/packages/hardware.scm | 495 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 495 insertions(+) diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index 46ac96d679..a56405c319 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -27,20 +27,29 @@ (define-module (gnu packages hardware) #:use-module (gnu packages admin) #:use-module (gnu packages autotools) + #:use-module (gnu packages avahi) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages check) #:use-module (gnu packages cpp) #:use-module (gnu packages crypto) + #:use-module (gnu packages cups) #:use-module (gnu packages curl) + #:use-module (gnu packages debian) + #:use-module (gnu packages disk) #:use-module (gnu packages documentation) #:use-module (gnu packages flex) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) + #:use-module (gnu packages gl) #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) + #:use-module (gnu packages package-management) #:use-module (gnu packages ncurses) #:use-module (gnu packages openldap) #:use-module (gnu packages pciutils) @@ -52,8 +61,12 @@ (define-module (gnu packages hardware) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) + #:use-module (gnu packages scanner) + #:use-module (gnu packages security-token) #:use-module (gnu packages tls) + #:use-module (gnu packages video) #:use-module (gnu packages virtualization) + #:use-module (gnu packages vulkan) #:use-module (gnu packages web) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) @@ -61,6 +74,7 @@ (define-module (gnu packages hardware) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) + #:use-module (guix build-system perl) #:use-module (guix build-system python) #:use-module (guix download) #:use-module (guix git-download) @@ -72,6 +86,487 @@ (define-module (gnu packages hardware) ;; This is a module for packages related to physical hardware that don't (yet) ;; have a more specific home like gps.scm, security-token.scm, &c. +(define-public hw-probe + (package + (name "hw-probe") + (version "1.5") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/linuxhw/hw-probe") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zyaardfw6r9nwxbkbb68hyl8719xn8sxpbgm7czkvsbjrim11n8")))) + (build-system perl-build-system) + (arguments + `(#:tests? #f ;no test target + #:imported-modules + (,@%perl-build-system-modules) + #:modules + ((guix build perl-build-system) + (guix build utils) + (srfi srfi-26)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + ;; Correct install prefix. + (substitute* "Makefile" + (("/usr") out))) + ;; Use absolute paths to referenced programs. + ;; FIXME: Some programs are to be patched successfully, + ;; and some other programs are to be packaged in Guix. + (substitute* "hw-probe.pl" + (("Cmd\\(\"acpi") + (format #f "Cmd(\"~a/bin/acpi" + (assoc-ref inputs "acpi"))) + (("Cmd\\(\"acpidump") + (format #f "Cmd(\"~a/bin/acpidump" + (assoc-ref inputs "acpica"))) + (("Cmd\\(\"acpixtract") + (format #f "Cmd(\"~a/bin/acpixtract" + (assoc-ref inputs "acpica"))) + (("Cmd\\(\"alsactl") + (format #f "Cmd(\"~a/bin/alsactl" + (assoc-ref inputs "alsa-utils"))) + #;(("Cmd\\(\"amdconfig") + (format #f "Cmd(\"~a/bin/amdconfig" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"amixer") + (format #f "Cmd(\"~a/bin/amixer" + (assoc-ref inputs "alsa-utils"))) + #;(("Cmd\\(\"apk") + (format #f "Cmd(\"~a/bin/apk" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"aplay") + (format #f "Cmd(\"~a/bin/aplay" + (assoc-ref inputs "alsa-utils"))) + #;(("Cmd\\(\"arcconf") + (format #f "Cmd(\"~a/bin/arcconf" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"arecord") + (format #f "Cmd(\"~a/bin/arecord" + (assoc-ref inputs "alsa-utils"))) + (("Cmd\\(\"avahi-browse") + (format #f "Cmd(\"~a/bin/avahi-browse" + (assoc-ref inputs "avahi"))) + (("Cmd\\(\"biosdecode") + (format #f "Cmd(\"~a/sbin/biosdecode" + (assoc-ref inputs "dmidecode"))) + (("=cat") + (format #f "=~a/bin/cat" + (assoc-ref inputs "coreutils"))) + (("Cmd\\(\"chmod") + (format #f "Cmd(\"~a/bin/chmod" + (assoc-ref inputs "coreutils"))) + (("\"chmod\"") + (format #f "\"~a/bin/chmod\"" + (assoc-ref inputs "coreutils"))) + (("\"chown\"") + (format #f "\"~a/bin/chown\"" + (assoc-ref inputs "coreutils"))) + (("Cmd\\(\"cpuid") + (format #f "Cmd(\"~a/bin/cpuid" + (assoc-ref inputs "cpuid"))) + (("Cmd\\(\"cpupower") + (format #f "Cmd(\"~a/bin/cpupower" + (assoc-ref inputs "cpupower"))) + (("Cmd\\(\"curl") + (format #f "Cmd(\"~a/bin/curl" + (assoc-ref inputs "curl"))) + (("Cmd = \"curl") + (format #f "Cmd = \"~a/bin/curl" + (assoc-ref inputs "curl"))) + (("Cmd = \\(\"curl") + (format #f "Cmd = (\"~a/bin/curl" + (assoc-ref inputs "curl"))) + (("\"date\"") + (format #f "\"~a/bin/date\"" + (assoc-ref inputs "coreutils"))) + (("Cmd\\(\"dd") + (format #f "Cmd(\"~a/bin/dd" + (assoc-ref inputs "coreutils"))) + (("\"dd ") + (format #f "\"~a/bin/dd " + (assoc-ref inputs "coreutils"))) + (("Cmd\\(\"df") + (format #f "Cmd(\"~a/bin/df" + (assoc-ref inputs "coreutils"))) + #;(("Cmd\\(\"dkms") + (format #f "Cmd(\"~a/bin/dkms" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"dmesg") + (format #f "Cmd(\"~a/bin/dmesg" + (assoc-ref inputs "util-linux"))) + (("Cmd\\(\"dmidecode") + (format #f "Cmd(\"~a/sbin/dmidecode" + (assoc-ref inputs "dmidecode"))) + (("Cmd\\(\"dpkg") + (format #f "Cmd(\"~a/bin/dpkg" + (assoc-ref inputs "dpkg"))) + #;(("echo") + (format #f "~a/bin/echo" + (assoc-ref inputs "coreutils"))) + (("Cmd\\(\"edid-decode") + (format #f "Cmd(\"~a/bin/edid-decode" + (assoc-ref inputs "edid-decode"))) + (("Cmd\\(\"efibootmgr") + (format #f "Cmd(\"~a/sbin/efibootmgr" + (assoc-ref inputs "efibootmgr"))) + (("Cmd\\(\"efivar") + (format #f "Cmd(\"~a/bin/efivar" + (assoc-ref inputs "efivar"))) + #;(("Cmd\\(\"eopkg") + (format #f "Cmd(\"~a/bin/eopkg" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"ethtool") + (format #f "Cmd(\"~a/sbin/ethtool" + (assoc-ref inputs "ethtool"))) + (("Cmd\\(\".*ethtool") + (format #f "Cmd(\"~a/sbin/ethtool" + (assoc-ref inputs "ethtool"))) + (("Cmd\\(\"fdisk") + (format #f "Cmd(\"~a/sbin/fdisk" + (assoc-ref inputs "util-linux"))) + #;(("Cmd\\(\"fglrxinfo") + (format #f "Cmd(\"~a/bin/fglrxinfo" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"find") + (format #f "Cmd(\"~a/bin/find" + (assoc-ref inputs "findutils"))) + (("Cmd\\(\"findmnt") + (format #f "Cmd(\"~a/bin/findmnt" + (assoc-ref inputs "util-linux"))) + (("Cmd = \"findmnt") + (format #f "Cmd = \"~a/bin/findmnt" + (assoc-ref inputs "util-linux"))) + (("Cmd\\(\"glxgears") + (format #f "Cmd(\"~a/bin/glxgears" + (assoc-ref inputs "mesa-utils"))) + (("Cmd\\(\"glxinfo") + (format #f "Cmd(\"~a/bin/glxinfo" + (assoc-ref inputs "mesa-utils"))) + #;(("grep") + (format #f "~a/bin/grep" + (assoc-ref inputs "grep"))) + (("`head") + (format #f "`~a/bin/head" + (assoc-ref inputs "coreutils"))) + #;(("Cmd\\(\"hciconfig") + (format #f "Cmd(\"~a/bin/hciconfig" + (assoc-ref inputs "foobar"))) + #;(("Cmd\\(\"hcitool") + (format #f "Cmd(\"~a/bin/hcitool" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"hddtemp") + (format #f "Cmd(\"~a/sbin/hddtemp" + (assoc-ref inputs "hddtemp"))) + (("Cmd\\(\"hdparm") + (format #f "Cmd(\"~a/sbin/hdparm" + (assoc-ref inputs "hdparm"))) + (("Cmd = \"hdparm") + (format #f "Cmd = \"~a/bin/hdparm" + (assoc-ref inputs "hdparm"))) + #;(("Cmd\\(\"hp-probe") + (format #f "Cmd(\"~a/bin/hp-probe" + (assoc-ref inputs "foobar"))) + #;(("Cmd\\(\"hwinfo") + (format #f "Cmd(\"~a/bin/hwinfo" + (assoc-ref inputs "hwinfo"))) + #;(("Cmd = \"hwinfo") + (format #f "Cmd = \"~a/bin/hwinfo" + (assoc-ref inputs "hwinfo"))) + (("Cmd\\(\"i2cdetect") + (format #f "Cmd(\"~a/sbin/i2cdetect" + (assoc-ref inputs "i2c-tools"))) + (("Cmd\\(\"iasl") + (format #f "Cmd(\"~a/bin/iasl" + (assoc-ref inputs "acpica"))) + (("Cmd\\(\"ifconfig") + (format #f "Cmd(\"~a/bin/ifconfig" + (assoc-ref inputs "net-tools"))) + (("Cmd\\(\"inxi") + (format #f "Cmd(\"~a/bin/inxi" + (assoc-ref inputs "inxi"))) + (("Cmd\\(\"iostat") + (format #f "Cmd(\"~a/bin/iostat" + (assoc-ref inputs "sysstat"))) + (("Cmd\\(\"ip") + (format #f "Cmd(\"~a/sbin/ip" + (assoc-ref inputs "iproute2"))) + (("Cmd\\(\".*ip") + (format #f "Cmd(\"~a/sbin/ip" + (assoc-ref inputs "iproute2"))) + (("Cmd\\(\"iw") + (format #f "Cmd(\"~a/sbin/iw" + (assoc-ref inputs "iw"))) + (("Cmd\\(\".*iw") + (format #f "Cmd(\"~a/sbin/iw" + (assoc-ref inputs "iw"))) + #;(("Cmd\\(\"iwconfig") + (format #f "Cmd(\"~a/bin/iwconfig" + (assoc-ref inputs "foobar"))) + #;(("join") + (format #f "~a/bin/join" + (assoc-ref inputs "coreutils"))) + #;(("Cmd\\(\"journalctl") + (format #f "Cmd(\"~a/bin/journalctl" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"ls") + (format #f "Cmd(\"~a/bin/ls" + (assoc-ref inputs "coreutils"))) + #;(("Cmd\\(\"lsb_release") + (format #f "Cmd(\"~a/bin/lsb_release" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"lsblk") + (format #f "Cmd(\"~a/bin/lsblk" + (assoc-ref inputs "util-linux"))) + (("Cmd = \"lsblk") + (format #f "Cmd = \"~a/bin/lsblk" + (assoc-ref inputs "util-linux"))) + (("Cmd\\(\"lscpu") + (format #f "Cmd(\"~a/bin/lscpu" + (assoc-ref inputs "util-linux"))) + #;(("Cmd\\(\"lsinitrd") + (format #f "Cmd(\"~a/bin/lsinitrd" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"lsmod") + (format #f "Cmd(\"~a/bin/lsmod" + (assoc-ref inputs "module-init-tools"))) + (("Cmd\\(\"lspci") + (format #f "Cmd(\"~a/sbin/lspci" + (assoc-ref inputs "pciutils"))) + #;(("Cmd\\(\"lspnp") + (format #f "Cmd(\"~a/bin/lspnp" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"lsusb") + (format #f "Cmd(\"~a/bin/lsusb" + (assoc-ref inputs "usbutils"))) + (("Cmd\\(\"mcelog") + (format #f "Cmd(\"~a/sbin/mcelog" + (assoc-ref inputs "mcelog"))) + (("Cmd\\(\"md5sum") + (format #f "Cmd(\"~a/bin/md5sum" + (assoc-ref inputs "coreutils"))) + #;(("Cmd\\(\"megactl") + (format #f "Cmd(\"~a/bin/megactl" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"memtester") + (format #f "Cmd(\"~a/bin/memtester" + (assoc-ref inputs "memtester"))) + (("Cmd\\(\"mmcli") + (format #f "Cmd(\"~a/bin/mmcli" + (assoc-ref inputs "modem-manager"))) + (("Cmd\\(\"modinfo") + (format #f "Cmd(\"~a/sbin/modinfo" + (assoc-ref inputs "module-init-tools"))) + #;(("Cmd\\(\"monitor-get-edid") + (format #f "Cmd(\"~a/bin/monitor-get-edid" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"mount") + (format #f "Cmd(\"~a/bin/mount" + (assoc-ref inputs "util-linux"))) + #;(("Cmd\\(\"nm-tool") + (format #f "Cmd(\"~a/bin/nm-tool" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"nmcli") + (format #f "Cmd(\"~a/bin/nmcli" + (assoc-ref inputs "network-manager"))) + (("Cmd\\(\"numactl") + (format #f "Cmd(\"~a/bin/numactl" + (assoc-ref inputs "numactl"))) + (("Cmd\\(\"nvme") + (format #f "Cmd(\"~a/sbin/nvme" + (assoc-ref inputs "nvme-cli"))) + (("Cmd\\(\"opensc-tool") + (format #f "Cmd(\"~a/bin/opensc-tool" + (assoc-ref inputs "opensc"))) + #;(("Cmd\\(\"optirun") + (format #f "Cmd(\"~a/bin/optirun" + (assoc-ref inputs "foobar"))) + #;(("Cmd\\(\"pacman") + (format #f "Cmd(\"~a/bin/pacman" + (assoc-ref inputs "foobar"))) + #;(("Cmd\\(\"pstree") + (format #f "Cmd(\"~a/bin/pstree" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"rfkill") + (format #f "Cmd(\"~a/sbin/rfkill" + (assoc-ref inputs "util-linux"))) + (("Cmd\\(\"route") + (format #f "Cmd(\"~a/bin/route" + (assoc-ref inputs "net-tools"))) + (("Cmd\\(\"rpm") + (format #f "Cmd(\"~a/bin/rpm" + (assoc-ref inputs "rpm"))) + (("Cmd\\(\"sane-find-scanner") + (format #f "Cmd(\"~a/bin/sane-find-scanner" + (assoc-ref inputs "sane-backends"))) + (("Cmd\\(\"scanimage") + (format #f "Cmd(\"~a/bin/scanimage" + (assoc-ref inputs "sane-backends"))) + (("Cmd\\(\"sensors") + (format #f "Cmd(\"~a/bin/sensors" + (assoc-ref inputs "lm-sensors"))) + #;(("sha512sum") + (format #f "~a/bin/sha512sum" + (assoc-ref inputs "coreutils"))) + (("Cmd\\(\"slabtop") + (format #f "Cmd(\"~a/bin/slabtop" + (assoc-ref inputs "procps"))) + #;(("sleep") + (format #f "~a/bin/sleep" + (assoc-ref inputs "coreutils"))) + (("Cmd\\(\"smartctl") + (format #f "Cmd(\"~a/sbin/smartctl" + (assoc-ref inputs "smartmontools"))) + (("Cmd = \"smartctl") + (format #f "Cmd = \"~a/bin/smartctl" + (assoc-ref inputs "smartmontools"))) + #;(("sort") + (format #f "~a/bin/sort" + (assoc-ref inputs "coreutils"))) + #;(("split") + (format #f "~a/bin/split" + (assoc-ref inputs "coreutils"))) + #;(("= stat") + (format #f "= ~a/bin/stat" + (assoc-ref inputs "coreutils"))) + #;(("Cmd\\(\"superiotool") + (format #f "Cmd(\"~a/bin/superiotool" + (assoc-ref inputs "foobar"))) + #;(("Cmd\\(\"swupd") + (format #f "Cmd(\"~a/bin/swupd" + (assoc-ref inputs "foobar"))) + #;(("Cmd\\(\"systemctl") + (format #f "Cmd(\"~a/bin/systemctl" + (assoc-ref inputs "foobar"))) + #;(("Cmd\\(\"systemd-analyze") + (format #f "Cmd(\"~a/bin/systemd-analyze" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"top") + (format #f "Cmd(\"~a/bin/top" + (assoc-ref inputs "procps"))) + (("Cmd\\(\"udevadm") + (format #f "Cmd(\"~a/bin/udevadm" + (assoc-ref inputs "eudev"))) + (("Cmd\\(\"uname") + (format #f "Cmd(\"~a/bin/uname" + (assoc-ref inputs "coreutils"))) + #;(("unlink") + (format #f "~a/bin/unlink" + (assoc-ref inputs "coreutils"))) + #;(("Cmd\\(\"update-alternatives") + (format #f "Cmd(\"~a/bin/update-alternatives" + (assoc-ref inputs "foobar"))) + (("Cmd\\(\"upower") + (format #f "Cmd(\"~a/bin/upower" + (assoc-ref inputs "upower"))) + (("Cmd\\(\"uptime") + (format #f "Cmd(\"~a/bin/uptime" + (assoc-ref inputs "coreutils"))) + (("Cmd\\(\"usb-devices") + (format #f "Cmd(\"~a/bin/usb-devices" + (assoc-ref inputs "usbutils"))) + (("Cmd\\(\"vainfo") + (format #f "Cmd(\"~a/bin/vainfo" + (assoc-ref inputs "libva-utils"))) + (("Cmd\\(\"vdpauinfo") + (format #f "Cmd(\"~a/bin/vdpauinfo" + (assoc-ref inputs "vdpauinfo"))) + (("Cmd\\(\"vulkaninfo") + (format #f "Cmd(\"~a/bin/vulkaninfo" + (assoc-ref inputs "vulkan-tools"))) + (("Cmd\\(\"xdpyinfo") + (format #f "Cmd(\"~a/bin/xdpyinfo" + (assoc-ref inputs "xdpyinfo"))) + (("Cmd\\(\"xinput") + (format #f "Cmd(\"~a/bin/xinput" + (assoc-ref inputs "xinput"))) + (("Cmd\\(\"xrandr") + (format #f "Cmd(\"~a/bin/xrandr" + (assoc-ref inputs "xrandr"))) + (("Cmd\\(\"xvinfo") + (format #f "Cmd(\"~a/bin/xvinfo" + (assoc-ref inputs "xvinfo")))))) + (delete 'configure) + (add-after 'install 'wrap-programs + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin-dir (string-append out "/bin/")) + (perl-lib (getenv "PERL5LIB"))) + (for-each + (cut wrap-program <> + `("PERL5LIB" ":" prefix (,perl-lib))) + (find-files bin-dir)))))))) + (inputs + `(("acpi" ,acpi) + ("acpica" ,acpica) + ("alsa-utils" ,alsa-utils) + ("avahi" ,avahi) + ("bash-minimal" ,bash-minimal) + ("coreutils" ,coreutils) + ("cpuid" ,cpuid) + ("cpupower" ,cpupower) + ("curl" ,curl) + ("dmidecode" ,dmidecode) + ("dpkg" ,dpkg) + ("edid-decode" ,edid-decode) + ("efibootmgr" ,efibootmgr) + ("efivar" ,efivar) + ("eudev" ,eudev) + ("findutils" ,findutils) + ("grep" ,grep) + ("hddtemp" ,hddtemp) + ("hdparm" ,hdparm) + ("hplip" ,hplip-minimal) + ("i2c-tools" ,i2c-tools) + ("inxi" ,inxi) + ("iproute" ,iproute) + ("libva-utils" ,libva-utils) + ("lm-sensors" ,lm-sensors) + ("mcelog" ,mcelog) + ("memtester" ,memtester) + ("mesa-utils" ,mesa-utils) + ("modem-manager" ,modem-manager) + ("module-init-tools" ,module-init-tools) + ("net-tools" ,net-tools) + ("network-manager" ,network-manager) + ("numactl" ,numactl) + ("nvme-cli" ,nvme-cli) + ("opensc" ,opensc) + ("pciutils" ,pciutils) + ("perl-data-dumper" ,perl-data-dumper) + ("perl-digest-sha" ,perl-digest-sha) + ("perl-libwww" ,perl-libwww) + ;; ("pnputils" ,pnputils) + ("procps" ,procps) + ("rpm" ,rpm) + ("sane-backends" ,sane-backends) + ("smartmontools" ,smartmontools) + ("sysstat" ,sysstat) + ("upower" ,upower) + ("usbutils" ,usbutils) + ("util-linux" ,util-linux) + ("vdpauinfo" ,vdpauinfo) + ("vulkan-tools" ,vulkan-tools) + ("xdpyinfo" ,xdpyinfo) + ("xinput" ,xinput) + ("xrandr" ,xrandr) + ("xvinfo" ,xvinfo))) + (propagated-inputs + ;; FIXME: HwInfo needs to be patched in 'hw-probe.el'. + `(("hwinfo" ,hwinfo))) + (home-page "https://linux-hardware.org") + (synopsis "Hardware Probe") + (description "Hardware Probe is a tool to probe for hardware, check its +operability and find drivers.") + (license license:lgpl2.1+))) + (define-public hwinfo (package (name "hwinfo") -- 2.34.0