+
+(define-public jc
+ (package
+ (name "jc")
+ (version "1.13.4")
+ (source
+ (origin
+ ;; The PyPI tarball lacks the test suite.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kellyjonbrazil/jc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0rwvyyrdnw43pixp8h51rncq2inc9pbbj1j2191y5si00pjw34zr"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-pygments" ,python-pygments)
+ ("python-ruamel.yaml" ,python-ruamel.yaml)
+ ("python-xmltodict" ,python-xmltodict)))
+ (home-page "https://github.com/kellyjonbrazil/jc")
+ (synopsis "Convert the output of command-line tools to JSON")
+ (description "@code{jc} JSONifies the output of many CLI tools and
+file-types for easier parsing in scripts.")
+ (license license:expat)))
+
+(define-public jtbl
+ (package
+ (name "jtbl")
+ (version "1.1.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kellyjonbrazil/jtbl")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1zzd7rd63xva50f22d1rfja4r302aizrafarhwm67vv181swvdya"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-tabulate" ,python-tabulate)))
+ (home-page "https://github.com/kellyjonbrazil/jtbl")
+ (synopsis "Command-line tool to print JSON data as a table in the terminal")
+ (description "@code{jtbl} accepts piped JSON data from stdin and outputs a
+text table representation to stdout.")
+ (license license:expat)))
+
+(define-public hosts
+ (package
+ (name "hosts")
+ (version "3.6.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/xwmx/hosts")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1ni4z89kxzgwm26hhx908g04f2h0fypy7lgfa0rvsz8d0wslgcsn"))))
+ (build-system trivial-build-system)
+ (inputs
+ `(("bats" ,bats) ;for test
+ ("awk" ,gawk)
+ ("bash" ,bash)
+ ("coreutils" ,coreutils)
+ ("diffutils" ,diffutils)
+ ("grep" ,grep)
+ ("ncurses" ,ncurses) ;tput
+ ("sed" ,sed)))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ ;; copy source
+ (copy-recursively (assoc-ref %build-inputs "source") ".")
+ ;; patch-shebang phase
+ (setenv "PATH"
+ (string-append (assoc-ref %build-inputs "bash") "/bin"
+ ":" (assoc-ref %build-inputs "awk") "/bin"
+ ":" (assoc-ref %build-inputs "coreutils") "/bin"
+ ":" (assoc-ref %build-inputs "diffutils") "/bin"
+ ":" (assoc-ref %build-inputs "grep") "/bin"
+ ":" (assoc-ref %build-inputs "ncurses") "/bin"
+ ":" (assoc-ref %build-inputs "sed") "/bin"
+ ":" "/run/setuid-programs"
+ ":" (getenv "PATH")))
+ (substitute* "hosts"
+ (("#!/usr/bin/env bash")
+ (string-append "#!" (which "bash")
+ "\nPATH=" (getenv "PATH"))))
+ ;; check phase
+ (setenv "TERM" "linux") ;set to tty for test
+ (invoke (string-append (assoc-ref %build-inputs "bats") "/bin/bats")
+ "test")
+ ;; install phase
+ (install-file "hosts" (string-append %output "/bin"))
+ (let ((bash-completion
+ (string-append %output "/etc/bash_completion.d")))
+ (mkdir-p bash-completion)
+ (copy-file "etc/hosts-completion.bash"
+ (string-append bash-completion "/hosts")))
+ (let ((zsh-completion
+ (string-append %output "/share/zsh/site-functions")))
+ (mkdir-p zsh-completion)
+ (copy-file "etc/hosts-completion.zsh"
+ (string-append zsh-completion "/_hosts")))
+ (let ((doc (string-append %output "/share/doc/" ,name "-" ,version)))
+ (mkdir-p doc)
+ (install-file "LICENSE" doc)
+ (install-file "README.md" doc))
+ #t)))
+ (home-page "https://github.com/xwmx/hosts/")
+ (synopsis "Script for editing a foreign distro's @file{/etc/hosts} file")
+ (description "Hosts is a command line program for managing
+@file{/etc/hosts} entries. On Guix System, @file{/etc/hosts} is managed from
+the system configuration; hosts only works when using the Guix package manager
+on a foreign distro. @command{hosts} works with existing hosts files and
+entries, providing commands to add, remove, comment, and search.")
+ (license license:expat)))
+
+(define-public nmrpflash
+ (package
+ (name "nmrpflash")
+ (version "0.9.14")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/jclehner/nmrpflash.git")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1fdjrxhjs96rdclbkld57xarf592slhkp79h46z833npxpn12ck1"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("libnl" ,libnl)
+ ("libpcap" ,libpcap)))
+ (arguments
+ `(#:tests? #f ; None exist
+ #:make-flags
+ (list (string-append "CC=" ,(cc-for-target))
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'install 'prepare-install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (mkdir-p (string-append (assoc-ref outputs "out") "/bin"))
+ #t)))))
+ (home-page "https://github.com/jclehner/nmrpflash")
+ (synopsis "Netgear unbrick utility")
+ (description "This package provides a utility to flash a new firmware
+image to a Netgear device. It has been tested on Netgear EX2700, EX6120,
+EX6150v2, DNG3700v2, R6100, R6220, R7000, D7000, WNR3500, R6400, R6800,
+R8000, R8500, WNDR3800, but is likely to be compatible with many other
+Netgear devices.")
+ (license license:gpl3+)))
+
+(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+)))