1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages pciutils)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages pkg-config)
28 #:use-module (gnu packages linux)
29 #:use-module (gnu packages base))
31 (define-public pciutils
38 "mirror://kernel.org/software/utils/pciutils/pciutils-"
42 "1q39hh8scgvqppk1clzjh7yiq5p2r0knv52g3qzmdhsir4f47h7w"))))
43 (build-system gnu-build-system)
46 (modify-phases %standard-phases
48 (lambda* (#:key outputs #:allow-other-keys)
49 ;; There's no 'configure' script, just a raw makefile.
50 (substitute* "Makefile"
52 (string-append "PREFIX := " (assoc-ref outputs "out")
55 ;; By default the thing tries to automatically
56 ;; determine whether to use $prefix/man or
57 ;; $prefix/share/man, and wrongly so.
58 (string-append "MANDIR := " (assoc-ref outputs "out")
62 ;; Build libpciutils.so.
65 ;; Ask for zlib support, for 'pci.ids.gz' decompression.
69 ;; Installation directory of 'pci.ids.gz'.
70 "IDSDIR = $(SHAREDIR)/hwdata\n"))
73 (lambda* (#:key outputs #:allow-other-keys)
74 ;; Install the commands, library, and .pc files.
75 (invoke "make" "install" "install-lib"))))
77 ;; Make sure programs have an RPATH so they can find libpciutils.so.
78 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
79 (assoc-ref %outputs "out") "/lib"))
85 ("pkg-config" ,pkg-config)))
89 (home-page "https://mj.ucw.cz/sw/pciutils/")
90 (synopsis "Programs for inspecting and manipulating PCI devices")
92 "The PCI Utilities are a collection of programs for inspecting and
93 manipulating configuration of PCI devices, all based on a common portable
94 library libpci which offers access to the PCI configuration space on a variety
95 of operating systems. This includes the @command{lspci} and @command{setpci}
97 (license license:gpl2+)))