gnu: Add wl-clipboard.
[jackhill/guix/guix.git] / gnu / packages / pciutils.scm
CommitLineData
42422cc2 1;;; GNU Guix --- Functional package management for GNU
841e06af 2;;; Copyright © 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
fb3c8553 3;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
280b62b0 4;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
42422cc2
LC
5;;;
6;;; This file is part of GNU Guix.
7;;;
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.
12;;;
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.
17;;;
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/>.
20
21(define-module (gnu packages pciutils)
22 #:use-module (guix packages)
23 #:use-module (guix download)
b5b73a82 24 #:use-module ((guix licenses) #:prefix license:)
42422cc2
LC
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages pkg-config)
43ec6ca0 28 #:use-module (gnu packages linux)
ce0614dd 29 #:use-module (gnu packages base))
42422cc2
LC
30
31(define-public pciutils
32 (package
33 (name "pciutils")
e90f1d5f 34 (version "3.6.1")
42422cc2
LC
35 (source (origin
36 (method url-fetch)
37 (uri (string-append
38 "mirror://kernel.org/software/utils/pciutils/pciutils-"
fb3c8553 39 version ".tar.xz"))
42422cc2
LC
40 (sha256
41 (base32
e90f1d5f 42 "1q39hh8scgvqppk1clzjh7yiq5p2r0knv52g3qzmdhsir4f47h7w"))))
42422cc2
LC
43 (build-system gnu-build-system)
44 (arguments
0ef7a93d
EF
45 '(#:phases
46 (modify-phases %standard-phases
47 (replace 'configure
48 (lambda* (#:key outputs #:allow-other-keys)
49 ;; There's no 'configure' script, just a raw makefile.
50 (substitute* "Makefile"
51 (("^PREFIX=.*$")
52 (string-append "PREFIX := " (assoc-ref outputs "out")
53 "\n"))
54 (("^MANDIR:=.*$")
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")
59 "/share/man\n"))
841e06af 60
0ef7a93d
EF
61 (("^SHARED=.*$")
62 ;; Build libpciutils.so.
63 "SHARED := yes\n")
64 (("^ZLIB=.*$")
841e06af
LC
65 ;; Ask for zlib support, for 'pci.ids.gz' decompression.
66 "ZLIB := yes\n")
67
68 (("^IDSDIR=.*$")
69 ;; Installation directory of 'pci.ids.gz'.
70 "IDSDIR = $(SHAREDIR)/hwdata\n"))
71 #t))
0ef7a93d
EF
72 (replace 'install
73 (lambda* (#:key outputs #:allow-other-keys)
74 ;; Install the commands, library, and .pc files.
71a02196 75 (invoke "make" "install" "install-lib"))))
42422cc2
LC
76
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"))
80
81 ;; No test suite.
82 #:tests? #f))
83 (native-inputs
84 `(("which" ,which)
85 ("pkg-config" ,pkg-config)))
86 (inputs
43ec6ca0
EF
87 `(("kmod" ,kmod)
88 ("zlib" ,zlib)))
8af77fe9 89 (home-page "https://mj.ucw.cz/sw/pciutils/")
42422cc2
LC
90 (synopsis "Programs for inspecting and manipulating PCI devices")
91 (description
92 "The PCI Utilities are a collection of programs for inspecting and
93manipulating configuration of PCI devices, all based on a common portable
94library libpci which offers access to the PCI configuration space on a variety
a48da398
LC
95of operating systems. This includes the @command{lspci} and @command{setpci}
96commands.")
42422cc2 97 (license license:gpl2+)))