hardware.scm 27 KB

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