+
+(define-public atop
+ (package
+ (name "atop")
+ (version "2.5.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://www.atoptool.nl/download/atop-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0crzz4i2nabyh7d6xg7fvl65qls87nbca5ihidp3nijhrrbi14ab"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no test suite
+ #:make-flags
+ (list (string-append "CC=" ,(cc-for-target))
+ ;; The installer requires a choice between systemd or SysV.
+ "systemdinstall"
+ (string-append "DESTDIR=" (assoc-ref %outputs "out"))
+ (string-append "BINPATH=/bin")
+ (string-append "SBINPATH=/sbin")
+ (string-append "SYSDPATH=/etc/systemd/system")
+ (string-append "PMPATHD=/etc/systemd/system-sleep")
+ (string-append "MAN1PATH=/share/man/man1")
+ (string-append "MAN5PATH=/share/man/man5")
+ (string-append "MAN8PATH=/share/man/man8")
+ ;; Or else it tries to create /var/log/atop...
+ (string-append "LOGPATH="))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; No ./configure script
+ (add-before 'build 'patch-build
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "Makefile"
+ ;; We don't need to chown things in the build environment.
+ (("chown.*$") "")
+ ;; We can't toggle the setuid bit in the build environment.
+ (("chmod 04711") "chmod 0711")
+ ;; Otherwise, it creates a blank configuration file as a "default".
+ (("touch.*DEFPATH)/atop") "")
+ (("chmod.*DEFPATH)/atop") ""))
+ #t)))))
+ (inputs
+ `(("ncurses" ,ncurses)
+ ("python" ,python-wrapper) ; for `atopgpud`
+ ("zlib" ,zlib)))
+ (home-page "https://www.atoptool.nl/")
+ (synopsis "Linux performance monitoring console")
+ (description "Atop is an ASCII full-screen performance monitor for Linux
+that is capable of reporting the activity of all processes (even processes have
+finished during the monitoring interval), daily logging of system and process
+activity for long-term analysis, highlighting overloaded system resources by
+using colors, etc. At regular intervals, it shows system-level activity related
+to the CPU, memory, swap, disks (including LVM) and network layers, and for
+every process (and thread) it shows e.g. the CPU utilization, memory growth,
+disk utilization, priority, username, state, and exit code.")
+ (license license:gpl2+)))
+
+;; TODO: Unvendor u-root (pkg: forth, golang, testutil).
+(define fiano
+ (package
+ (name "fiano")
+ (version "5.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/linuxboot/fiano.git")
+ (commit (string-append "v" version))))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "03ihdwwhb7g6bihx141cn0924sjs5ps6q3ps58pk1cg0g0srrr9h"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file-recursively "vendor/golang.org")
+ (delete-file-recursively "vendor/github.com")
+ #t))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/linuxboot/fiano"
+ #:unpack-path "github.com/linuxboot/fiano"))
+ (native-inputs
+ `())
+ (inputs
+ `(("go-golang-org-x-text" ,go-golang-org-x-text)
+ ("go-github.com-ulikunitz-xz" ,go-github.com-ulikunitz-xz)))
+ (synopsis "UEFI image editor")
+ (description "This package provides a command-line UEFI image editor.")
+ (home-page "https://github.com/linuxboot/fiano")
+ (license license:bsd-3)))
+
+(define-public fiano-utk
+ (package
+ (inherit fiano)
+ (name "fiano-utk")
+ (arguments
+ `(#:import-path "github.com/linuxboot/fiano/cmds/utk"
+ #:unpack-path "github.com/linuxboot/fiano"))))
+
+(define-public fiano-fmap
+ (package
+ (inherit fiano)
+ (name "fiano-fmap")
+ (arguments
+ `(#:import-path "github.com/linuxboot/fiano/cmds/fmap"
+ #:unpack-path "github.com/linuxboot/fiano"))))
+
+(define-public novena-eeprom
+ (package
+ (name "novena-eeprom")
+ (version "2.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/xobs/novena-eeprom.git")
+ (commit (string-append "v" version))))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "00pd71mg0g20v0820ggp3ghf9nyj5s4wavaz9mkmrmsr91hcnf7i"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; No tests exist
+ #:make-flags
+ (list (string-append "CC=" ,(cc-for-target)))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (out-bin (string-append out "/bin"))
+ (out-share-man (string-append out "/share/man/man8")))
+ (install-file "novena-eeprom" out-bin)
+ (install-file "novena-eeprom.8" out-share-man)))))))
+ (inputs
+ `(("i2c-tools" ,i2c-tools)))
+ (synopsis "Novena EEPROM editor")
+ (description "This package provides an editor for the Novena EEPROM.
+Novena boards contain a device-dependent descriptive EEPROM that defines
+various parameters such as serial number, MAC address, and featureset.
+This program allows you to view and manipulate this EEPROM list.")
+ (home-page "https://github.com/xobs/novena-eeprom/")
+ (supported-systems '("armhf-linux"))
+ (license license:bsd-3)))