From 0e8b852e0ff58a34141d804747b13b55088993b4 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Tue, 4 Jan 2022 16:40:14 -0500 Subject: [PATCH 1/4] gnu: Add pciutils-no-zlib. * gnu/packages/pciutils.scm (pciutils-no-zlib): New variable. A hidden package to provide pciutils with uncompressed pci.ids. --- gnu/packages/pciutils.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm index 47275a8ff0..a8c46528d0 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2022 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -129,3 +130,23 @@ (define-public pciutils of operating systems. This includes the @command{lspci} and @command{setpci} commands.") (license license:gpl2+))) + +;; This is a version of pciutils without zlib, so that the hardware pci.ids is +;; uncompressed. This is useful for packages that try to read pci.ids +;; directly. Alternatively, the uncompressed file could also be present in +;; pciutils or the direct source of pci.ids could be made available +;; separately, see: https://pci-ids.ucw.cz/ +(define-public pciutils-no-zlib + (hidden-package + (package + (inherit pciutils) + (arguments + (substitute-keyword-arguments (package-arguments pciutils) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'configure 'disable-zlib + ;; remove zlib from Makefile to have uncompressed pci.ids + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "Makefile" + (("^ZLIB := .*$") + "ZLIB := no\n"))))))))))) -- 2.34.0