;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
(define-module (gnu packages hardware)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
#:use-module (guix build-system gnu)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages))
(define-public ddcutil
(package
(name "ddcutil")
- (version "0.9.1")
+ (version "0.9.8")
(source
(origin
(method url-fetch)
(uri (string-append "https://www.ddcutil.com/tarballs/"
- name "-" version ".tar.gz"))
+ "ddcutil-" version ".tar.gz"))
(sha256
- (base32 "1b4bm3zhk5vnad6fxf0mn8nrlj3fngifl7nzxgxw0n56hlv7ccv0"))))
+ (base32 "13ccxbqgyz4ah9jwbcylnfkgl8j3ida8xd00xkcq4xnfyyv5mg6v"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(license (list license:bsd-3 ; FindDDCUtil.cmake
license:gpl2+)))) ; everything else
+;; Distinct from memtest86, which is obsolete.
+(define-public memtest86+
+ (package
+ (name "memtest86+")
+ ;; Update the description when/if UEFI support is released.
+ (version "5.01")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.memtest.org/download/5.01/memtest86+-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0fch1l55753y6jkk0hj8f6vw4h1kinkn9ysp22dq5g9zjnvjf88l"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:system "i686-linux" ; the result runs outside of any OS
+ #:tests? #f ; no way to test this
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; no configure script
+ (replace 'build
+ ;; The default 'make all' does wonderful things, like scp(1) a file to
+ ;; 192.168.0.12. Build the bootable images and nothing more.
+ (lambda _
+ (invoke "make"
+ "memtest" ; ELF executable
+ "memtest.bin"))) ; DOS/MBR boot sector
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib/memtest86+"))
+ (doc (string-append out "/share/doc/memtest86+-" ,version)))
+ (for-each
+ (lambda (file)
+ (install-file file lib))
+ (list "memtest"
+ "memtest.bin"))
+ (for-each
+ (lambda (file)
+ (install-file file doc))
+ (list "FAQ"
+ "README"))
+ #t))))))
+ (native-inputs
+ ;; Newer GCCs fail with a deluge of "multiple definition of `__foo'" errors.
+ `(("gcc" ,gcc-4.9)))
+ (supported-systems (list "i686-linux" "x86_64-linux"))
+ (home-page "https://www.memtest.org/")
+ (synopsis "Thorough real-mode memory tester")
+ (description
+ "Memtest86+ is a thorough, stand-alone memory test for x86 systems. It
+repeatedly writes different patterns to all memory locations, reads them back
+again, and verifies whether the result is the same as what was written. This
+can help debug even intermittent and non-deterministic errors.
+
+It runs independently of any operating system, at computer boot-up, so that it
+can scan as much of your RAM as possible for hardware defects.
+
+Memtest86+ cannot currently be used on computers booted with UEFI.")
+ (license license:gpl2)))
+
+(define-public memtester
+ (package
+ (name "memtester")
+ (version "4.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ ;; Even the latest release is available under 'old-versions/'.
+ (uri (string-append "http://pyropus.ca/software/memtester/old-versions/"
+ "memtester-" version ".tar.gz"))
+ (sha256
+ (base32 "127xymmyzb9r6dxqrwd69v7gf8csv8kv7fjvagbglf3wfgyy5pzr"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ ;; This is a home-brewed configuration system where the cc/ld command
+ ;; lines are stored in one-line files.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (substitute* (list "conf-cc" "conf-ld")
+ (("^cc") "gcc"))
+ (substitute* "Makefile"
+ (("(INSTALLPATH.*=).*" _ assignment)
+ (string-append assignment out)))
+ #t)))
+ (replace 'check
+ ;; There is no test suite. Test some RAM for a single iteration.
+ (lambda _
+ (invoke "./memtester" "64K" "1"))))))
+ (home-page "http://pyropus.ca/software/memtester/")
+ (synopsis "User-space memory subsystem tester")
+ (description
+ "Memtester stress-tests the memory subsystem of your operating system and
+computer. It repeatedly writes different patterns to all memory locations,
+reads them back again, and verifies whether the result is the same as what was
+written. This can help debug even intermittent and non-deterministic errors.
+
+Memtester runs entirely in user space. This means that you don't need to reboot
+to test your memory, but also that it's not possible to test all of the RAM
+installed in the system.
+
+It can also be told to test memory starting at a particular physical address.")
+ (license license:gpl2)))
+
(define-public msr-tools
(package
(name "msr-tools")
MSR addresses differ (greatly) between processors, and any such modification can
be dangerous and may void your CPU or system board's warranty.")
(license license:gpl2))) ; cpuid.c is gpl2, {rd,wr}msr.c are gpl2+
+
+(define-public wavemon
+ (package
+ (name "wavemon")
+ (version "0.9.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/uoaerg/wavemon.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "109ycwnjjqc2vpnd8b86njfifczlxglnyv4rh2qmbn2i5nw2wryg"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list "CC=gcc"
+ ;; Makefile.in (ab)uses $(datadir) as $(docdir). Set it to Guix's
+ ;; standard --docdir since it's only used as such.
+ (string-append "datadir=" (assoc-ref %outputs "out")
+ "/share/doc/" ,name "-" ,version))
+ #:tests? #f)) ; no tests
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("libcap" ,libcap)
+ ("libnl" ,libnl)
+ ("ncurses" ,ncurses)))
+ (home-page "https://github.com/uoaerg/wavemon")
+ (synopsis "Wireless network device monitor")
+ (description
+ "Wavemon is a wireless device monitor with an interactive ncurses terminal
+interface. It can display and plot signal and noise levels in real time. It
+also reports packet statistics, device configuration, network parameters, and
+access points and other wireless clients of your wireless network hardware.
+
+Wavemon should work (with varying levels of detail and features) with any device
+supported by the Linux kernel.")
+ ;; Source file headers still say GPL2+, but the authorial intent
+ ;; (from COPYING and the F9 'about' screen) is clearly GPL3+.
+ (license license:gpl3+)))