You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

467 lines
19 KiB

gnu: Remove ".git" from "https://github/…/….git". Until now, 'lookup-origin' and thus 'lookup-origin-revision' in (guix swh) would sometimes return #f for these because the ".git" URLs are redirects to the non-".git" URLs. Consequently, 'guix lint -c archival' would keep saying "scheduled Software Heritage archival"; likewise, the fallback download code would fail. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/aidc.scm, gnu/packages/algebra.scm, gnu/packages/android.scm, gnu/packages/animation.scm, gnu/packages/arcan.scm, gnu/packages/assembly.scm, gnu/packages/audio.scm, gnu/packages/authentication.scm, gnu/packages/avr.scm, gnu/packages/axoloti.scm, gnu/packages/backup.scm, gnu/packages/bash.scm, gnu/packages/benchmark.scm, gnu/packages/bioconductor.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/boost.scm, gnu/packages/build-tools.scm, gnu/packages/c.scm, gnu/packages/calendar.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/chez.scm, gnu/packages/clojure.scm, gnu/packages/code.scm, gnu/packages/compression.scm, gnu/packages/compton.scm, gnu/packages/coq.scm, gnu/packages/cpp.scm, gnu/packages/cran.scm, gnu/packages/crypto.scm, gnu/packages/curl.scm, gnu/packages/databases.scm, gnu/packages/datastructures.scm, gnu/packages/debug.scm, gnu/packages/disk.scm, gnu/packages/distributed.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/dns.scm, gnu/packages/docker.scm, gnu/packages/education.scm, gnu/packages/efi.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/embedded.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/erlang.scm, gnu/packages/fabric-management.scm, gnu/packages/file-systems.scm, gnu/packages/finance.scm, gnu/packages/firmware.scm, gnu/packages/flashing-tools.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/fpga.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/genealogy.scm, gnu/packages/genimage.scm, gnu/packages/geo.scm, gnu/packages/gimp.scm, gnu/packages/gl.scm, gnu/packages/gnome-xyz.scm, gnu/packages/gnome.scm, gnu/packages/gnuzilla.scm, gnu/packages/golang.scm, gnu/packages/gpodder.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/groff.scm, gnu/packages/groovy.scm, gnu/packages/gtk.scm, gnu/packages/guile-xyz.scm, gnu/packages/guile.scm, gnu/packages/hardware.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-xyz.scm, gnu/packages/hexedit.scm, gnu/packages/i2p.scm, gnu/packages/ibus.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/ipfs.scm, gnu/packages/java-graphics.scm, gnu/packages/java-maths.scm, gnu/packages/java.scm, gnu/packages/javascript.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/jupyter.scm, gnu/packages/kodi.scm, gnu/packages/language.scm, gnu/packages/lego.scm, gnu/packages/less.scm, gnu/packages/libusb.scm, gnu/packages/linux.scm, gnu/packages/lirc.scm, gnu/packages/lisp-xyz.scm, gnu/packages/llvm.scm, gnu/packages/logging.scm, gnu/packages/lolcode.scm, gnu/packages/lua.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/maths.scm, gnu/packages/maven.scm, gnu/packages/mes.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/node-xyz.scm, gnu/packages/ocaml.scm, gnu/packages/ocr.scm, gnu/packages/onc-rpc.scm, gnu/packages/opencl.scm, gnu/packages/opencog.scm, gnu/packages/pantheon.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/perl6.scm, gnu/packages/phabricator.scm, gnu/packages/popt.scm, gnu/packages/printers.scm, gnu/packages/prolog.scm, gnu/packages/protobuf.scm, gnu/packages/pulseaudio.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/qt.scm, gnu/packages/radio.scm, gnu/packages/rails.scm, gnu/packages/rdf.scm, gnu/packages/rednotebook.scm, gnu/packages/rpc.scm, gnu/packages/rsync.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/screen.scm, gnu/packages/security-token.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/shellutils.scm, gnu/packages/simh.scm, gnu/packages/sml.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/stenography.scm, gnu/packages/sync.scm, gnu/packages/syncthing.scm, gnu/packages/synergy.scm, gnu/packages/telephony.scm, gnu/packages/terminals.scm, gnu/packages/tex.scm, gnu/packages/texinfo.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tmux.scm, gnu/packages/tor.scm, gnu/packages/toys.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/virtualization.scm, gnu/packages/vlang.scm, gnu/packages/vnc.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wireservice.scm, gnu/packages/wm.scm, gnu/packages/wxwidgets.scm, gnu/packages/xdisorg.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, tests/lint.scm: Remove trailing ".git" from 'git-reference' URL.
1 year ago
gnu: Remove ".git" from "https://github/…/….git". Until now, 'lookup-origin' and thus 'lookup-origin-revision' in (guix swh) would sometimes return #f for these because the ".git" URLs are redirects to the non-".git" URLs. Consequently, 'guix lint -c archival' would keep saying "scheduled Software Heritage archival"; likewise, the fallback download code would fail. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/aidc.scm, gnu/packages/algebra.scm, gnu/packages/android.scm, gnu/packages/animation.scm, gnu/packages/arcan.scm, gnu/packages/assembly.scm, gnu/packages/audio.scm, gnu/packages/authentication.scm, gnu/packages/avr.scm, gnu/packages/axoloti.scm, gnu/packages/backup.scm, gnu/packages/bash.scm, gnu/packages/benchmark.scm, gnu/packages/bioconductor.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/boost.scm, gnu/packages/build-tools.scm, gnu/packages/c.scm, gnu/packages/calendar.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/chez.scm, gnu/packages/clojure.scm, gnu/packages/code.scm, gnu/packages/compression.scm, gnu/packages/compton.scm, gnu/packages/coq.scm, gnu/packages/cpp.scm, gnu/packages/cran.scm, gnu/packages/crypto.scm, gnu/packages/curl.scm, gnu/packages/databases.scm, gnu/packages/datastructures.scm, gnu/packages/debug.scm, gnu/packages/disk.scm, gnu/packages/distributed.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/dns.scm, gnu/packages/docker.scm, gnu/packages/education.scm, gnu/packages/efi.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/embedded.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/erlang.scm, gnu/packages/fabric-management.scm, gnu/packages/file-systems.scm, gnu/packages/finance.scm, gnu/packages/firmware.scm, gnu/packages/flashing-tools.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/fpga.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/genealogy.scm, gnu/packages/genimage.scm, gnu/packages/geo.scm, gnu/packages/gimp.scm, gnu/packages/gl.scm, gnu/packages/gnome-xyz.scm, gnu/packages/gnome.scm, gnu/packages/gnuzilla.scm, gnu/packages/golang.scm, gnu/packages/gpodder.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/groff.scm, gnu/packages/groovy.scm, gnu/packages/gtk.scm, gnu/packages/guile-xyz.scm, gnu/packages/guile.scm, gnu/packages/hardware.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-xyz.scm, gnu/packages/hexedit.scm, gnu/packages/i2p.scm, gnu/packages/ibus.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/ipfs.scm, gnu/packages/java-graphics.scm, gnu/packages/java-maths.scm, gnu/packages/java.scm, gnu/packages/javascript.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/jupyter.scm, gnu/packages/kodi.scm, gnu/packages/language.scm, gnu/packages/lego.scm, gnu/packages/less.scm, gnu/packages/libusb.scm, gnu/packages/linux.scm, gnu/packages/lirc.scm, gnu/packages/lisp-xyz.scm, gnu/packages/llvm.scm, gnu/packages/logging.scm, gnu/packages/lolcode.scm, gnu/packages/lua.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/maths.scm, gnu/packages/maven.scm, gnu/packages/mes.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/node-xyz.scm, gnu/packages/ocaml.scm, gnu/packages/ocr.scm, gnu/packages/onc-rpc.scm, gnu/packages/opencl.scm, gnu/packages/opencog.scm, gnu/packages/pantheon.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/perl6.scm, gnu/packages/phabricator.scm, gnu/packages/popt.scm, gnu/packages/printers.scm, gnu/packages/prolog.scm, gnu/packages/protobuf.scm, gnu/packages/pulseaudio.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/qt.scm, gnu/packages/radio.scm, gnu/packages/rails.scm, gnu/packages/rdf.scm, gnu/packages/rednotebook.scm, gnu/packages/rpc.scm, gnu/packages/rsync.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/screen.scm, gnu/packages/security-token.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/shellutils.scm, gnu/packages/simh.scm, gnu/packages/sml.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/stenography.scm, gnu/packages/sync.scm, gnu/packages/syncthing.scm, gnu/packages/synergy.scm, gnu/packages/telephony.scm, gnu/packages/terminals.scm, gnu/packages/tex.scm, gnu/packages/texinfo.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tmux.scm, gnu/packages/tor.scm, gnu/packages/toys.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/virtualization.scm, gnu/packages/vlang.scm, gnu/packages/vnc.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wireservice.scm, gnu/packages/wm.scm, gnu/packages/wxwidgets.scm, gnu/packages/xdisorg.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, tests/lint.scm: Remove trailing ".git" from 'git-reference' URL.
1 year ago
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  3. ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  4. ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
  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. (define-module (gnu packages hardware)
  21. #:use-module (gnu packages admin)
  22. #:use-module (gnu packages autotools)
  23. #:use-module (gnu packages bash)
  24. #:use-module (gnu packages compression)
  25. #:use-module (gnu packages check)
  26. #:use-module (gnu packages cpp)
  27. #:use-module (gnu packages crypto)
  28. #:use-module (gnu packages documentation)
  29. #:use-module (gnu packages gcc)
  30. #:use-module (gnu packages glib)
  31. #:use-module (gnu packages libusb)
  32. #:use-module (gnu packages linux)
  33. #:use-module (gnu packages ncurses)
  34. #:use-module (gnu packages openldap)
  35. #:use-module (gnu packages pkg-config)
  36. #:use-module (gnu packages polkit)
  37. #:use-module (gnu packages protobuf)
  38. #:use-module (gnu packages xdisorg)
  39. #:use-module (gnu packages xml)
  40. #:use-module (gnu packages xorg)
  41. #:use-module (guix build-system gnu)
  42. #:use-module (guix download)
  43. #:use-module (guix git-download)
  44. #:use-module ((guix licenses) #:prefix license:)
  45. #:use-module (guix packages)
  46. #:use-module (guix utils))
  47. ;; This is a module for packages related to physical hardware that don't (yet)
  48. ;; have a more specific home like gps.scm, security-token.scm, &c.
  49. (define-public ddcutil
  50. (package
  51. (name "ddcutil")
  52. (version "0.9.8")
  53. (source
  54. (origin
  55. (method url-fetch)
  56. (uri (string-append "https://www.ddcutil.com/tarballs/"
  57. "ddcutil-" version ".tar.gz"))
  58. (sha256
  59. (base32 "13ccxbqgyz4ah9jwbcylnfkgl8j3ida8xd00xkcq4xnfyyv5mg6v"))))
  60. (build-system gnu-build-system)
  61. (native-inputs
  62. `(("pkg-config" ,pkg-config)))
  63. (inputs
  64. `(("eudev" ,eudev)
  65. ("glib" ,glib)
  66. ("libdrm" ,libdrm) ; enhanced diagnostics
  67. ("libusb" ,libusb) ; support USB monitors
  68. ("libx11" ,libx11) ; enhanced diagnostics
  69. ("libxrandr" ,libxrandr)
  70. ("zlib" ,zlib)))
  71. (home-page "https://www.ddcutil.com/")
  72. (synopsis "Control external monitor settings")
  73. (description
  74. "ddcutil can query and modify most external monitors' settings, such as
  75. brightness, colour levels, and input sources. Generally speaking, any setting
  76. that can be changed by pressing buttons on the monitor can be modified by
  77. ddcutil.
  78. ddcutil communicates directly with monitors implementing the Monitor Control
  79. Command Set (@dfn{MCCS}). It usually does so through the the Display Data
  80. Channel Command Interface (@dfn{DDC/CI}) protocol on the I2C bus, but can also
  81. communicate over USB as per the USB Monitor Control Class Specification.
  82. One particular use case is in colour profile management. Monitor calibration
  83. is relative to the monitor colour settings currently in effect, e.g. red gain.
  84. ddcutil allows colour-related settings to be saved at the time a monitor is
  85. calibrated, and restored when the calibration is applied.")
  86. (license (list license:bsd-3 ; FindDDCUtil.cmake
  87. license:gpl2+)))) ; everything else
  88. (define-public edid-decode
  89. (let ((commit "74b64180d67bb009d8d9ea1b6f18ad41aaa16396") ; 2020-04-22
  90. (revision "1"))
  91. (package
  92. (name "edid-decode")
  93. (version (git-version "0.0.0" revision commit))
  94. (source
  95. (origin
  96. (method git-fetch)
  97. (file-name (git-file-name name version))
  98. (uri (git-reference
  99. (url "git://linuxtv.org/edid-decode.git")
  100. (commit commit)))
  101. (sha256
  102. (base32 "0nirp5bza08zj5d8bjgcm0p869hdg3qg3mwa7999pjdrzmn7s2ah"))))
  103. (build-system gnu-build-system)
  104. (arguments
  105. `(#:tests? #f ; No test suite
  106. #:make-flags
  107. (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
  108. "bindir=/bin" "mandir=/share/man")
  109. #:phases
  110. (modify-phases %standard-phases
  111. (add-after 'unpack 'fix-cross-compilation
  112. (lambda* (#:key native-inputs target #:allow-other-keys)
  113. (when target
  114. (substitute* "Makefile"
  115. (("\\$\\(CXX\\)")
  116. (string-append target "-g++"))))
  117. #t))
  118. (delete 'configure))))
  119. (home-page "https://git.linuxtv.org/edid-decode.git/")
  120. (synopsis "Decode @dfn{EDID} data in human-readable format")
  121. (description "edid-decode decodes @dfn{EDID} monitor description data in
  122. human-readable format and checks if it conforms to the standards.")
  123. (license license:expat))))
  124. ;; Distinct from memtest86, which is obsolete.
  125. (define-public memtest86+
  126. (package
  127. (name "memtest86+")
  128. ;; Update the description when/if UEFI support is released.
  129. (version "5.01")
  130. (source
  131. (origin
  132. (method url-fetch)
  133. (uri (string-append "https://www.memtest.org/download/5.01/memtest86+-"
  134. version ".tar.gz"))
  135. (sha256
  136. (base32 "0fch1l55753y6jkk0hj8f6vw4h1kinkn9ysp22dq5g9zjnvjf88l"))))
  137. (build-system gnu-build-system)
  138. (arguments
  139. `(#:system "i686-linux" ; the result runs outside of any OS
  140. #:tests? #f ; no way to test this
  141. #:phases
  142. (modify-phases %standard-phases
  143. (delete 'configure) ; no configure script
  144. (replace 'build
  145. ;; The default 'make all' does wonderful things, like scp(1) a file to
  146. ;; 192.168.0.12. Build the bootable images and nothing more.
  147. (lambda _
  148. (invoke "make"
  149. "memtest" ; ELF executable
  150. "memtest.bin"))) ; DOS/MBR boot sector
  151. (replace 'install
  152. (lambda* (#:key outputs #:allow-other-keys)
  153. (let* ((out (assoc-ref outputs "out"))
  154. (lib (string-append out "/lib/memtest86+"))
  155. (doc (string-append out "/share/doc/memtest86+-" ,version)))
  156. (for-each
  157. (lambda (file)
  158. (install-file file lib))
  159. (list "memtest"
  160. "memtest.bin"))
  161. (for-each
  162. (lambda (file)
  163. (install-file file doc))
  164. (list "FAQ"
  165. "README"))
  166. #t))))))
  167. (native-inputs
  168. ;; Newer GCCs fail with a deluge of "multiple definition of `__foo'" errors.
  169. `(("gcc" ,gcc-4.9)))
  170. (supported-systems (list "i686-linux" "x86_64-linux"))
  171. (home-page "https://www.memtest.org/")
  172. (synopsis "Thorough real-mode memory tester")
  173. (description
  174. "Memtest86+ is a thorough, stand-alone memory test for x86 systems. It
  175. repeatedly writes different patterns to all memory locations, reads them back
  176. again, and verifies whether the result is the same as what was written. This
  177. can help debug even intermittent and non-deterministic errors.
  178. It runs independently of any operating system, at computer boot-up, so that it
  179. can scan as much of your RAM as possible for hardware defects.
  180. Memtest86+ cannot currently be used on computers booted with UEFI.")
  181. (license license:gpl2)))
  182. (define-public memtester
  183. (package
  184. (name "memtester")
  185. (version "4.3.0")
  186. (source
  187. (origin
  188. (method url-fetch)
  189. ;; Even the latest release is available under 'old-versions/'.
  190. (uri (string-append "http://pyropus.ca/software/memtester/old-versions/"
  191. "memtester-" version ".tar.gz"))
  192. (sha256
  193. (base32 "127xymmyzb9r6dxqrwd69v7gf8csv8kv7fjvagbglf3wfgyy5pzr"))))
  194. (build-system gnu-build-system)
  195. (arguments
  196. `(#:make-flags
  197. (list ,(string-append "CC=" (cc-for-target)))
  198. #:phases
  199. (modify-phases %standard-phases
  200. (replace 'configure
  201. ;; This is a home-brewed configuration system where the cc/ld command
  202. ;; lines are stored in one-line files.
  203. (lambda* (#:key outputs #:allow-other-keys)
  204. (let* ((out (assoc-ref outputs "out")))
  205. (substitute* (list "conf-cc" "conf-ld")
  206. (("^cc") "gcc"))
  207. (substitute* "Makefile"
  208. (("(INSTALLPATH.*=).*" _ assignment)
  209. (string-append assignment out)))
  210. #t)))
  211. (replace 'check
  212. ;; There is no test suite. Test some RAM for a single iteration.
  213. (lambda _
  214. (invoke "./memtester" "64K" "1"))))))
  215. (home-page "http://pyropus.ca/software/memtester/")
  216. (synopsis "User-space memory subsystem tester")
  217. (description
  218. "Memtester stress-tests the memory subsystem of your operating system and
  219. computer. It repeatedly writes different patterns to all memory locations,
  220. reads them back again, and verifies whether the result is the same as what was
  221. written. This can help debug even intermittent and non-deterministic errors.
  222. Memtester runs entirely in user space. This means that you don't need to reboot
  223. to test your memory, but also that it's not possible to test all of the RAM
  224. installed in the system.
  225. It can also be told to test memory starting at a particular physical address.")
  226. (license license:gpl2)))
  227. (define-public msr-tools
  228. (package
  229. (name "msr-tools")
  230. (version "1.3")
  231. (source
  232. (origin
  233. (method url-fetch)
  234. (uri (string-append "https://01.org/sites/default/files/downloads/"
  235. name "/" name "-" version ".zip"))
  236. (sha256
  237. (base32 "07hxmddg0l31kjfmaq84ni142lbbvgq6391r8bd79wpm819pnigr"))))
  238. (build-system gnu-build-system)
  239. (arguments
  240. `(#:make-flags
  241. (list (string-append "sbindir=" (assoc-ref %outputs "out") "/sbin"))
  242. #:phases
  243. (modify-phases %standard-phases
  244. (delete 'configure) ; no configure script
  245. (add-before 'install 'create-output-directory
  246. (lambda* (#:key outputs #:allow-other-keys)
  247. ;; 'make install' assumes that sbindir exists.
  248. (let* ((out (assoc-ref outputs "out"))
  249. (sbin (string-append out "/sbin")))
  250. (mkdir-p sbin)
  251. #t))))
  252. #:tests? #f)) ; no test suite
  253. (native-inputs
  254. `(("unzip" ,unzip)))
  255. ;; These registers and the CPUID instruction only exist on (most) x86 chips.
  256. (supported-systems (list "i686-linux" "x86_64-linux"))
  257. (home-page "https://01.org/msr-tools/")
  258. (synopsis "Read and write Model-Specific Registers (@dfn{MSR})")
  259. (description
  260. "The MSR Tools project provides console utilities to directly access the
  261. Model-Specific Registers (@dfn{MSR}s) and CPU ID of Intel-compatible processors:
  262. @itemize
  263. @item @command{cpuid}: show identification and feature information of any CPU
  264. @item @command{rdmsr}: read MSRs from any CPU or all CPUs
  265. @item @command{wrmsr}: write to MSRs on any CPU or all CPUs
  266. @end itemize
  267. These tools can be used to query and modify certain low-level CPU parameters,
  268. such as the Turbo Boost ratio and Thermal Design Power (@dfn{TDP}) limits.
  269. MSR addresses differ (greatly) between processors, and any such modification can
  270. be dangerous and may void your CPU or system board's warranty.")
  271. (license license:gpl2))) ; cpuid.c is gpl2, {rd,wr}msr.c are gpl2+
  272. (define-public wavemon
  273. (package
  274. (name "wavemon")
  275. (version "0.9.1")
  276. (source
  277. (origin
  278. (method git-fetch)
  279. (uri (git-reference
  280. (url "https://github.com/uoaerg/wavemon")
  281. (commit (string-append "v" version))))
  282. (file-name (git-file-name name version))
  283. (sha256
  284. (base32 "109ycwnjjqc2vpnd8b86njfifczlxglnyv4rh2qmbn2i5nw2wryg"))))
  285. (build-system gnu-build-system)
  286. (arguments
  287. `(#:make-flags
  288. (list "CC=gcc"
  289. ;; Makefile.in (ab)uses $(datadir) as $(docdir). Set it to Guix's
  290. ;; standard --docdir since it's only used as such.
  291. (string-append "datadir=" (assoc-ref %outputs "out")
  292. "/share/doc/" ,name "-" ,version))
  293. #:tests? #f)) ; no tests
  294. (native-inputs
  295. `(("pkg-config" ,pkg-config)))
  296. (inputs
  297. `(("libcap" ,libcap)
  298. ("libnl" ,libnl)
  299. ("ncurses" ,ncurses)))
  300. (home-page "https://github.com/uoaerg/wavemon")
  301. (synopsis "Wireless network device monitor")
  302. (description
  303. "Wavemon is a wireless device monitor with an interactive ncurses terminal
  304. interface. It can display and plot signal and noise levels in real time. It
  305. also reports packet statistics, device configuration, network parameters, and
  306. access points and other wireless clients of your wireless network hardware.
  307. Wavemon should work (with varying levels of detail and features) with any device
  308. supported by the Linux kernel.")
  309. ;; Source file headers still say GPL2+, but the authorial intent
  310. ;; (from COPYING and the F9 'about' screen) is clearly GPL3+.
  311. (license license:gpl3+)))
  312. (define-public rkdeveloptool
  313. (let ((commit "6e92ebcf8b1812da02663494a68972f956e490d3")
  314. (revision "0"))
  315. (package
  316. (name "rkdeveloptool")
  317. (version (git-version "1.3" revision commit))
  318. (source
  319. (origin
  320. (method git-fetch)
  321. (uri (git-reference
  322. (url "https://github.com/rockchip-linux/rkdeveloptool")
  323. (commit commit)))
  324. (file-name (git-file-name name version))
  325. (sha256
  326. (base32 "0zwrkqfxd671iy69v3q0844gfdpm1yk51i9qh2rqc969bd8glxga"))))
  327. (build-system gnu-build-system)
  328. (native-inputs
  329. `(("autoconf" ,autoconf)
  330. ("automake" ,automake)
  331. ("pkg-config" ,pkg-config)))
  332. (inputs
  333. `(("libusb" ,libusb)))
  334. (home-page "https://github.com/rockchip-linux/rkdeveloptool")
  335. (synopsis "Read from and write to RockChicp devices over USB")
  336. (description
  337. "Rkdeveloptool can read from and write to RockChip devices over USB, such
  338. as the Pinebook Pro.")
  339. (license license:gpl2+))))
  340. (define-public libqb
  341. (package
  342. (name "libqb")
  343. ;; NOTE: We are using a Release Candidate version (for 2.0) here because
  344. ;; of the linker issues with the previous release.
  345. (version "1.9.1")
  346. (source (origin
  347. (method url-fetch)
  348. (uri (string-append
  349. "https://github.com/ClusterLabs/libqb/releases/download/v"
  350. version "/libqb-" version ".tar.xz"))
  351. (sha256
  352. (base32
  353. "008vvw504kh40br5v2xkqavnp9vpmjvf768faqzv1d00fd53ingn"))))
  354. (build-system gnu-build-system)
  355. (native-inputs
  356. `(("pkg-config" ,pkg-config)
  357. ("xmllint" ,libxml2)))
  358. (home-page "https://clusterlabs.github.io/libqb/")
  359. (synopsis "Library providing high performance logging, tracing, ipc, and poll")
  360. (description "Libqb is a library with the primary purpose of providing
  361. high-performance, reusable features for client-server architecture, such as
  362. logging, tracing, inter-process communication (IPC), and polling. Libqb is
  363. not intended to be an all-encompassing library, but instead provide focused
  364. APIs that are highly tuned for maximum performance for client-server
  365. applications.")
  366. (license license:lgpl2.1)))
  367. (define-public usbguard
  368. (package
  369. (name "usbguard")
  370. (version "0.7.8")
  371. (source (origin
  372. (method url-fetch)
  373. (uri (string-append
  374. "https://github.com/USBGuard/usbguard/releases/download/usbguard-"
  375. version "/usbguard-" version ".tar.gz"))
  376. (file-name (git-file-name name version))
  377. (sha256
  378. (base32 "1il5immqfxh2cj8wn1bfk7l42inflzgjf07yqprpz7r3lalbxc25"))))
  379. (build-system gnu-build-system)
  380. (arguments
  381. `(#:phases
  382. (modify-phases %standard-phases
  383. (add-after 'unpack 'patch-build-scripts
  384. (lambda* (#:key inputs #:allow-other-keys)
  385. (substitute* "configure"
  386. (("/usr/include/catch")
  387. (string-append (assoc-ref inputs "catch") "/include")))
  388. ;; Do not create log directory.
  389. (substitute* "Makefile.in" ((".*/log/usbguard.*") ""))
  390. ;; Disable LDAP tests: they use 'sudo'.
  391. (substitute* "src/Tests/Makefile.in"
  392. (("\\$\\(am__append_2\\)") ""))
  393. #t))
  394. (add-after 'install 'delete-static-library
  395. (lambda* (#:key outputs #:allow-other-keys)
  396. ;; It can't be direclty disabled since it's needed for the tests.
  397. (delete-file (string-append (assoc-ref outputs "out")
  398. "/lib/libusbguard.a"))
  399. #t))
  400. (add-after 'install 'install-zsh-completion
  401. (lambda* (#:key outputs #:allow-other-keys)
  402. (let* ((out (assoc-ref outputs "out"))
  403. (site-functions
  404. (string-append out "/share/zsh/site-functions")))
  405. (mkdir-p site-functions)
  406. (copy-file "scripts/usbguard-zsh-completion"
  407. (string-append site-functions "/_usbguard"))
  408. #t))))
  409. #:make-flags
  410. (list (string-append "BASH_COMPLETION_DIR="
  411. (assoc-ref %outputs "out")
  412. "/etc/bash_completion.d"))
  413. #:configure-flags
  414. (list
  415. "--localstatedir=/var"
  416. "--enable-systemd=no"
  417. "--with-ldap"
  418. "--with-dbus"
  419. "--with-polkit")))
  420. (inputs
  421. `(("audit" ,audit)
  422. ("catch" ,catch-framework)
  423. ("dbus-glib" ,dbus-glib)
  424. ("ldap" ,openldap)
  425. ("libcap-ng" ,libcap-ng)
  426. ("libseccomp" ,libseccomp)
  427. ("libsodium" ,libsodium)
  428. ("pegtl" ,pegtl)
  429. ("polkit" ,polkit)
  430. ("protobuf" ,protobuf)
  431. ("libqb" ,libqb)))
  432. (native-inputs
  433. `(("asciidoc" ,asciidoc)
  434. ("bash-completion" ,bash-completion)
  435. ("gdbus-codegen" ,glib "bin")
  436. ("umockdev" ,umockdev)
  437. ("xmllint" ,libxml2)
  438. ("xsltproc" ,libxslt)
  439. ("pkg-config" ,pkg-config)))
  440. (home-page "https://usbguard.github.io")
  441. (synopsis "Helps to protect your computer against rogue USB devices (a.k.a. BadUSB)")
  442. (description "USBGuard is a software framework for implementing USB device
  443. authorization policies (what kind of USB devices are authorized) as well as
  444. method of use policies (how a USB device may interact with the system).
  445. Simply put, it is a USB device whitelisting tool.")
  446. (license license:gpl2)))