gnu: Further simplify package inputs.
[jackhill/guix/guix.git] / gnu / packages / hardware.scm
CommitLineData
aadd1d24 1;;; GNU Guix --- Functional package management for GNU
e1f223c5 2;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
01782ad0 3;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
22df0a1f 4;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
ec732a46 5;;; Copyright © 2021 Evgeny Pisemsky <evgeny@pisemsky.com>
192cb790 6;;; Copyright © 2021 Léo Le Bouter <lle-bout@zaclys.net>
7c3cefde 7;;; Copyright © 2021 Denis Carikli <GNUtoo@cyberdimension.org>
7ba5ce94
RG
8;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
9;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
0cd05b5e 10;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
aadd1d24
TGR
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages hardware)
02ee43e4 28 #:use-module (gnu packages admin)
22a98cda 29 #:use-module (gnu packages autotools)
02ee43e4 30 #:use-module (gnu packages bash)
aadd1d24 31 #:use-module (gnu packages compression)
02ee43e4 32 #:use-module (gnu packages check)
febd19da 33 #:use-module (gnu packages cpp)
02ee43e4 34 #:use-module (gnu packages crypto)
34861ac8 35 #:use-module (gnu packages curl)
02ee43e4 36 #:use-module (gnu packages documentation)
7ba5ce94 37 #:use-module (gnu packages flex)
5eff4380 38 #:use-module (gnu packages gcc)
192cb790 39 #:use-module (gnu packages gettext)
aadd1d24 40 #:use-module (gnu packages glib)
ec732a46 41 #:use-module (gnu packages gtk)
aadd1d24
TGR
42 #:use-module (gnu packages libusb)
43 #:use-module (gnu packages linux)
0ba0ab81 44 #:use-module (gnu packages ncurses)
02ee43e4 45 #:use-module (gnu packages openldap)
7c3cefde 46 #:use-module (gnu packages pciutils)
192cb790 47 #:use-module (gnu packages perl)
aadd1d24 48 #:use-module (gnu packages pkg-config)
02ee43e4
BW
49 #:use-module (gnu packages polkit)
50 #:use-module (gnu packages protobuf)
192cb790 51 #:use-module (gnu packages python)
7c3cefde
DGC
52 #:use-module (gnu packages python-web)
53 #:use-module (gnu packages python-xyz)
9c172059 54 #:use-module (gnu packages qt)
34861ac8 55 #:use-module (gnu packages tls)
7ba5ce94 56 #:use-module (gnu packages virtualization)
34861ac8 57 #:use-module (gnu packages web)
aadd1d24 58 #:use-module (gnu packages xdisorg)
22df0a1f 59 #:use-module (gnu packages xml)
aadd1d24 60 #:use-module (gnu packages xorg)
9c172059 61 #:use-module (guix build-system cmake)
aadd1d24 62 #:use-module (guix build-system gnu)
0cd05b5e 63 #:use-module (guix build-system meson)
7c3cefde 64 #:use-module (guix build-system python)
aadd1d24 65 #:use-module (guix download)
0ba0ab81 66 #:use-module (guix git-download)
7c3cefde 67 #:use-module (guix svn-download)
aadd1d24 68 #:use-module ((guix licenses) #:prefix license:)
907b9dc8
TGR
69 #:use-module (guix packages)
70 #:use-module (guix utils))
aadd1d24
TGR
71
72;; This is a module for packages related to physical hardware that don't (yet)
73;; have a more specific home like gps.scm, security-token.scm, &c.
74
7ba5ce94
RG
75(define-public hwinfo
76 (package
77 (name "hwinfo")
696ecdf0 78 (version "21.78")
7ba5ce94
RG
79 (home-page "https://github.com/openSUSE/hwinfo")
80 (source
81 (origin
82 (method git-fetch)
83 (uri
84 (git-reference
85 (url home-page)
86 (commit version)))
87 (file-name (git-file-name name version))
88 (sha256
696ecdf0 89 (base32 "0v3smzdplh0cdvl19dw3in8gfmkhb2fgkfl60aqhn9qlbjf3p0mr"))
7ba5ce94
RG
90 (modules
91 '((guix build utils)))
92 (snippet
93 `(begin
94 ;; Remove git2log program file.
95 (delete-file "git2log")
96 ;; Remove variables that depends on git2log.
97 (substitute* "Makefile"
98 (("GIT2LOG.*\\:=.*$") "")
99 (("GITDEPS.*\\:=.*$") "")
100 (("BRANCH.*\\:=.*$") ""))
101 ;; Create version file.
102 (call-with-output-file "VERSION"
103 (lambda (port)
258a27ee 104 (format port ,version)))))))
7ba5ce94
RG
105 (build-system gnu-build-system)
106 (outputs '("out" "dev" "doc"))
107 (arguments
108 `(#:tests? #f ; no test-suite available
109 #:phases
110 (modify-phases %standard-phases
111 (add-after 'unpack 'patch
112 (lambda* (#:key outputs #:allow-other-keys)
113 (let* ((out (assoc-ref outputs "out"))
114 (dev (assoc-ref outputs "dev"))
115 (doc (assoc-ref outputs "doc"))
116 (incl-dir (string-append dev "/include"))
117 (lib-dir (string-append dev "/lib"))
118 (sbin-dir (string-append out "/sbin"))
119 (share-dir (string-append out "/share"))
120 (doc-dir (string-append doc "/share/doc")))
121 ;; Generate HTML documentation in the output "doc".
122 (mkdir-p doc-dir)
123 (substitute* "doc/libhd.doxy"
124 (("OUTPUT_DIRECTORY.*=.*libhd")
125 (string-append "OUTPUT_DIRECTORY = " doc-dir "/libhd")))
126 ;; Correct values of the version and install directories.
127 (substitute* "Makefile"
128 (("VERSION.*\\:=.*$")
129 (string-append "VERSION := " ,version "\n"))
130 (("LIBDIR.*\\?=.*$")
131 (string-append "LIBDIR ?= " lib-dir "\n"))
132 (("/usr/include") incl-dir)
133 (("/(usr|var)/(lib|lib64)") lib-dir)
134 (("/usr/sbin") sbin-dir)
135 (("/usr/share") share-dir)
136 (("\\$\\(DESTDIR\\)/sbin ") ""))
137 ;; Add output "dev" to the run-path.
138 (substitute* "Makefile.common"
139 (("-Lsrc")
140 (string-append "-Lsrc " "-Wl,-rpath=" lib-dir)))
141 ;; Correct program name of the lexical analyzer.
142 (substitute* "src/isdn/cdb/Makefile"
143 (("lex isdn_cdb.lex") "flex isdn_cdb.lex"))
144 ;; Patch pkgconfig file to point to output "dev".
145 (substitute* "hwinfo.pc.in"
146 (("/usr") dev)))))
147 (delete 'configure)
148 (replace 'build
149 (lambda _
150 (setenv "CC" ,(cc-for-target))
151 (invoke "make" "shared")
152 (invoke "make" "doc")))
153 (add-after 'install 'install-manpages
154 (lambda* (#:key outputs #:allow-other-keys)
155 (let* ((out (assoc-ref outputs "out"))
156 (man-dir (string-append out "/share/man"))
157 (man1-dir (string-append man-dir "/man1"))
158 (man8-dir (string-append man-dir "/man8")))
159 (for-each
160 (lambda (x) (install-file x man1-dir))
161 (find-files "doc" "\\.1$"))
162 (for-each
163 (lambda (y) (install-file y man8-dir))
164 (find-files "doc" "\\.8$"))))))))
165 (native-inputs
8394619b 166 (list doxygen flex perl pkg-config))
7ba5ce94
RG
167 (inputs
168 `(("libx86emu" ,libx86emu)
169 ("util-linux:lib" ,util-linux "lib")))
170 (synopsis "Hardware information tool")
171 (description "HwInfo is used to probe for the hardware present in the system.
172It can be used to generate a system overview log which can be later used for
173support.")
174 (license license:gpl2+)))
175
aadd1d24
TGR
176(define-public ddcutil
177 (package
178 (name "ddcutil")
e1f223c5 179 (version "1.1.0")
aadd1d24
TGR
180 (source
181 (origin
182 (method url-fetch)
183 (uri (string-append "https://www.ddcutil.com/tarballs/"
ec756fa5 184 "ddcutil-" version ".tar.gz"))
aadd1d24 185 (sha256
e1f223c5 186 (base32 "19kkwb9ijzn6ya3mvjanggh1c96fcc0lkbk7xnyi2qp6wsr4nhxp"))))
aadd1d24
TGR
187 (build-system gnu-build-system)
188 (native-inputs
8394619b 189 (list pkg-config))
aadd1d24 190 (inputs
8394619b
LC
191 (list eudev
192 glib
193 libdrm ; enhanced diagnostics
194 libusb ; support USB monitors
195 libx11 ; enhanced diagnostics
196 libxrandr
197 zlib))
aadd1d24
TGR
198 (home-page "https://www.ddcutil.com/")
199 (synopsis "Control external monitor settings")
200 (description
201 "ddcutil can query and modify most external monitors' settings, such as
202brightness, colour levels, and input sources. Generally speaking, any setting
203that can be changed by pressing buttons on the monitor can be modified by
204ddcutil.
205
206ddcutil communicates directly with monitors implementing the Monitor Control
207Command Set (@dfn{MCCS}). It usually does so through the the Display Data
208Channel Command Interface (@dfn{DDC/CI}) protocol on the I2C bus, but can also
209communicate over USB as per the USB Monitor Control Class Specification.
210
211One particular use case is in colour profile management. Monitor calibration
212is relative to the monitor colour settings currently in effect, e.g. red gain.
213ddcutil allows colour-related settings to be saved at the time a monitor is
214calibrated, and restored when the calibration is applied.")
215 (license (list license:bsd-3 ; FindDDCUtil.cmake
216 license:gpl2+)))) ; everything else
6e8c75b8 217
9c172059
BW
218(define-public ddcui
219 (package
220 (name "ddcui")
221 (version "0.1.2")
222 (source
223 (origin
224 (method git-fetch)
225 (uri (git-reference
226 (url "https://github.com/rockowitz/ddcui")
227 (commit (string-append "v" version))))
228 (file-name (git-file-name name version))
229 (sha256
230 (base32 "0myma1zw6dlygv3xbin662d91zcnwss10syf12q2fppkrd8qdgqf"))))
231 (build-system cmake-build-system)
232 (arguments
233 '(#:tests? #f)) ; No test suite
234 (native-inputs
8394619b 235 (list pkg-config qttools))
9c172059 236 (inputs
8394619b 237 (list ddcutil glib qtbase-5))
9c172059
BW
238 (home-page "https://www.ddcutil.com/")
239 (synopsis "Graphical user interface for ddcutil")
240 (description "ddcui is a graphical user interface for ddcutil, implemented
241using Qt. It provide a dynamic way to inspect and configure external monitors
242through the Display Data Channel Command Interface (@dfn{DDC/CI}) protocol.")
243 (license (list license:gpl2+))))
244
8fe681b9
BW
245(define-public edid-decode
246 (let ((commit "74b64180d67bb009d8d9ea1b6f18ad41aaa16396") ; 2020-04-22
247 (revision "1"))
248 (package
249 (name "edid-decode")
250 (version (git-version "0.0.0" revision commit))
251 (source
252 (origin
253 (method git-fetch)
254 (file-name (git-file-name name version))
255 (uri (git-reference
256 (url "git://linuxtv.org/edid-decode.git")
257 (commit commit)))
258 (sha256
259 (base32 "0nirp5bza08zj5d8bjgcm0p869hdg3qg3mwa7999pjdrzmn7s2ah"))))
260 (build-system gnu-build-system)
261 (arguments
262 `(#:tests? #f ; No test suite
263 #:make-flags
264 (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
265 "bindir=/bin" "mandir=/share/man")
266 #:phases
267 (modify-phases %standard-phases
268 (add-after 'unpack 'fix-cross-compilation
269 (lambda* (#:key native-inputs target #:allow-other-keys)
270 (when target
271 (substitute* "Makefile"
272 (("\\$\\(CXX\\)")
273 (string-append target "-g++"))))
274 #t))
275 (delete 'configure))))
276 (home-page "https://git.linuxtv.org/edid-decode.git/")
277 (synopsis "Decode @dfn{EDID} data in human-readable format")
278 (description "edid-decode decodes @dfn{EDID} monitor description data in
279human-readable format and checks if it conforms to the standards.")
280 (license license:expat))))
281
7c3cefde
DGC
282(define-public h-client
283 (let ((version "0.0a0")
284 (revision 138))
285 (package
286 (name "h-client")
287 (version (string-append version "-" (number->string revision)))
288 (source
289 (origin
290 (method svn-fetch)
291 (uri
292 (svn-reference
293 (url "https://svn.savannah.nongnu.org/svn/h-client/trunk/h-client")
294 (revision revision)))
295 (file-name (git-file-name name version))
296 (sha256
297 (base32 "1pdd2qhyaa5vh7z4rkpwjlby1flkwhzmp8zlglalx5y5sv95l4kp"))))
298 (build-system python-build-system)
299 (arguments
300 `(#:python ,python-2
301 ;; Tests depends on /etc/os-release which does not exist in the
302 ;; build container.
303 #:tests? #f))
304 (inputs
8394619b 305 (list python-2 python2-pycurl python2-pygtk pciutils usbutils))
7c3cefde
DGC
306 (synopsis "Graphical client for the h-node hardware database
307project")
308 (description
309 "The h-node project (https://www.h-node.org) aims to build a database of
310hardware that works with fully free operating systems.
311h-client is a GTK+ graphical client that is able to retrieves information on
312the hardware inside the computer it's running on, and on peripherals connected
313to it, and help you submit that information to the h-node project along with
314whether the hardware works with a fully free operating system or not.")
315 (home-page "https://savannah.nongnu.org/projects/h-client/")
316 (license license:gpl3+))))
317
a8b70525
TGR
318(define-public i7z
319 (let ((revision "0")
320 (commit "1a41ff13db747e962456ddbb5ccb2b7fc43ca0cb"))
321 (package
322 (name "i7z")
323 (version (git-version "0.28" revision commit))
324 (source
325 (origin
326 (method git-fetch)
327 (uri (git-reference
328 (url "https://github.com/afontenot/i7z")
329 (commit commit)))
330 (file-name (git-file-name name version))
331 (sha256
332 (base32 "0jxm63a8y1mfl1sa4mzzfs3bgnym6achj1yc0jglmp05xal16lm1"))
333 (modules '((guix build utils)))
334 (snippet
335 '(begin
336 (for-each delete-file-recursively
337 (list "src/GUI"
338 "src/perfmon-i7z"
339 "scripts"))))))
340 (build-system gnu-build-system)
341 (arguments
342 `(#:make-flags
343 (list (string-append "prefix=" (assoc-ref %outputs "out"))
344 (string-append "CC=" ,(cc-for-target)))
345 #:tests? #f ; no test suite
346 #:phases
347 (modify-phases %standard-phases
348 (delete 'configure)))) ; no configure script
349 (inputs
8394619b 350 (list ncurses))
a8b70525
TGR
351 (home-page "https://github.com/afontenot/i7z")
352 (synopsis "Thermal and C-state reporting on older Intel Core CPUs")
353 (description
354 "The @command{i7z} utility accurately measures the current frequency
355and temperature of older Intel Core (i3, i5, and i7) processors including the
356Nehalem, Sandy Bridge, and Ivy Bridge generations. Reliable support for newer
357CPUs is not guaranteed, as this package has not seen significant development
358since 2013.
359
360If your processor is supported, you'll get detailed reports on Turbo Boost and
361clock multipliers, core voltage, and time spent in different C-states. This
362information can be viewed in real time and/or logged to a file.")
2db86250 363 (supported-systems (list "x86_64-linux"))
a8b70525
TGR
364 (license license:gpl2))))
365
192cb790
LLB
366(define-public libsmbios
367 (package
368 (name "libsmbios")
369 (version "2.4.3")
370 (source
371 (origin
372 (method git-fetch)
373 (uri
374 (git-reference
375 (url (string-append "https://github.com/dell/" name))
376 (commit (string-append "v" version))))
377 (file-name (git-file-name name version))
378 (sha256
379 (base32 "0krwwydyvb9224r884y1mlmzyxhlfrcqw73vi1j8787rl0gl5a2i"))))
380 (build-system gnu-build-system)
381 (native-inputs
382 `(("autoconf" ,autoconf)
383 ("automake" ,automake)
384 ("gettext" ,gettext-minimal)
385 ("libtool" ,libtool)
386 ("pkg-config" ,pkg-config)
387 ("perl" ,perl)
388 ("python" ,python)))
389 (inputs
8394619b 390 (list libxml2))
192cb790
LLB
391 (arguments
392 `(#:phases
393 (modify-phases %standard-phases
394 (replace 'bootstrap
395 (lambda _ (invoke "autoreconf" "-vfi"))))))
396 (synopsis "Library for interacting with Dell SMBIOS tables")
397 (description
398 "libsmbios provides a library to interface with the SMBIOS tables. It
399also provides extensions for proprietary methods of interfacing with Dell
400specific SMBIOS tables.")
401 (home-page "https://github.com/dell/libsmbios")
402 (license
db74cc6a 403 (list license:osl2.1 license:gpl2+ license:bsd-3 license:boost1.0))))
192cb790 404
5eff4380
TGR
405;; Distinct from memtest86, which is obsolete.
406(define-public memtest86+
407 (package
408 (name "memtest86+")
409 ;; Update the description when/if UEFI support is released.
410 (version "5.01")
411 (source
412 (origin
413 (method url-fetch)
414 (uri (string-append "https://www.memtest.org/download/5.01/memtest86+-"
415 version ".tar.gz"))
416 (sha256
417 (base32 "0fch1l55753y6jkk0hj8f6vw4h1kinkn9ysp22dq5g9zjnvjf88l"))))
418 (build-system gnu-build-system)
419 (arguments
420 `(#:system "i686-linux" ; the result runs outside of any OS
421 #:tests? #f ; no way to test this
422 #:phases
423 (modify-phases %standard-phases
424 (delete 'configure) ; no configure script
425 (replace 'build
426 ;; The default 'make all' does wonderful things, like scp(1) a file to
427 ;; 192.168.0.12. Build the bootable images and nothing more.
428 (lambda _
429 (invoke "make"
430 "memtest" ; ELF executable
431 "memtest.bin"))) ; DOS/MBR boot sector
432 (replace 'install
433 (lambda* (#:key outputs #:allow-other-keys)
434 (let* ((out (assoc-ref outputs "out"))
435 (lib (string-append out "/lib/memtest86+"))
436 (doc (string-append out "/share/doc/memtest86+-" ,version)))
437 (for-each
438 (lambda (file)
439 (install-file file lib))
440 (list "memtest"
441 "memtest.bin"))
442 (for-each
443 (lambda (file)
444 (install-file file doc))
445 (list "FAQ"
fb541251
TGR
446 "README"))
447 #t))))))
5eff4380
TGR
448 (native-inputs
449 ;; Newer GCCs fail with a deluge of "multiple definition of `__foo'" errors.
8394619b 450 (list gcc-4.9))
5eff4380
TGR
451 (supported-systems (list "i686-linux" "x86_64-linux"))
452 (home-page "https://www.memtest.org/")
453 (synopsis "Thorough real-mode memory tester")
454 (description
455 "Memtest86+ is a thorough, stand-alone memory test for x86 systems. It
456repeatedly writes different patterns to all memory locations, reads them back
457again, and verifies whether the result is the same as what was written. This
458can help debug even intermittent and non-deterministic errors.
459
460It runs independently of any operating system, at computer boot-up, so that it
461can scan as much of your RAM as possible for hardware defects.
462
463Memtest86+ cannot currently be used on computers booted with UEFI.")
464 (license license:gpl2)))
465
fb541251
TGR
466(define-public memtester
467 (package
468 (name "memtester")
6fee3239 469 (version "4.5.1")
fb541251
TGR
470 (source
471 (origin
472 (method url-fetch)
473 ;; Even the latest release is available under 'old-versions/'.
474 (uri (string-append "http://pyropus.ca/software/memtester/old-versions/"
475 "memtester-" version ".tar.gz"))
476 (sha256
6fee3239 477 (base32 "0issrasdihav8jgsqb49cfyj0v564z8k9lyg2jrq9h3n4lwc4pqw"))))
fb541251
TGR
478 (build-system gnu-build-system)
479 (arguments
480 `(#:make-flags
907b9dc8 481 (list ,(string-append "CC=" (cc-for-target)))
fb541251
TGR
482 #:phases
483 (modify-phases %standard-phases
484 (replace 'configure
485 ;; This is a home-brewed configuration system where the cc/ld command
486 ;; lines are stored in one-line files.
487 (lambda* (#:key outputs #:allow-other-keys)
488 (let* ((out (assoc-ref outputs "out")))
489 (substitute* (list "conf-cc" "conf-ld")
490 (("^cc") "gcc"))
491 (substitute* "Makefile"
492 (("(INSTALLPATH.*=).*" _ assignment)
493 (string-append assignment out)))
494 #t)))
495 (replace 'check
496 ;; There is no test suite. Test some RAM for a single iteration.
497 (lambda _
498 (invoke "./memtester" "64K" "1"))))))
499 (home-page "http://pyropus.ca/software/memtester/")
500 (synopsis "User-space memory subsystem tester")
501 (description
502 "Memtester stress-tests the memory subsystem of your operating system and
503computer. It repeatedly writes different patterns to all memory locations,
504reads them back again, and verifies whether the result is the same as what was
505written. This can help debug even intermittent and non-deterministic errors.
506
507Memtester runs entirely in user space. This means that you don't need to reboot
508to test your memory, but also that it's not possible to test all of the RAM
509installed in the system.
510
511It can also be told to test memory starting at a particular physical address.")
512 (license license:gpl2)))
513
6e8c75b8
TGR
514(define-public msr-tools
515 (package
516 (name "msr-tools")
517 (version "1.3")
518 (source
519 (origin
520 (method url-fetch)
521 (uri (string-append "https://01.org/sites/default/files/downloads/"
522 name "/" name "-" version ".zip"))
523 (sha256
524 (base32 "07hxmddg0l31kjfmaq84ni142lbbvgq6391r8bd79wpm819pnigr"))))
525 (build-system gnu-build-system)
526 (arguments
527 `(#:make-flags
528 (list (string-append "sbindir=" (assoc-ref %outputs "out") "/sbin"))
529 #:phases
530 (modify-phases %standard-phases
531 (delete 'configure) ; no configure script
532 (add-before 'install 'create-output-directory
533 (lambda* (#:key outputs #:allow-other-keys)
534 ;; 'make install' assumes that sbindir exists.
535 (let* ((out (assoc-ref outputs "out"))
536 (sbin (string-append out "/sbin")))
537 (mkdir-p sbin)
538 #t))))
539 #:tests? #f)) ; no test suite
540 (native-inputs
8394619b 541 (list unzip))
6e8c75b8
TGR
542 ;; These registers and the CPUID instruction only exist on (most) x86 chips.
543 (supported-systems (list "i686-linux" "x86_64-linux"))
544 (home-page "https://01.org/msr-tools/")
545 (synopsis "Read and write Model-Specific Registers (@dfn{MSR})")
546 (description
547 "The MSR Tools project provides console utilities to directly access the
548Model-Specific Registers (@dfn{MSR}s) and CPU ID of Intel-compatible processors:
549
550@itemize
551@item @command{cpuid}: show identification and feature information of any CPU
552@item @command{rdmsr}: read MSRs from any CPU or all CPUs
553@item @command{wrmsr}: write to MSRs on any CPU or all CPUs
554@end itemize
555
556These tools can be used to query and modify certain low-level CPU parameters,
557such as the Turbo Boost ratio and Thermal Design Power (@dfn{TDP}) limits.
558
559MSR addresses differ (greatly) between processors, and any such modification can
560be dangerous and may void your CPU or system board's warranty.")
561 (license license:gpl2))) ; cpuid.c is gpl2, {rd,wr}msr.c are gpl2+
0ba0ab81 562
0cd05b5e
VM
563(define-public openhmd
564 (package
565 (name "openhmd")
566 (version "0.3.0")
567 (source
568 (origin
569 (method git-fetch)
570 (uri (git-reference
571 (url "https://github.com/OpenHMD/OpenHMD")
572 (commit version)))
573 (file-name (git-file-name name version))
574 (sha256
575 (base32 "1hkpdl4zgycag5k8njvqpx01apxmm8m8pvhlsxgxpqiqy9a38ccg"))))
576 (build-system meson-build-system)
577 (arguments
578 `(#:tests? #f)) ; no test target although there is a test folder
579 (native-inputs
8394619b 580 (list pkg-config))
0cd05b5e 581 (inputs
8394619b 582 (list hidapi))
0cd05b5e
VM
583 (home-page "http://www.openhmd.net/")
584 (synopsis "API and drivers for immersive technology")
585 (description "OpenHMD aims to provide an API and drivers for immersive
586technology, such as head mounted displays with built in head tracking.")
587 (license license:boost1.0)))
588
0ba0ab81
TGR
589(define-public wavemon
590 (package
591 (name "wavemon")
5685946c 592 (version "0.9.4")
0ba0ab81
TGR
593 (source
594 (origin
595 (method git-fetch)
596 (uri (git-reference
b0e7b699 597 (url "https://github.com/uoaerg/wavemon")
0ba0ab81
TGR
598 (commit (string-append "v" version))))
599 (file-name (git-file-name name version))
600 (sha256
5685946c 601 (base32 "0s3yz15vzx90fxyb8bgryksn0cr2gpz9inbcx4qjrgs7zfbm4pgh"))))
0ba0ab81
TGR
602 (build-system gnu-build-system)
603 (arguments
604 `(#:make-flags
605 (list "CC=gcc"
606 ;; Makefile.in (ab)uses $(datadir) as $(docdir). Set it to Guix's
607 ;; standard --docdir since it's only used as such.
608 (string-append "datadir=" (assoc-ref %outputs "out")
609 "/share/doc/" ,name "-" ,version))
610 #:tests? #f)) ; no tests
611 (native-inputs
8394619b 612 (list pkg-config))
0ba0ab81 613 (inputs
8394619b 614 (list libcap libnl ncurses))
0ba0ab81
TGR
615 (home-page "https://github.com/uoaerg/wavemon")
616 (synopsis "Wireless network device monitor")
617 (description
618 "Wavemon is a wireless device monitor with an interactive ncurses terminal
619interface. It can display and plot signal and noise levels in real time. It
620also reports packet statistics, device configuration, network parameters, and
621access points and other wireless clients of your wireless network hardware.
622
623Wavemon should work (with varying levels of detail and features) with any device
624supported by the Linux kernel.")
625 ;; Source file headers still say GPL2+, but the authorial intent
626 ;; (from COPYING and the F9 'about' screen) is clearly GPL3+.
627 (license license:gpl3+)))
22a98cda
JN
628
629(define-public rkdeveloptool
630 (let ((commit "6e92ebcf8b1812da02663494a68972f956e490d3")
631 (revision "0"))
632 (package
633 (name "rkdeveloptool")
634 (version (git-version "1.3" revision commit))
635 (source
636 (origin
637 (method git-fetch)
638 (uri (git-reference
b0e7b699 639 (url "https://github.com/rockchip-linux/rkdeveloptool")
22a98cda
JN
640 (commit commit)))
641 (file-name (git-file-name name version))
642 (sha256
643 (base32 "0zwrkqfxd671iy69v3q0844gfdpm1yk51i9qh2rqc969bd8glxga"))))
644 (build-system gnu-build-system)
645 (native-inputs
8394619b 646 (list autoconf automake pkg-config))
22a98cda 647 (inputs
8394619b 648 (list libusb))
22a98cda
JN
649 (home-page "https://github.com/rockchip-linux/rkdeveloptool")
650 (synopsis "Read from and write to RockChicp devices over USB")
651 (description
652 "Rkdeveloptool can read from and write to RockChip devices over USB, such
653as the Pinebook Pro.")
654 (license license:gpl2+))))
22df0a1f
BW
655
656(define-public libqb
657 (package
658 (name "libqb")
659 ;; NOTE: We are using a Release Candidate version (for 2.0) here because
660 ;; of the linker issues with the previous release.
661 (version "1.9.1")
662 (source (origin
663 (method url-fetch)
664 (uri (string-append
665 "https://github.com/ClusterLabs/libqb/releases/download/v"
666 version "/libqb-" version ".tar.xz"))
667 (sha256
668 (base32
669 "008vvw504kh40br5v2xkqavnp9vpmjvf768faqzv1d00fd53ingn"))))
670 (build-system gnu-build-system)
671 (native-inputs
e3196755 672 (list pkg-config libxml2))
22df0a1f
BW
673 (home-page "https://clusterlabs.github.io/libqb/")
674 (synopsis "Library providing high performance logging, tracing, ipc, and poll")
675 (description "Libqb is a library with the primary purpose of providing
676high-performance, reusable features for client-server architecture, such as
677logging, tracing, inter-process communication (IPC), and polling. Libqb is
678not intended to be an all-encompassing library, but instead provide focused
679APIs that are highly tuned for maximum performance for client-server
680applications.")
681 (license license:lgpl2.1)))
02ee43e4
BW
682
683(define-public usbguard
684 (package
685 (name "usbguard")
38ebe227 686 (version "0.7.8")
02ee43e4
BW
687 (source (origin
688 (method url-fetch)
689 (uri (string-append
690 "https://github.com/USBGuard/usbguard/releases/download/usbguard-"
691 version "/usbguard-" version ".tar.gz"))
692 (file-name (git-file-name name version))
693 (sha256
38ebe227 694 (base32 "1il5immqfxh2cj8wn1bfk7l42inflzgjf07yqprpz7r3lalbxc25"))))
02ee43e4
BW
695 (build-system gnu-build-system)
696 (arguments
697 `(#:phases
698 (modify-phases %standard-phases
f96ddb60
BW
699 (add-after 'unpack 'patch-build-scripts
700 (lambda* (#:key inputs #:allow-other-keys)
701 (substitute* "configure"
702 (("/usr/include/catch")
703 (string-append (assoc-ref inputs "catch") "/include")))
02ee43e4 704 ;; Do not create log directory.
f96ddb60 705 (substitute* "Makefile.in" ((".*/log/usbguard.*") ""))
02ee43e4 706 ;; Disable LDAP tests: they use 'sudo'.
f96ddb60
BW
707 (substitute* "src/Tests/Makefile.in"
708 (("\\$\\(am__append_2\\)") ""))
02ee43e4
BW
709 #t))
710 (add-after 'install 'delete-static-library
711 (lambda* (#:key outputs #:allow-other-keys)
712 ;; It can't be direclty disabled since it's needed for the tests.
713 (delete-file (string-append (assoc-ref outputs "out")
714 "/lib/libusbguard.a"))
715 #t))
716 (add-after 'install 'install-zsh-completion
717 (lambda* (#:key outputs #:allow-other-keys)
718 (let* ((out (assoc-ref outputs "out"))
719 (site-functions
720 (string-append out "/share/zsh/site-functions")))
721 (mkdir-p site-functions)
722 (copy-file "scripts/usbguard-zsh-completion"
723 (string-append site-functions "/_usbguard"))
724 #t))))
725 #:make-flags
726 (list (string-append "BASH_COMPLETION_DIR="
727 (assoc-ref %outputs "out")
728 "/etc/bash_completion.d"))
729 #:configure-flags
730 (list
731 "--localstatedir=/var"
02ee43e4
BW
732 "--enable-systemd=no"
733 "--with-ldap"
734 "--with-dbus"
735 "--with-polkit")))
736 (inputs
737 `(("audit" ,audit)
738 ("catch" ,catch-framework)
739 ("dbus-glib" ,dbus-glib)
740 ("ldap" ,openldap)
741 ("libcap-ng" ,libcap-ng)
742 ("libseccomp" ,libseccomp)
743 ("libsodium" ,libsodium)
febd19da 744 ("pegtl" ,pegtl)
02ee43e4
BW
745 ("polkit" ,polkit)
746 ("protobuf" ,protobuf)
747 ("libqb" ,libqb)))
748 (native-inputs
749 `(("asciidoc" ,asciidoc)
02ee43e4
BW
750 ("bash-completion" ,bash-completion)
751 ("gdbus-codegen" ,glib "bin")
752 ("umockdev" ,umockdev)
753 ("xmllint" ,libxml2)
754 ("xsltproc" ,libxslt)
755 ("pkg-config" ,pkg-config)))
756 (home-page "https://usbguard.github.io")
757 (synopsis "Helps to protect your computer against rogue USB devices (a.k.a. BadUSB)")
758 (description "USBGuard is a software framework for implementing USB device
759authorization policies (what kind of USB devices are authorized) as well as
760method of use policies (how a USB device may interact with the system).
761Simply put, it is a USB device whitelisting tool.")
762 (license license:gpl2)))
ec732a46
EP
763
764(define-public screentest
765 (package
766 (name "screentest")
767 (version "2.1")
768 (source
769 (origin
770 (method git-fetch)
771 (uri (git-reference
772 (url "https://github.com/TobiX/screentest")
773 (commit version)))
774 (file-name (git-file-name name version))
775 (sha256
776 (base32 "0gv3xj9sbk1wsyijfw9xjnvy8pg7j4arjnma2r2kfi18qy32wd30"))))
777 (build-system gnu-build-system)
778 (inputs
8394619b 779 (list glib gtk+-2))
ec732a46 780 (native-inputs
8394619b
LC
781 (list autoconf
782 intltool
783 libtool
784 `(,glib "bin")
785 automake
786 pkg-config))
ec732a46
EP
787 (synopsis "Simple screen testing tool")
788 (description "This is a program for testing the quality of CRT/LCD
789screens. It displays various patterns and allows you to estimate the quality
790of your CRT/LCD monitor.")
791 (home-page "https://github.com/TobiX/screentest")
792 (license license:gpl2)))
34861ac8
LLB
793
794(define-public tpm2-tss
795 (package
796 (name "tpm2-tss")
797 (version "3.0.3")
798 (source
799 (origin
800 (method url-fetch)
801 (uri (string-append "https://github.com/tpm2-software/tpm2-tss"
802 "/releases/download/" version "/tpm2-tss-" version
803 ".tar.gz"))
804 (sha256
805 (base32 "05xynpwq851fp8f5fy7ac0blvz8mr5m5cbqj3gslgbwv63kjnfbq"))))
806 (build-system gnu-build-system)
807 (native-inputs
8394619b 808 (list pkg-config))
34861ac8 809 (inputs
8394619b 810 (list curl json-c openssl))
34861ac8
LLB
811 (home-page "https://tpm2-software.github.io/")
812 (synopsis "OSS Implementation of the TCG TPM2 Software Stack (TSS2)")
813 (description
814 "This package provides the @acronym{TCG, Trusted Computing Group}
815@acronym{TSS2, TPM2 Software Stack}. The stack contains libtss2-fapi,
816libtss2-esys, libtss2-sys, libtss2-mu, libtss2-tcti-device, libtss2-tcti-swtpm
817and libtss2-tcti-mssim.")
818 (license license:bsd-2)))