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 KIy6JzNrLWFYLgEAgWs5BA (envelope-from ) for ; Tue, 31 Aug 2021 01:35:15 +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 MPxQIzNrLWGfLQAAbx9fmQ (envelope-from ) for ; Mon, 30 Aug 2021 23:35:15 +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 6436112CB0 for ; Tue, 31 Aug 2021 01:35:15 +0200 (CEST) Received: from localhost ([::1]:40820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKqo0-0004qN-To for larch@yhetil.org; Mon, 30 Aug 2021 19:35:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKqnu-0004pz-IB for guix-patches@gnu.org; Mon, 30 Aug 2021 19:35:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKqnu-0001Sp-An for guix-patches@gnu.org; Mon, 30 Aug 2021 19:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKqnu-0005aZ-3r for guix-patches@gnu.org; Mon, 30 Aug 2021 19:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50283] [PATCH v3 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 23:35: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 , Petr Hodina Received: via spool by 50283-submit@debbugs.gnu.org id=B50283.163036645421415 (code B ref 50283); Mon, 30 Aug 2021 23:35:02 +0000 Received: (at 50283) by debbugs.gnu.org; 30 Aug 2021 23:34:14 +0000 Received: from localhost ([127.0.0.1]:60602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKqn3-0005ZB-9p for submit@debbugs.gnu.org; Mon, 30 Aug 2021 19:34:13 -0400 Received: from out2.migadu.com ([188.165.223.204]:56062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKqn1-0005Z3-7H for 50283@debbugs.gnu.org; Mon, 30 Aug 2021 19:34:08 -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=1630366446; 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=fGCbuo+gMmeZdbRLELAxaXxnGkbHYYnVj2dpaOz264sDx/jW50JjiGFOWt3SiTjBSQoQuE 0o8Lk+Z75wwXCniNoqqt/Ly7dMvnBzuO8+oGsBH9ixE/4heOTxIpGRTexI3J+S9g5qz7lO FvQNlqICQBEDKW3Xqwf122E/zqPBZFqXdxLT30esj4N4me/78gGi/6A98BV29dIAatlpF3 hBoRIIGL4TfcfwJAo1iZTzLZcXw89+8TGS78f4yT3/AtEy6eAdeDY/ERsFPG+POTqYlFUQ CmLTF3ZJIfGcu3Ju0ONkvFX4SqYgz98cAvKe6RkJ6MtKBJEwLM0EgSUVSYE0sg== Date: Mon, 30 Aug 2021 19:33:53 -0400 Message-Id: <20210830233353.19811-2-rg@raghavgururajan.name> In-Reply-To: <20210830233353.19811-1-rg@raghavgururajan.name> References: <20210830233353.19811-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: 6436112CB0 X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3nj9XpxZesph * 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