From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aC2lLoNbLWF9DgEAgWs5BA (envelope-from ) for ; Tue, 31 Aug 2021 00:28:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yJUsKoNbLWGLCQAAbx9fmQ (envelope-from ) for ; Mon, 30 Aug 2021 22:28:19 +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 7131F11106 for ; Tue, 31 Aug 2021 00:28:19 +0200 (CEST) Received: from localhost ([::1]:52412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKplK-00064z-E5 for larch@yhetil.org; Mon, 30 Aug 2021 18:28:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKpl5-000645-08 for guix-patches@gnu.org; Mon, 30 Aug 2021 18:28:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKpl4-0008Bl-P9 for guix-patches@gnu.org; Mon, 30 Aug 2021 18:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKpl4-0003kY-Lp for guix-patches@gnu.org; Mon, 30 Aug 2021 18:28:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50283] [PATCH v2 2/2] gnu: Add hwinfo. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Aug 2021 22:28:02 +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: 50283@debbugs.gnu.org Cc: Raghav Gururajan , phodina@protonmail.com Received: via spool by 50283-submit@debbugs.gnu.org id=B50283.163036245614353 (code B ref 50283); Mon, 30 Aug 2021 22:28:02 +0000 Received: (at 50283) by debbugs.gnu.org; 30 Aug 2021 22:27:36 +0000 Received: from localhost ([127.0.0.1]:60565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKpkd-0003jQ-Hm for submit@debbugs.gnu.org; Mon, 30 Aug 2021 18:27:36 -0400 Received: from out1.migadu.com ([91.121.223.63]:20529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKpkX-0003it-N4 for 50283@debbugs.gnu.org; Mon, 30 Aug 2021 18:27:30 -0400 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=1630362448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MwMKmbainskvFWUQJ6bqul0B+jOfF5n6jQznzrBV6Zs=; b=SahmCUC99nOWIR4ZssF7rvbvVa3sAzde7oUPso8/0fmxjpx8uho2wackwiDgpOaM4WP/u7 WWt1/RbtDJZSqmRK1dhX6wQ3NMdNXJXtnNV9D0jH1cLXORb1x/7lqCs67lpPlZs3uhnNRS +aiS3iPDSXftVprwA8EPGQdGHYYFLkDWIqK4kZG15U1pbkTpvlcY/397NiF9tFCTf/Ehjz tKsGrYnK1AvcuX8hwY5YMFLzrtYspAY2TqlvfX2UImlyU8FHqZO8EkdoVhSPTH5roEiF0Z X1sgctg/HkdVL43smUqZElmZiVRHB7uVzNcEdE4ozA7BpARLoX+OYPbxS2pXPQ== Date: Mon, 30 Aug 2021 18:27:12 -0400 Message-Id: <20210830222712.14136-2-rg@raghavgururajan.name> In-Reply-To: <20210830222712.14136-1-rg@raghavgururajan.name> References: <20210830222712.14136-1-rg@raghavgururajan.name> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Auth-User: rg@raghavgururajan.name 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 X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: 7131F11106 X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: bkRCjdlCWEu9 * gnu/packages/hardware.scm (hwinfo): New variable. Co-authored-by: Petr Hodina --- gnu/packages/hardware.scm | 109 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index ff21c9c724..d000ab8ce6 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -5,6 +5,8 @@ ;;; Copyright © 2021 Evgeny Pisemsky ;;; Copyright © 2021 Léo Le Bouter ;;; Copyright © 2021 Denis Carikli +;;; Copyright © 2021 Petr Hodina +;;; Copyright © 2021 Raghav Gururajan ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,6 +33,7 @@ #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages documentation) + #:use-module (gnu packages flex) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) @@ -49,6 +52,7 @@ #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages tls) + #:use-module (gnu packages virtualization) #:use-module (gnu packages web) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) @@ -66,6 +70,111 @@ ;; 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 hwinfo + (package + (name "hwinfo") + (version "21.76") + (home-page "https://github.com/openSUSE/hwinfo") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1910wzpdyp1ma1z2v0dripaljgrpl7vjq0f6b7qq9y220899hihb")) + (modules + '((guix build utils))) + (snippet + `(begin + ;; Remove git2log program file. + (delete-file "git2log") + ;; Remove variables that depends on git2log. + (substitute* "Makefile" + (("GIT2LOG.*\\:=.*$") "") + (("GITDEPS.*\\:=.*$") "") + (("BRANCH.*\\:=.*$") "")) + ;; Create version file. + (call-with-output-file "VERSION" + (lambda (port) + (format port ,version))) + #t)))) + (build-system gnu-build-system) + (outputs '("out" "dev" "doc")) + (arguments + `(#:tests? #f ; no test-suite available + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (dev (assoc-ref outputs "dev")) + (doc (assoc-ref outputs "doc")) + (incl-dir (string-append dev "/include")) + (lib-dir (string-append dev "/lib")) + (sbin-dir (string-append out "/sbin")) + (share-dir (string-append out "/share")) + (doc-dir (string-append doc "/share/doc"))) + ;; Generate HTML documentation in the output "doc". + (mkdir-p doc-dir) + (substitute* "doc/libhd.doxy" + (("OUTPUT_DIRECTORY.*=.*libhd") + (string-append "OUTPUT_DIRECTORY = " doc-dir "/libhd"))) + ;; Correct values of the version and install directories. + (substitute* "Makefile" + (("VERSION.*\\:=.*$") + (string-append "VERSION := " ,version "\n")) + (("LIBDIR.*\\?=.*$") + (string-append "LIBDIR ?= " lib-dir "\n")) + (("/usr/include") incl-dir) + (("/(usr|var)/(lib|lib64)") lib-dir) + (("/usr/sbin") sbin-dir) + (("/usr/share") share-dir) + (("\\$\\(DESTDIR\\)/sbin ") "")) + ;; Add output "dev" to the run-path. + (substitute* "Makefile.common" + (("-Lsrc") + (string-append "-Lsrc " "-Wl,-rpath=" lib-dir))) + ;; Correct program name of the lexical analyzer. + (substitute* "src/isdn/cdb/Makefile" + (("lex isdn_cdb.lex") "flex isdn_cdb.lex")) + ;; Patch pkgconfig file to point to output "dev". + (substitute* "hwinfo.pc.in" + (("/usr") dev))))) + (delete 'configure) + (replace 'build + (lambda _ + (setenv "CC" ,(cc-for-target)) + (invoke "make" "shared") + (invoke "make" "doc"))) + (add-after 'install 'install-manpages + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (man-dir (string-append out "/share/man")) + (man1-dir (string-append man-dir "/man1")) + (man8-dir (string-append man-dir "/man8"))) + (for-each + (lambda (x) (install-file x man1-dir)) + (find-files "doc" "\\.1$")) + (for-each + (lambda (y) (install-file y man8-dir)) + (find-files "doc" "\\.8$")))))))) + (native-inputs + `(("doxygen" ,doxygen) + ("flex" ,flex) + ("perl" ,perl) + ("pkg-config" ,pkg-config))) + (inputs + `(("libx86emu" ,libx86emu) + ("util-linux:lib" ,util-linux "lib"))) + (synopsis "Hardware information tool") + (description "HwInfo is used to probe for the hardware present in the system. +It can be used to generate a system overview log which can be later used for +support.") + (license license:gpl2+))) + (define-public ddcutil (package (name "ddcutil") -- 2.33.0