1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016, 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2016, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
9 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
11 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
12 ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
15 ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
16 ;;; Copyright © 2019 Leo Famulari <leo@famulari.name>
17 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
18 ;;; Copyright © 2020 Pkill -9 <pkill9@runbox.com>
19 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
20 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
21 ;;; Copyright © 2021 Michael Rohleder <mike@rohleder.de>
23 ;;; This file is part of GNU Guix.
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38 (define-module (gnu packages disk)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages bash)
43 #:use-module (gnu packages c)
44 #:use-module (gnu packages check)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages crypto)
47 #:use-module (gnu packages cryptsetup)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages file-systems)
52 #:use-module (gnu packages file)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages gnupg)
58 #:use-module (gnu packages graphics)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages linux)
62 #:use-module (gnu packages ncurses)
63 #:use-module (gnu packages nss)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages popt)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages python-xyz)
69 #:use-module (gnu packages readline)
70 #:use-module (gnu packages samba)
71 #:use-module (gnu packages sphinx)
72 #:use-module (gnu packages sqlite)
73 #:use-module (gnu packages swig)
74 #:use-module (gnu packages terminals)
75 #:use-module (gnu packages textutils)
76 #:use-module (gnu packages vim)
77 #:use-module (gnu packages w3m)
78 #:use-module (gnu packages web)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
81 #:use-module (guix build-system gnu)
82 #:use-module (guix build-system glib-or-gtk)
83 #:use-module (guix build-system go)
84 #:use-module (guix build-system python)
85 #:use-module (guix build-system trivial)
86 #:use-module (guix build-system scons)
87 #:use-module (guix download)
88 #:use-module (guix git-download)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (guix packages)
91 #:use-module (guix utils))
93 (define-public bcache-tools
94 ;; The 1.1 release is a year old and missing new features & documentation.
95 (let ((commit "096d205a9f1be8540cbc5a468c0da8203023de70")
99 (version (git-version "1.1" revision commit))
104 (url (string-append "https://git.kernel.org/pub/scm/"
105 "linux/kernel/git/colyli/bcache-tools.git"))
107 (file-name (git-file-name name version))
109 (base32 "0r0vwg4vacz5zgsafk360xn7gi2scy01c79mkmjrdyxjfij5z3iy"))))
110 (build-system gnu-build-system)
112 `(#:tests? #f ; no test suite
114 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
115 (string-append "UDEVLIBDIR=" (assoc-ref %outputs "out")
117 (string-append "DRACUTLIBDIR=" (assoc-ref %outputs "out")
119 (string-append "CC=" ,(cc-for-target)))
121 (modify-phases %standard-phases
122 (delete 'configure) ; no configure script
123 (add-before 'install 'fix-hard-coded-file-names
125 ;; Some rules still hard-code /usr.
126 (substitute* "Makefile"
127 (("/usr") "${PREFIX}"))
129 (add-before 'install 'create-target-directories
130 (lambda* (#:key outputs #:allow-other-keys)
131 (let* ((out (assoc-ref outputs "out")))
132 (for-each (lambda (dir)
133 (mkdir-p (string-append out dir)))
134 (list "/lib/udev/rules.d"
139 `(("pkg-config" ,pkg-config)))
141 `(("util-linux:lib" ,util-linux "lib"))) ; libblkid
142 (home-page "https://bcache.evilpiepirate.org")
143 (synopsis "Tools for the Linux kernel block layer cache")
145 "This package contains user-space utilities to create and inspect bcache
146 partitions. It's rather minimal as bcache is designed to work well without
147 configuration on any system.
149 Linux's @acronym{bcache, block layer cache} lets one or more fast block devices,
150 such as flash-based @acronym{SSDs, solid state drives}, to act as a cache for
151 one or more slower (and inexpensive) devices, such as hard disk drives or
152 redundant storage arrays. In fact, bcache intends to be a superior alternative
153 to battery-backed RAID controllers.
155 Bcache is designed around the performance characteristics of SSDs and tries to
156 minimize write inflation. It's file-system agnostic and does both write-through
157 and write-back caching.")
158 (license license:gpl2))))
160 (define-public udevil
169 (url "https://github.com/IgnorantGuru/udevil")
171 (file-name (git-file-name name version))
173 (base32 "0x9mjr9abvbxzfa9mrip5264iz1qxvsl01k3ybz95q4a7xl4jcb3"))))
174 (build-system gnu-build-system)
179 (string-append "--sysconfdir="
180 (assoc-ref %outputs "out")
182 ;; udevil expects these programs to be run with uid set as root.
183 ;; user has to manually add these programs to setuid-programs.
184 ;; mount and umount are default setuid-programs in guix system.
185 "--with-mount-prog=/run/setuid-programs/mount"
186 "--with-umount-prog=/run/setuid-programs/umount"
187 "--with-losetup-prog=/run/setuid-programs/losetup"
188 "--with-setfacl-prog=/run/setuid-programs/setfacl")
190 (modify-phases %standard-phases
191 (add-after 'unpack 'remove-root-reference
193 (substitute* "src/Makefile.in"
194 (("-o root -g root") ""))
196 (add-after 'unpack 'patch-udevil-reference
197 ;; udevil expects itself to be run with uid set as root.
198 ;; devmon also expects udevil to be run with uid set as root.
199 ;; user has to manually add udevil to setuid-programs.
201 (substitute* "src/udevil.c"
202 (("/usr/bin/udevil") "/run/setuid-programs/udevil"))
203 (substitute* "src/devmon"
204 (("`which udevil 2>/dev/null`") "/run/setuid-programs/udevil"))
207 `(("intltool" ,intltool)
208 ("pkg-config" ,pkg-config)))
210 `(("cifs-utils" ,cifs-utils)
211 ("curlftpfs" ,curlftpfs)
213 ("fakeroot" ,fakeroot)
216 (synopsis "Device and file system manager")
217 (description "udevil is a command line program that mounts and unmounts
218 removable devices without a password, shows device info, and monitors device
219 changes. It can also mount ISO files, NFS, SMB, FTP, SSH and WebDAV URLs, and
220 tmpfs/ramfs filesystems.")
221 (home-page "https://ignorantguru.github.io/udevil/")
222 (license license:gpl3+)))
224 (define-public parted
230 (uri (string-append "mirror://gnu/parted/parted-"
234 "0hjkv84x1bs2qqyx1fnzjqyyqrhv7kpdbq9bgydmi99d8wi80ag1"))))
235 (build-system gnu-build-system)
238 (modify-phases %standard-phases
239 (add-after 'unpack 'fix-locales-and-python
240 (lambda* (#:key inputs #:allow-other-keys)
241 (substitute* "tests/t0251-gpt-unicode.sh"
242 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
243 (substitute* "tests/msdos-overlap"
244 (("/usr/bin/python") (which "python")))
248 ("readline" ,readline)
249 ("util-linux" ,util-linux "lib")))
251 `(("gettext" ,gettext-minimal)
254 ("e2fsprogs" ,e2fsprogs)
256 ("python-wrapper" ,python-wrapper)
257 ("util-linux" ,util-linux)))
258 (home-page "https://www.gnu.org/software/parted/")
259 (synopsis "Disk partition editor")
261 "GNU Parted is a package for creating and manipulating disk partition
262 tables. It includes a library and command-line utility.")
263 (license license:gpl3+)))
272 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
276 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
277 (build-system gnu-build-system)
279 `(("gettext" ,gettext-minimal)
281 ("util-linux" ,util-linux "lib")
283 ;; The build neglects to look for its own headers in its own tree. A next
284 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
287 (modify-phases %standard-phases
288 (add-after 'unpack 'skip-broken-header-probes
290 (substitute* "backend/configure"
291 (("gnufdisk-common.h .*") "\n"))
293 #:make-flags (list (string-append "CPPFLAGS="
294 " -I../common/include "
295 " -I../debug/include "
296 " -I../exception/include"))))
297 (home-page "https://www.gnu.org/software/fdisk/")
298 (synopsis "Low-level disk partitioning and formatting")
300 "GNU fdisk provides a GNU version of the common disk partitioning tool
301 fdisk. fdisk is used for the creation and manipulation of disk partition
302 tables, and it understands a variety of different formats.")
303 (license license:gpl3+)))
305 (define-public gptfdisk
312 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
313 version "/gptfdisk-" version ".tar.gz"))
315 (base32 "1a4c2ss6n2s6x8v11h79jykh96y46apd6i838ka0ngx58gb53ifx"))))
316 (build-system gnu-build-system)
318 `(("gettext" ,gettext-minimal)
321 ("util-linux" ,util-linux "lib"))) ;libuuid
323 `(#:test-target "test"
325 (modify-phases %standard-phases
326 (add-after 'unpack 'fix-include-directory
328 (substitute* "gptcurses.cc"
329 (("ncursesw/ncurses.h") "ncurses.h"))
331 (delete 'configure) ; no configure script
333 ;; There's no ‘make install’ target.
334 (lambda* (#:key outputs #:allow-other-keys)
335 (let* ((out (assoc-ref outputs "out"))
336 (bin (string-append out "/bin"))
337 (man (string-append out "/share/man/man8")))
338 (install-file "gdisk" bin)
339 (install-file "sgdisk" bin)
340 (install-file "cgdisk" bin)
341 (install-file "fixparts" bin)
342 (install-file "cgdisk.8" man)
343 (install-file "fixparts.8" man)
344 (install-file "gdisk.8" man)
345 (install-file "sgdisk.8" man)))))))
346 (home-page "https://www.rodsbooks.com/gdisk/")
347 (synopsis "Low-level GPT disk partitioning and formatting")
348 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
349 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
350 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
352 (license license:gpl2)))
354 (define-public ddrescue
361 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
364 (base32 "0qqh38izl5ppap9a5izf3hijh94k65s3zbfkczd4b7x04syqwlyf"))))
365 (build-system gnu-build-system)
367 `(#:configure-flags (list (string-append "CXX=" ,(cxx-for-target)))))
368 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
369 (synopsis "Data recovery utility")
370 (native-inputs `(("lzip" ,lzip)))
372 "GNU ddrescue is a fully automated data recovery tool. It copies data
373 from one file to another, working to rescue data in case of read errors. The
374 program also includes a tool for manipulating its log files, which are used
375 to recover data more efficiently by only reading the necessary blocks.")
376 (license license:gpl3+)))
378 (define-public dosfstools
386 (url "https://github.com/dosfstools/dosfstools")
387 (commit (string-append "v" version))))
388 (file-name (git-file-name name version))
390 (base32 "1xygsixmmc9l7drxylggnzkqqiks8zmlsbhg3z723ii2ak94236s"))))
391 (build-system gnu-build-system)
393 `(#:configure-flags (list "--enable-compat-symlinks")
394 #:make-flags (list (string-append "PREFIX=" %output)
397 `(("autoconf" ,autoconf)
398 ("automake" ,automake)
401 (home-page "https://github.com/dosfstools/dosfstools")
402 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
404 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
405 which respectively make and check MS-DOS FAT file systems.")
406 (license license:gpl3+)))
408 (define dosfstools/static
410 (package (inherit dosfstools))))
412 (define-public fatfsck/static
414 (name "fatfsck-static")
415 (version (package-version dosfstools))
416 (build-system trivial-build-system)
419 `(#:modules ((guix build utils))
422 (use-modules (guix build utils))
423 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
426 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
428 (with-directory-excursion bin
429 (copy-file (string-append src "/" exe) exe)
430 (remove-store-references exe)
432 ;; Add fsck.vfat symlink to match the Linux driver name.
433 (symlink exe "fsck.vfat")
435 (inputs `(("dosfstools" ,dosfstools/static)))
436 (home-page (package-home-page dosfstools))
437 (synopsis "Statically linked fsck.fat from dosfstools")
438 (description "This package provides a statically-linked @command{fsck.fat}
439 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
440 (license (package-license dosfstools))))
442 (define-public sdparm
449 (uri (string-append "http://sg.danny.cz/sg/p/"
450 "sdparm-" version ".tar.xz"))
452 (base32 "1nqjc4w2w47zavcbf5xmm53x1zbwgljaw1lpajcdi537cgy32fa8"))))
453 (build-system gnu-build-system)
454 (home-page "http://sg.danny.cz/sg/sdparm.html")
455 (synopsis "Provide access to SCSI device parameters")
457 "Sdparm reads and modifies SCSI device parameters. These devices can be
458 SCSI disks, in which case the role of @command{sdparm} is similar to its
459 namesake: the @command{hdparm} utility originally designed for ATA disks.
460 However, @command{sdparm} can be used to access parameters on any device that
461 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
462 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
463 also send commands associated with starting and stopping the media, loading
464 and unloading removable media and some other housekeeping functions.")
465 (license license:bsd-3)))
467 (define-public idle3-tools
474 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
478 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
479 (build-system gnu-build-system)
481 `(#:tests? #f ;no test suite
483 (modify-phases %standard-phases
485 #:make-flags (list "CC=gcc"
486 (string-append "manprefix=")
487 (string-append "DESTDIR="
488 (assoc-ref %outputs "out")))))
489 (home-page "http://idle3-tools.sourceforge.net")
490 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
492 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
493 present in many Western Digital hard drives. This timer is part of the
494 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
495 the default timer setting is not well suited to Linux or other *nix systems,
496 and can dramatically shorten the lifespan of the drive if left unchecked.")
497 (license license:gpl3+)))
499 (define-public gparted
506 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
507 version "/gparted-" version ".tar.gz"))
509 (base32 "06f72hqx5jf2irzsmi7lgpxxj38ncixh0acb4307wyjd4mfp343c"))))
510 (build-system glib-or-gtk-build-system)
512 ;; Tests require access to paths outside the build container, such
513 ;; as '/dev/disk/by-id'
516 `(("util-linux" ,util-linux "lib")
520 ("libxml2" ,libxml2)))
522 `(("intltool" ,intltool)
524 ("lvm2" ,lvm2) ; for tests
525 ("yelp-tools" ,yelp-tools)
526 ("pkg-config" ,pkg-config)))
527 (home-page "https://gparted.org/")
528 (synopsis "Partition editor to graphically manage disk partitions")
529 (description "GParted is a GNOME partition editor for creating,
530 reorganizing, and deleting disk partitions. It uses libparted from the parted
531 project to detect and manipulate partition tables. Optional file system tools
532 permit managing file systems not included in libparted.")
533 ;; The home page says GPLv2, but the source code says GPLv2+.
534 (license license:gpl2+)))
543 (uri (pypi-uri "pydf" version))
546 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
547 (build-system python-build-system)
548 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
549 (synopsis "Colourised @command{df} clone")
550 (description "All-singing, all-dancing, fully colourised @command{df} clone
551 written in Python. It displays the amount of disk space available on the
552 mounted file systems, using different colours for different types of file
553 systems. Output format is completely customizable.")
554 (license license:public-domain)))
564 (url "https://github.com/AltraMayor/f3")
565 (commit (string-append "v" version))))
566 (file-name (git-file-name name version))
568 (base32 "17l5vspfcgfbkqg7bakp3gql29yb05gzawm8n3im30ilzdr53678"))))
569 (build-system gnu-build-system)
571 `(#:tests? #f ; no check target
572 #:make-flags (list (string-append "CC=" ,(cc-for-target))
573 (string-append "PREFIX=" %output))
575 (modify-phases %standard-phases
576 (delete 'configure) ; no configure script
577 (add-after 'build 'build-extra
578 (lambda* (#:key make-flags #:allow-other-keys)
579 (apply invoke "make" "extra" make-flags)))
580 (add-after 'build 'install-extra
581 (lambda* (#:key make-flags #:allow-other-keys)
582 (apply invoke "make" "install-extra" make-flags))))))
586 (home-page "http://oss.digirati.com.br/f3/")
587 (synopsis "Test real capacity of flash memory cards and such.")
588 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
589 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
590 the card and then checks if can read it. It will assure you haven't been sold
591 a card with a smaller capacity than stated.")
592 (license license:gpl3+)))
594 (define-public python-parted
596 (name "python-parted")
602 (url "https://github.com/dcantrell/pyparted")
603 (commit (string-append "v" version))))
604 (file-name (git-file-name name version))
606 (base32 "01193fmkss9icjvqpw85szpk8ld1pnha7p9kqm7mpwk6rc6gi2m3"))))
607 (build-system python-build-system)
610 (modify-phases %standard-phases
612 (add-after 'install 'check
613 (lambda* (#:key outputs inputs #:allow-other-keys)
614 (add-installed-pythonpath inputs outputs)
615 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
616 (substitute* "tests/test__ped_ped.py"
617 (("\"/tmp/temp-device-\"") "self.path"))
618 (invoke "python" "-m" "unittest" "discover" "-v")
621 `(("e2fsprogs" ,e2fsprogs)
622 ("pkg-config" ,pkg-config)))
624 `(("python-six" ,python-six)))
626 `(("parted" ,parted)))
627 (home-page "https://github.com/dcantrell/pyparted")
628 (synopsis "Parted bindings for Python")
629 (description "This package provides @code{parted} bindings for Python.")
630 (license license:gpl2+)))
632 (define-public duperemove
640 (url "https://github.com/markfasheh/duperemove")
641 (commit (string-append "v" version))))
643 (base32 "1a87mka2sfzhbch2jip6wlvvs0glxq9lqwmyrp359d1rmwwmqiw9"))
644 (file-name (git-file-name name version))))
645 (build-system gnu-build-system)
647 `(("pkg-config" ,pkg-config)))
652 `(#:tests? #f ; no test suite
654 (modify-phases %standard-phases
655 (delete 'configure)) ; no configure script
656 #:make-flags (list (string-append "PREFIX=" %output)
657 (string-append "CC=" ,(cc-for-target))
658 ;; Set to <next release>dev by default.
659 (string-append "VER=" ,version))))
660 (home-page "https://github.com/markfasheh/duperemove")
661 (synopsis "Tools for de-duplicating file system data")
662 (description "Duperemove is a simple tool for finding duplicated extents
663 and submitting them for deduplication. When given a list of files it will
664 hash their contents on a block by block basis and compare those hashes to each
665 other, finding and categorizing blocks that match each other. When given the
666 @option{-d} option, duperemove will submit those extents for deduplication
667 using the Linux kernel extent-same @code{ioctl}.
669 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
670 existing hash file, duperemove will only compute hashes for those files which
671 have changed since the last run. Thus you can run duperemove repeatedly on
672 your data as it changes, without having to re-checksum unchanged data.
674 Duperemove can also take input from the @command{fdupes} program.")
675 (license license:gpl2)))
677 (define-public ranger
683 (uri (string-append "https://ranger.github.io/"
684 "ranger-" version ".tar.gz"))
687 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
688 (build-system python-build-system)
695 ("python-pytest" ,python-pytest)))
697 '( ;; The 'test' target runs developer tools like pylint, which fail.
698 #:test-target "test_pytest"
700 (modify-phases %standard-phases
701 (add-after 'configure 'wrap-program
702 ;; Tell 'ranger' where 'w3mimgdisplay' is.
703 (lambda* (#:key inputs outputs #:allow-other-keys)
704 (let* ((out (assoc-ref outputs "out"))
705 (ranger (string-append out "/bin/ranger"))
706 (w3m (assoc-ref inputs "w3m"))
707 (w3mimgdisplay (string-append w3m
708 "/libexec/w3m/w3mimgdisplay")))
710 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
713 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
714 (lambda* (#:key test-target #:allow-other-keys)
715 (invoke "make" test-target))))))
716 (home-page "https://ranger.github.io/")
717 (synopsis "Console file manager")
718 (description "ranger is a console file manager with Vi key bindings. It
719 provides a minimalistic and nice curses interface with a view on the directory
720 hierarchy. It ships with @code{rifle}, a file launcher that is good at
721 automatically finding out which program to use for what file type.")
722 (license license:gpl3)))
724 (define-public volume-key
730 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
734 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
735 (build-system gnu-build-system)
737 `(("pkg-config" ,pkg-config)
739 ("python" ,python-3))) ; used to generate the Python bindings
741 `(("cryptsetup" ,cryptsetup)
743 ("libblkid" ,util-linux "lib")
744 ("lvm2" ,lvm2) ; for "-ldevmapper"
748 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
750 (modify-phases %standard-phases
751 (add-before 'configure 'patch-python.h-path
752 (lambda* (#:key inputs #:allow-other-keys)
753 (let ((python (assoc-ref inputs "python")))
754 (substitute* "Makefile.in"
755 (("/usr/include/python") (string-append python "/include/python")))
757 (home-page "https://pagure.io/volume_key")
758 (synopsis "Manipulate storage volume encryption keys")
760 "This package provides a library for manipulating storage volume
761 encryption keys and storing them separately from volumes to handle forgotten
763 (license license:gpl2)))
772 (url "https://github.com/pmem/ndctl")
773 (commit (string-append "v" version))))
774 (file-name (git-file-name name version))
777 "1vi61bm9wyawklswh9mj9zdp28ar7r97qckwnhgiyila73fb3jx2"))))
778 (build-system gnu-build-system)
780 `(("asciidoc" ,asciidoc)
781 ("automake" ,automake)
782 ("autoconf" ,autoconf)
783 ("bash-completion" ,bash-completion)
784 ("docbook-xsl" ,docbook-xsl)
787 ("pkg-config" ,pkg-config)
789 ;; Required for offline docbook generation.
794 ("keyutils" ,keyutils)
796 ("util-linux" ,util-linux "lib")))
799 (list "--disable-asciidoctor" ; use docbook-xsl instead
802 (modify-phases %standard-phases
803 (add-after 'unpack 'patch-FHS-file-names
805 (substitute* "git-version-gen"
806 (("/bin/sh") (which "sh")))
807 (substitute* "git-version"
808 (("/bin/bash") (which "bash")))
811 (let ((out (assoc-ref %outputs "out")))
812 (list (string-append "BASH_COMPLETION_DIR=" out
813 "/share/bash-completion/completions")))))
814 (home-page "https://github.com/pmem/ndctl")
815 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
817 "This package provides a utility library for managing the
818 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
819 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
820 ;; the effective license. Note that some files under ccan/ are
821 ;; covered by BSD-3 or public domain, see the individual folders.
822 (license license:gpl2)))
824 (define-public dmraid
827 (version "1.0.0.rc16-3")
830 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
834 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
835 (build-system gnu-build-system)
836 (inputs `(("lvm2" ,lvm2)))
837 (native-inputs `(("which" ,which)))
839 `(#:tests? #f ; No tests.
840 ;; Prevent a race condition where some target would attempt to link
841 ;; libdmraid.so before it had been built as reported in
842 ;; <https://bugs.gnu.org/31999#187>.
844 #:phases (modify-phases %standard-phases
845 (add-before 'configure 'change-directory
847 (chdir (string-append ,version "/dmraid"))
848 (substitute* "make.tmpl.in"
849 (("/bin/sh") (which "sh")))
851 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
852 ;; find libdmraid.so.
853 (string-append "LDFLAGS=-Wl,-rpath="
854 (assoc-ref %outputs "out")
856 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
857 (synopsis "Device mapper RAID interface")
859 "This software supports RAID device discovery, RAID set activation, creation,
860 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
862 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
863 to create devices with respective mappings for the ATARAID sets discovered.")
864 (license license:gpl2+)))
866 (define-public libblockdev
872 (uri (string-append "https://github.com/storaged-project/"
873 "libblockdev/releases/download/"
874 version "-1/libblockdev-" version ".tar.gz"))
877 "0s0nazkpzpn4an00qghjkk9n7gdm5a8dqfr5hfnlk5mk5lma8njm"))))
878 (build-system gnu-build-system)
881 (modify-phases %standard-phases
882 (add-after 'unpack 'patch-configuration-directory
883 (lambda* (#:key outputs #:allow-other-keys)
884 (let ((out (assoc-ref outputs "out")))
885 (substitute* "src/lib/blockdev.c"
886 (("/etc/libblockdev/conf.d/" path) (string-append out path)))))))))
888 `(("gobject-introspection" ,gobject-introspection)
889 ("pkg-config" ,pkg-config)
890 ("python" ,python-wrapper)
891 ("util-linux" ,util-linux)))
893 `(("btrfs-progs" ,btrfs-progs)
894 ("cryptsetup" ,cryptsetup)
895 ("dosfstools" ,dosfstools)
900 ("libbytesize" ,libbytesize)
907 ("volume-key" ,volume-key)
908 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
910 (home-page "https://github.com/storaged-project/libblockdev")
911 (synopsis "Library for manipulating block devices")
913 "libblockdev is a C library supporting GObject introspection for
914 manipulation of block devices. It has a plugin-based architecture where each
915 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
916 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
918 (license license:lgpl2.1+)))
920 (define-public rmlint
927 (url "https://github.com/sahib/rmlint")
928 (commit (string-append "v" version))))
929 (file-name (git-file-name name version))
932 "15xfkcw1bkfyf3z8kl23k3rlv702m0h7ghqxvhniynvlwbgh6j2x"))))
933 (build-system scons-build-system)
935 `(#:scons ,scons-python2
936 #:scons-flags (list (string-append "--prefix=" %output)
937 (string-append "--actual-prefix=" %output))
938 #:tests? #f ; No tests?
940 (modify-phases %standard-phases
941 (add-after 'unpack 'scons-propagate-environment
942 (lambda* (#:key inputs #:allow-other-keys)
943 ;; TODO: `rmlint --gui` fails with
944 ;; "Failed to load shredder: No module named 'shredder'".
945 ;; The GUI might also need extra dependencies, such as
946 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
947 (substitute* "lib/cmdline.c"
948 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
950 "const char *commands[] = {\""
951 (assoc-ref inputs "python") "/bin/python"
952 "\", \"python\", NULL};")))
953 ;; By design, SCons does not, by default, propagate
954 ;; environment variables to subprocesses. See:
955 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
956 ;; Here, we modify the SConstruct file to arrange for
957 ;; environment variables to be propagated.
958 (substitute* "SConstruct"
959 (("^env = Environment\\(.*\\)" all)
962 "\nenv['ENV']=os.environ"))))))))
964 `(("pkg-config" ,pkg-config)
965 ("glib:bin" ,glib "bin")
966 ("python-sphinx" ,python-sphinx)))
968 `(("python" ,python-wrapper)
971 ("elfutils" ,elfutils)
972 ("json-glib" ,json-glib)
973 ("libblkid" ,util-linux "lib")))
974 (home-page "https://rmlint.rtfd.org")
975 (synopsis "Remove duplicates and other lint from the file system")
976 (description "@command{rmlint} finds space waste and other broken things
977 on your file system and offers to remove it. @command{rmlint} can find:
980 @item duplicate files and duplicate directories,
981 @item non-stripped binaries (i.e. binaries with debug symbols),
982 @item broken symbolic links,
983 @item empty files and directories,
984 @item files with broken user and/or group ID.
986 (license license:gpl3+)))
995 (url "https://github.com/gokcehan/lf")
996 (commit (string-append "r" version))))
997 (file-name (git-file-name name version))
1000 "1ld3q75v8rvp169w5p85z1vznqs9bhck6bm2f6fykxx16hmpb6ga"))))
1001 (build-system go-build-system)
1003 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
1004 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
1006 `(#:import-path "github.com/gokcehan/lf"))
1007 (home-page "https://github.com/gokcehan/lf")
1008 (synopsis "Console file browser similar to Ranger")
1009 (description "lf (as in \"list files\") is a terminal file manager
1010 written in Go. It is heavily inspired by ranger with some missing and
1011 extra features. Some of the missing features are deliberately omitted
1012 since they are better handled by external tools.")
1013 (license license:expat)))
1023 (string-append "mirror://sourceforge/xfe/xfe/" version "/"
1024 "xfe-" version ".tar.gz"))
1026 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs"))))
1027 (build-system gnu-build-system)
1030 (modify-phases %standard-phases
1031 (add-after 'unpack 'patch-bin-dirs
1032 (lambda* (#:key inputs #:allow-other-keys)
1033 (let* ((bash (assoc-ref inputs "bash"))
1034 (coreutils (assoc-ref inputs "coreutils"))
1035 (findutils (assoc-ref inputs "findutils"))
1036 (file-prog (assoc-ref inputs "file")))
1037 (with-directory-excursion "src"
1038 (substitute* '("FilePanel.cpp" "help.h" "SearchPanel.cpp"
1039 "startupnotification.cpp" "xfeutils.cpp"
1041 (("/bin/sh" file) (string-append bash file))
1042 (("/bin/ls" file) (string-append coreutils file))
1043 (("/usr(/bin/du)" _ file) (string-append coreutils file))
1044 (("/usr(/bin/sort)" _ file) (string-append coreutils file))
1045 (("/usr(/bin/cut)" _ file) (string-append coreutils file))
1046 (("/usr(/bin/xargs)" _ file) (string-append findutils file))
1047 (("/usr(/bin/file)" _ file) (string-append file-prog file))))
1049 (add-after 'unpack 'patch-share-dirs
1050 (lambda* (#:key outputs #:allow-other-keys)
1051 (let* ((out (assoc-ref outputs "out"))
1052 (share (string-append out "/share"))
1053 (xfe (string-append share "/xfe")))
1054 (with-directory-excursion "src"
1055 (substitute* '("foxhacks.cpp" "help.h" "xfedefs.h"
1056 "XFileExplorer.cpp")
1057 (("/(usr|opt)(/local)?/share") share)
1058 (("~/.config/xfe") xfe)))
1061 `(("intltool" ,intltool)
1062 ("pkg-config" ,pkg-config)))
1065 ("coreutils" ,coreutils)
1067 ("findutils" ,findutils)
1069 ("freetype" ,freetype)
1072 ("xcb-util" ,xcb-util)
1074 ("xrandr" ,libxrandr)))
1075 (synopsis "File Manager for X-Based Graphical Systems")
1076 (description "XFE (X File Explorer) is a file manager for X. It is based on
1077 the popular but discontinued, X Win Commander. It aims to be the file manager
1078 of choice for all light thinking Unix addicts!")
1079 (home-page "http://roland65.free.fr/xfe/")
1080 (license license:gpl2+)))
1082 (define-public hddtemp
1085 (version "0.3-beta15")
1088 (uri (string-append "mirror://savannah/hddtemp/hddtemp-"
1093 "0nzgg4nl8zm9023wp4dg007z6x3ir60rwbcapr9ks2al81c431b1"))))
1094 (build-system gnu-build-system)
1096 `(#:configure-flags (list (string-append
1098 (assoc-ref %outputs "out")
1099 "/share/hddtemp/hddtemp.db"))
1101 (modify-phases %standard-phases
1102 (add-after 'install 'install-db
1103 (lambda* (#:key inputs outputs #:allow-other-keys)
1104 (let ((target (string-append (assoc-ref outputs "out")
1105 "/share/hddtemp/hddtemp.db")))
1106 (mkdir-p (dirname target))
1107 (copy-file (assoc-ref inputs "db") target)))))))
1111 (uri "mirror://savannah/hddtemp/hddtemp.db")
1113 (base32 "1fr6qgns6qv7cr40lic5yqwkkc7yjmmgx8j0z6d93csg3smzhhya"))))))
1114 (home-page "https://savannah.nongnu.org/projects/hddtemp/")
1115 (synopsis "Report the temperature of hard drives from S.M.A.R.T. information")
1116 (description "@command{hddtemp} is a small utility that gives you the
1117 temperature of your hard drive by reading S.M.A.R.T. information (for drives
1118 that support this feature).")
1119 (license license:gpl2+)))
1121 (define-public memkind
1128 (url "https://github.com/memkind/memkind")
1129 (commit (string-append "v" version))))
1130 (file-name (git-file-name name version))
1133 "0w5hws12l167mbr4n6a6fl0mhf8mci61fsn55lh2cxz33f7q8n2x"))))
1134 (build-system gnu-build-system)
1136 `(;; memkind patched jemalloc to add je_arenalookupx,
1137 ;; je_check_reallocatex--i.e. they forked jemalloc.
1138 ;("jemalloc" ,jemalloc)
1140 ("numactl" ,numactl)))
1142 `(("autoconf" ,autoconf)
1143 ("automake" ,automake)
1144 ("libtool" ,libtool)))
1147 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1148 "/share/doc/" ,name "-" ,version))
1149 #:tests? #f ; Tests require a NUMA-enabled system.
1151 (modify-phases %standard-phases
1152 (add-before 'build 'autogen-jemalloc
1154 (with-directory-excursion "jemalloc"
1155 (substitute* "Makefile.in"
1156 (("/bin/sh") (which "sh")))
1158 (substitute* "configure"
1159 (("/bin/sh") (which "sh"))))
1161 (home-page "https://github.com/memkind/memkind")
1162 (synopsis "Heap manager with memory kinds (for NUMA)")
1163 (description "This package provides a user-extensible heap manager
1164 built on top of jemalloc which enables control of memory characteristics
1165 and a partitioning of the heap between kinds of memory (for NUMA).")
1166 (license license:bsd-3)))