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 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>
22 ;;; This file is part of GNU Guix.
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37 (define-module (gnu packages disk)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages bash)
42 #:use-module (gnu packages c)
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages crypto)
46 #:use-module (gnu packages cryptsetup)
47 #:use-module (gnu packages docbook)
48 #:use-module (gnu packages documentation)
49 #:use-module (gnu packages elf)
50 #:use-module (gnu packages file-systems)
51 #:use-module (gnu packages file)
52 #:use-module (gnu packages fontutils)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages gnupg)
57 #:use-module (gnu packages graphics)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages linux)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages nss)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages popt)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages python-xyz)
68 #:use-module (gnu packages readline)
69 #:use-module (gnu packages samba)
70 #:use-module (gnu packages sphinx)
71 #:use-module (gnu packages sqlite)
72 #:use-module (gnu packages swig)
73 #:use-module (gnu packages terminals)
74 #:use-module (gnu packages textutils)
75 #:use-module (gnu packages vim)
76 #:use-module (gnu packages w3m)
77 #:use-module (gnu packages web)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
80 #:use-module (guix build-system gnu)
81 #:use-module (guix build-system glib-or-gtk)
82 #:use-module (guix build-system go)
83 #:use-module (guix build-system python)
84 #:use-module (guix build-system trivial)
85 #:use-module (guix build-system scons)
86 #:use-module (guix download)
87 #:use-module (guix git-download)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (guix packages)
90 #:use-module (guix utils))
92 (define-public bcache-tools
93 ;; The 1.1 release is a year old and missing new features & documentation.
94 (let ((commit "096d205a9f1be8540cbc5a468c0da8203023de70")
98 (version (git-version "1.1" revision commit))
103 (url (string-append "https://git.kernel.org/pub/scm/"
104 "linux/kernel/git/colyli/bcache-tools.git"))
106 (file-name (git-file-name name version))
108 (base32 "0r0vwg4vacz5zgsafk360xn7gi2scy01c79mkmjrdyxjfij5z3iy"))))
109 (build-system gnu-build-system)
111 `(#:tests? #f ; no test suite
113 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
114 (string-append "UDEVLIBDIR=" (assoc-ref %outputs "out")
116 (string-append "DRACUTLIBDIR=" (assoc-ref %outputs "out")
118 (string-append "CC=" ,(cc-for-target)))
120 (modify-phases %standard-phases
121 (delete 'configure) ; no configure script
122 (add-before 'install 'fix-hard-coded-file-names
124 ;; Some rules still hard-code /usr.
125 (substitute* "Makefile"
126 (("/usr") "${PREFIX}"))
128 (add-before 'install 'create-target-directories
129 (lambda* (#:key outputs #:allow-other-keys)
130 (let* ((out (assoc-ref outputs "out")))
131 (for-each (lambda (dir)
132 (mkdir-p (string-append out dir)))
133 (list "/lib/udev/rules.d"
138 `(("pkg-config" ,pkg-config)))
140 `(("util-linux:lib" ,util-linux "lib"))) ; libblkid
141 (home-page "https://bcache.evilpiepirate.org")
142 (synopsis "Tools for the Linux kernel block layer cache")
144 "This package contains user-space utilities to create and inspect bcache
145 partitions. It's rather minimal as bcache is designed to work well without
146 configuration on any system.
148 Linux's @acronym{bcache, block layer cache} lets one or more fast block devices,
149 such as flash-based @acronym{SSDs, solid state drives}, to act as a cache for
150 one or more slower (and inexpensive) devices, such as hard disk drives or
151 redundant storage arrays. In fact, bcache intends to be a superior alternative
152 to battery-backed RAID controllers.
154 Bcache is designed around the performance characteristics of SSDs and tries to
155 minimize write inflation. It's file-system agnostic and does both write-through
156 and write-back caching.")
157 (license license:gpl2))))
159 (define-public udevil
168 (url "https://github.com/IgnorantGuru/udevil")
170 (file-name (git-file-name name version))
172 (base32 "0x9mjr9abvbxzfa9mrip5264iz1qxvsl01k3ybz95q4a7xl4jcb3"))))
173 (build-system gnu-build-system)
178 (string-append "--sysconfdir="
179 (assoc-ref %outputs "out")
181 ;; udevil expects these programs to be run with uid set as root.
182 ;; user has to manually add these programs to setuid-programs.
183 ;; mount and umount are default setuid-programs in guix system.
184 "--with-mount-prog=/run/setuid-programs/mount"
185 "--with-umount-prog=/run/setuid-programs/umount"
186 "--with-losetup-prog=/run/setuid-programs/losetup"
187 "--with-setfacl-prog=/run/setuid-programs/setfacl")
189 (modify-phases %standard-phases
190 (add-after 'unpack 'remove-root-reference
192 (substitute* "src/Makefile.in"
193 (("-o root -g root") ""))
195 (add-after 'unpack 'patch-udevil-reference
196 ;; udevil expects itself to be run with uid set as root.
197 ;; devmon also expects udevil to be run with uid set as root.
198 ;; user has to manually add udevil to setuid-programs.
200 (substitute* "src/udevil.c"
201 (("/usr/bin/udevil") "/run/setuid-programs/udevil"))
202 (substitute* "src/devmon"
203 (("`which udevil 2>/dev/null`") "/run/setuid-programs/udevil"))
206 `(("intltool" ,intltool)
207 ("pkg-config" ,pkg-config)))
209 `(("cifs-utils" ,cifs-utils)
210 ("curlftpfs" ,curlftpfs)
212 ("fakeroot" ,fakeroot)
215 (synopsis "Device and file system manager")
216 (description "udevil is a command line program that mounts and unmounts
217 removable devices without a password, shows device info, and monitors device
218 changes. It can also mount ISO files, NFS, SMB, FTP, SSH and WebDAV URLs, and
219 tmpfs/ramfs filesystems.")
220 (home-page "https://ignorantguru.github.io/udevil/")
221 (license license:gpl3+)))
223 (define-public parted
229 (uri (string-append "mirror://gnu/parted/parted-"
233 "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"))))
234 (build-system gnu-build-system)
237 (modify-phases %standard-phases
238 (add-after 'unpack 'fix-locales-and-python
239 (lambda* (#:key inputs #:allow-other-keys)
240 (substitute* "tests/t0251-gpt-unicode.sh"
241 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
242 (substitute* "tests/msdos-overlap"
243 (("/usr/bin/python") (which "python")))
247 ("readline" ,readline)
248 ("util-linux" ,util-linux "lib")))
250 `(("gettext" ,gettext-minimal)
253 ("e2fsprogs" ,e2fsprogs)
256 ("util-linux" ,util-linux)))
257 (home-page "https://www.gnu.org/software/parted/")
258 (synopsis "Disk partition editor")
260 "GNU Parted is a package for creating and manipulating disk partition
261 tables. It includes a library and command-line utility.")
262 (license license:gpl3+)))
271 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
275 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
276 (build-system gnu-build-system)
278 `(("gettext" ,gettext-minimal)
280 ("util-linux" ,util-linux "lib")
282 ;; The build neglects to look for its own headers in its own tree. A next
283 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
286 (modify-phases %standard-phases
287 (add-after 'unpack 'skip-broken-header-probes
289 (substitute* "backend/configure"
290 (("gnufdisk-common.h .*") "\n"))
292 #:make-flags (list (string-append "CPPFLAGS="
293 " -I../common/include "
294 " -I../debug/include "
295 " -I../exception/include"))))
296 (home-page "https://www.gnu.org/software/fdisk/")
297 (synopsis "Low-level disk partitioning and formatting")
299 "GNU fdisk provides a GNU version of the common disk partitioning tool
300 fdisk. fdisk is used for the creation and manipulation of disk partition
301 tables, and it understands a variety of different formats.")
302 (license license:gpl3+)))
304 (define-public gptfdisk
311 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
312 version "/gptfdisk-" version ".tar.gz"))
314 (base32 "0bybgp30pqxb6x5krxazkq4drca0gz4inxj89fpyr204rn3kjz8f"))))
315 (build-system gnu-build-system)
317 `(("gettext" ,gettext-minimal)
320 ("util-linux" ,util-linux "lib"))) ;libuuid
322 `(#:test-target "test"
324 (modify-phases %standard-phases
325 (add-after 'unpack 'fix-include-directory
327 (substitute* "gptcurses.cc"
328 (("ncursesw/ncurses.h") "ncurses.h"))
330 (delete 'configure) ; no configure script
332 ;; There's no ‘make install’ target.
333 (lambda* (#:key outputs #:allow-other-keys)
334 (let* ((out (assoc-ref outputs "out"))
335 (bin (string-append out "/bin"))
336 (man (string-append out "/share/man/man8")))
337 (install-file "gdisk" bin)
338 (install-file "sgdisk" bin)
339 (install-file "cgdisk" bin)
340 (install-file "fixparts" bin)
341 (install-file "cgdisk.8" man)
342 (install-file "fixparts.8" man)
343 (install-file "gdisk.8" man)
344 (install-file "sgdisk.8" man)))))))
345 (home-page "https://www.rodsbooks.com/gdisk/")
346 (synopsis "Low-level GPT disk partitioning and formatting")
347 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
348 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
349 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
351 (license license:gpl2)))
353 (define-public ddrescue
360 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
363 (base32 "0qqh38izl5ppap9a5izf3hijh94k65s3zbfkczd4b7x04syqwlyf"))))
364 (build-system gnu-build-system)
365 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
366 (synopsis "Data recovery utility")
367 (native-inputs `(("lzip" ,lzip)))
369 "GNU ddrescue is a fully automated data recovery tool. It copies data
370 from one file to another, working to rescue data in case of read errors. The
371 program also includes a tool for manipulating its log files, which are used
372 to recover data more efficiently by only reading the necessary blocks.")
373 (license license:gpl3+)))
375 (define-public dosfstools
382 (uri (string-append "https://github.com/" name "/" name
383 "/releases/download/v" version "/"
384 name "-" version ".tar.xz"))
387 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
388 (build-system gnu-build-system)
390 `(#:configure-flags (list "--enable-compat-symlinks")
391 #:make-flags (list (string-append "PREFIX=" %output)
394 `(("xxd" ,xxd))) ; for tests
395 (home-page "https://github.com/dosfstools/dosfstools")
396 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
398 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
399 which respectively make and check MS-DOS FAT file systems.")
400 (license license:gpl3+)))
402 (define dosfstools/static
404 (package (inherit dosfstools))))
406 (define-public fatfsck/static
408 (name "fatfsck-static")
409 (version (package-version dosfstools))
410 (build-system trivial-build-system)
413 `(#:modules ((guix build utils))
416 (use-modules (guix build utils))
417 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
420 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
422 (with-directory-excursion bin
423 (copy-file (string-append src "/" exe) exe)
424 (remove-store-references exe)
426 ;; Add fsck.vfat symlink to match the Linux driver name.
427 (symlink exe "fsck.vfat")
429 (inputs `(("dosfstools" ,dosfstools/static)))
430 (home-page (package-home-page dosfstools))
431 (synopsis "Statically linked fsck.fat from dosfstools")
432 (description "This package provides a statically-linked @command{fsck.fat}
433 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
434 (license (package-license dosfstools))))
436 (define-public sdparm
443 (uri (string-append "http://sg.danny.cz/sg/p/"
444 "sdparm-" version ".tar.xz"))
446 (base32 "1nqjc4w2w47zavcbf5xmm53x1zbwgljaw1lpajcdi537cgy32fa8"))))
447 (build-system gnu-build-system)
448 (home-page "http://sg.danny.cz/sg/sdparm.html")
449 (synopsis "Provide access to SCSI device parameters")
451 "Sdparm reads and modifies SCSI device parameters. These devices can be
452 SCSI disks, in which case the role of @command{sdparm} is similar to its
453 namesake: the @command{hdparm} utility originally designed for ATA disks.
454 However, @command{sdparm} can be used to access parameters on any device that
455 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
456 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
457 also send commands associated with starting and stopping the media, loading
458 and unloading removable media and some other housekeeping functions.")
459 (license license:bsd-3)))
461 (define-public idle3-tools
468 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
472 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
473 (build-system gnu-build-system)
475 `(#:tests? #f ;no test suite
477 (modify-phases %standard-phases
479 #:make-flags (list "CC=gcc"
480 (string-append "manprefix=")
481 (string-append "DESTDIR="
482 (assoc-ref %outputs "out")))))
483 (home-page "http://idle3-tools.sourceforge.net")
484 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
486 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
487 present in many Western Digital hard drives. This timer is part of the
488 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
489 the default timer setting is not well suited to Linux or other *nix systems,
490 and can dramatically shorten the lifespan of the drive if left unchecked.")
491 (license license:gpl3+)))
493 (define-public gparted
500 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
501 version "/gparted-" version ".tar.gz"))
503 (base32 "092rgwjh1825fal6v3yafq2wr0i61hh0a2n0j4296zn0zdx7pzp2"))))
504 (build-system glib-or-gtk-build-system)
506 ;; Tests require access to paths outside the build container, such
507 ;; as '/dev/disk/by-id'
510 `(("util-linux" ,util-linux "lib")
514 ("libxml2" ,libxml2)))
516 `(("intltool" ,intltool)
518 ("lvm2" ,lvm2) ; for tests
519 ("yelp-tools" ,yelp-tools)
520 ("pkg-config" ,pkg-config)))
521 (home-page "https://gparted.org/")
522 (synopsis "Partition editor to graphically manage disk partitions")
523 (description "GParted is a GNOME partition editor for creating,
524 reorganizing, and deleting disk partitions. It uses libparted from the parted
525 project to detect and manipulate partition tables. Optional file system tools
526 permit managing file systems not included in libparted.")
527 ;; The home page says GPLv2, but the source code says GPLv2+.
528 (license license:gpl2+)))
537 (uri (pypi-uri "pydf" version))
540 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
541 (build-system python-build-system)
542 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
543 (synopsis "Colourised @command{df} clone")
544 (description "All-singing, all-dancing, fully colourised @command{df} clone
545 written in Python. It displays the amount of disk space available on the
546 mounted file systems, using different colours for different types of file
547 systems. Output format is completely customizable.")
548 (license license:public-domain)))
558 (url "https://github.com/AltraMayor/f3")
559 (commit (string-append "v" version))))
560 (file-name (git-file-name name version))
562 (base32 "17l5vspfcgfbkqg7bakp3gql29yb05gzawm8n3im30ilzdr53678"))))
563 (build-system gnu-build-system)
565 `(#:tests? #f ; no check target
566 #:make-flags (list (string-append "CC=" ,(cc-for-target))
567 (string-append "PREFIX=" %output))
569 (modify-phases %standard-phases
570 (delete 'configure) ; no configure script
571 (add-after 'build 'build-extra
572 (lambda* (#:key make-flags #:allow-other-keys)
573 (apply invoke "make" "extra" make-flags)))
574 (add-after 'build 'install-extra
575 (lambda* (#:key make-flags #:allow-other-keys)
576 (apply invoke "make" "install-extra" make-flags))))))
580 (home-page "http://oss.digirati.com.br/f3/")
581 (synopsis "Test real capacity of flash memory cards and such.")
582 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
583 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
584 the card and then checks if can read it. It will assure you haven't been sold
585 a card with a smaller capacity than stated.")
586 (license license:gpl3+)))
588 (define-public python-parted
590 (name "python-parted")
596 (url "https://github.com/dcantrell/pyparted")
597 (commit (string-append "v" version))))
598 (file-name (git-file-name name version))
600 (base32 "01193fmkss9icjvqpw85szpk8ld1pnha7p9kqm7mpwk6rc6gi2m3"))))
601 (build-system python-build-system)
604 (modify-phases %standard-phases
606 (add-after 'install 'check
607 (lambda* (#:key outputs inputs #:allow-other-keys)
608 (add-installed-pythonpath inputs outputs)
609 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
610 (substitute* "tests/test__ped_ped.py"
611 (("\"/tmp/temp-device-\"") "self.path"))
612 (invoke "python" "-m" "unittest" "discover" "-v")
615 `(("e2fsprogs" ,e2fsprogs)
616 ("pkg-config" ,pkg-config)))
618 `(("python-six" ,python-six)))
620 `(("parted" ,parted)))
621 (home-page "https://github.com/dcantrell/pyparted")
622 (synopsis "Parted bindings for Python")
623 (description "This package provides @code{parted} bindings for Python.")
624 (license license:gpl2+)))
626 (define-public duperemove
634 (url "https://github.com/markfasheh/duperemove")
635 (commit (string-append "v" version))))
637 (base32 "1a87mka2sfzhbch2jip6wlvvs0glxq9lqwmyrp359d1rmwwmqiw9"))
638 (file-name (git-file-name name version))))
639 (build-system gnu-build-system)
641 `(("pkg-config" ,pkg-config)))
646 `(#:tests? #f ; no test suite
648 (modify-phases %standard-phases
649 (delete 'configure)) ; no configure script
650 #:make-flags (list (string-append "PREFIX=" %output)
651 (string-append "CC=" ,(cc-for-target))
652 ;; Set to <next release>dev by default.
653 (string-append "VER=" ,version))))
654 (home-page "https://github.com/markfasheh/duperemove")
655 (synopsis "Tools for de-duplicating file system data")
656 (description "Duperemove is a simple tool for finding duplicated extents
657 and submitting them for deduplication. When given a list of files it will
658 hash their contents on a block by block basis and compare those hashes to each
659 other, finding and categorizing blocks that match each other. When given the
660 @option{-d} option, duperemove will submit those extents for deduplication
661 using the Linux kernel extent-same @code{ioctl}.
663 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
664 existing hash file, duperemove will only compute hashes for those files which
665 have changed since the last run. Thus you can run duperemove repeatedly on
666 your data as it changes, without having to re-checksum unchanged data.
668 Duperemove can also take input from the @command{fdupes} program.")
669 (license license:gpl2)))
671 (define-public ranger
677 (uri (string-append "https://ranger.github.io/"
678 "ranger-" version ".tar.gz"))
681 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
682 (build-system python-build-system)
689 ("python-pytest" ,python-pytest)))
691 '( ;; The 'test' target runs developer tools like pylint, which fail.
692 #:test-target "test_pytest"
694 (modify-phases %standard-phases
695 (add-after 'configure 'wrap-program
696 ;; Tell 'ranger' where 'w3mimgdisplay' is.
697 (lambda* (#:key inputs outputs #:allow-other-keys)
698 (let* ((out (assoc-ref outputs "out"))
699 (ranger (string-append out "/bin/ranger"))
700 (w3m (assoc-ref inputs "w3m"))
701 (w3mimgdisplay (string-append w3m
702 "/libexec/w3m/w3mimgdisplay")))
704 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
707 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
708 (lambda* (#:key test-target #:allow-other-keys)
709 (invoke "make" test-target))))))
710 (home-page "https://ranger.github.io/")
711 (synopsis "Console file manager")
712 (description "ranger is a console file manager with Vi key bindings. It
713 provides a minimalistic and nice curses interface with a view on the directory
714 hierarchy. It ships with @code{rifle}, a file launcher that is good at
715 automatically finding out which program to use for what file type.")
716 (license license:gpl3)))
718 (define-public volume-key
724 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
728 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
729 (build-system gnu-build-system)
731 `(("pkg-config" ,pkg-config)
733 ("python" ,python-3))) ; used to generate the Python bindings
735 `(("cryptsetup" ,cryptsetup)
737 ("libblkid" ,util-linux "lib")
738 ("lvm2" ,lvm2) ; for "-ldevmapper"
742 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
744 (modify-phases %standard-phases
745 (add-before 'configure 'patch-python.h-path
746 (lambda* (#:key inputs #:allow-other-keys)
747 (let ((python (assoc-ref inputs "python")))
748 (substitute* "Makefile.in"
749 (("/usr/include/python") (string-append python "/include/python")))
751 (home-page "https://pagure.io/volume_key")
752 (synopsis "Manipulate storage volume encryption keys")
754 "This package provides a library for manipulating storage volume
755 encryption keys and storing them separately from volumes to handle forgotten
757 (license license:gpl2)))
766 (url "https://github.com/pmem/ndctl")
767 (commit (string-append "v" version))))
768 (file-name (git-file-name name version))
771 "1vi61bm9wyawklswh9mj9zdp28ar7r97qckwnhgiyila73fb3jx2"))))
772 (build-system gnu-build-system)
774 `(("asciidoc" ,asciidoc)
775 ("automake" ,automake)
776 ("autoconf" ,autoconf)
777 ("bash-completion" ,bash-completion)
778 ("docbook-xsl" ,docbook-xsl)
781 ("pkg-config" ,pkg-config)
783 ;; Required for offline docbook generation.
788 ("keyutils" ,keyutils)
790 ("util-linux" ,util-linux "lib")))
793 (list "--disable-asciidoctor" ; use docbook-xsl instead
796 (modify-phases %standard-phases
797 (add-after 'unpack 'patch-FHS-file-names
799 (substitute* "git-version-gen"
800 (("/bin/sh") (which "sh")))
801 (substitute* "git-version"
802 (("/bin/bash") (which "bash")))
805 (let ((out (assoc-ref %outputs "out")))
806 (list (string-append "BASH_COMPLETION_DIR=" out
807 "/share/bash-completion/completions")))))
808 (home-page "https://github.com/pmem/ndctl")
809 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
811 "This package provides a utility library for managing the
812 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
813 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
814 ;; the effective license. Note that some files under ccan/ are
815 ;; covered by BSD-3 or public domain, see the individual folders.
816 (license license:gpl2)))
818 (define-public dmraid
821 (version "1.0.0.rc16-3")
824 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
828 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
829 (build-system gnu-build-system)
830 (inputs `(("lvm2" ,lvm2)))
831 (native-inputs `(("which" ,which)))
833 `(#:tests? #f ; No tests.
834 ;; Prevent a race condition where some target would attempt to link
835 ;; libdmraid.so before it had been built as reported in
836 ;; <https://bugs.gnu.org/31999#187>.
838 #:phases (modify-phases %standard-phases
839 (add-before 'configure 'change-directory
841 (chdir (string-append ,version "/dmraid"))
842 (substitute* "make.tmpl.in"
843 (("/bin/sh") (which "sh")))
845 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
846 ;; find libdmraid.so.
847 (string-append "LDFLAGS=-Wl,-rpath="
848 (assoc-ref %outputs "out")
850 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
851 (synopsis "Device mapper RAID interface")
853 "This software supports RAID device discovery, RAID set activation, creation,
854 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
856 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
857 to create devices with respective mappings for the ATARAID sets discovered.")
858 (license license:gpl2+)))
860 (define-public libblockdev
866 (uri (string-append "https://github.com/storaged-project/"
867 "libblockdev/releases/download/"
868 version "-1/libblockdev-" version ".tar.gz"))
871 "0wq7624pnprvfzrf39bq1cybd9lqwawbdg5bm0cchlpgvdq7q86w"))))
872 (build-system gnu-build-system)
875 (modify-phases %standard-phases
876 (add-after 'unpack 'patch-configuration-directory
877 (lambda* (#:key outputs #:allow-other-keys)
878 (let ((out (assoc-ref outputs "out")))
879 (substitute* "src/lib/blockdev.c"
880 (("/etc/libblockdev/conf.d/" path) (string-append out path)))))))))
882 `(("gobject-introspection" ,gobject-introspection)
883 ("pkg-config" ,pkg-config)
884 ("python" ,python-wrapper)
885 ("util-linux" ,util-linux)))
887 `(("btrfs-progs" ,btrfs-progs)
888 ("cryptsetup" ,cryptsetup)
889 ("dosfstools" ,dosfstools)
894 ("libbytesize" ,libbytesize)
901 ("volume-key" ,volume-key)
902 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
904 (home-page "https://github.com/storaged-project/libblockdev")
905 (synopsis "Library for manipulating block devices")
907 "libblockdev is a C library supporting GObject introspection for
908 manipulation of block devices. It has a plugin-based architecture where each
909 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
910 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
912 (license license:lgpl2.1+)))
914 (define-public rmlint
921 (url "https://github.com/sahib/rmlint")
922 (commit (string-append "v" version))))
923 (file-name (git-file-name name version))
926 "15xfkcw1bkfyf3z8kl23k3rlv702m0h7ghqxvhniynvlwbgh6j2x"))))
927 (build-system scons-build-system)
929 `(#:scons ,scons-python2
930 #:scons-flags (list (string-append "--prefix=" %output)
931 (string-append "--actual-prefix=" %output))
932 #:tests? #f ; No tests?
934 (modify-phases %standard-phases
935 (add-after 'unpack 'scons-propagate-environment
936 (lambda* (#:key inputs #:allow-other-keys)
937 ;; TODO: `rmlint --gui` fails with
938 ;; "Failed to load shredder: No module named 'shredder'".
939 ;; The GUI might also need extra dependencies, such as
940 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
941 (substitute* "lib/cmdline.c"
942 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
944 "const char *commands[] = {\""
945 (assoc-ref inputs "python") "/bin/python"
946 "\", \"python\", NULL};")))
947 ;; By design, SCons does not, by default, propagate
948 ;; environment variables to subprocesses. See:
949 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
950 ;; Here, we modify the SConstruct file to arrange for
951 ;; environment variables to be propagated.
952 (substitute* "SConstruct"
953 (("^env = Environment\\(.*\\)" all)
956 "\nenv['ENV']=os.environ"))))))))
958 `(("pkg-config" ,pkg-config)
959 ("glib:bin" ,glib "bin")
960 ("python-sphinx" ,python-sphinx)))
962 `(("python" ,python-wrapper)
965 ("elfutils" ,elfutils)
966 ("json-glib" ,json-glib)
967 ("libblkid" ,util-linux "lib")))
968 (home-page "https://rmlint.rtfd.org")
969 (synopsis "Remove duplicates and other lint from the file system")
970 (description "@command{rmlint} finds space waste and other broken things
971 on your file system and offers to remove it. @command{rmlint} can find:
974 @item duplicate files and duplicate directories,
975 @item non-stripped binaries (i.e. binaries with debug symbols),
976 @item broken symbolic links,
977 @item empty files and directories,
978 @item files with broken user and/or group ID.
980 (license license:gpl3+)))
989 (url "https://github.com/gokcehan/lf")
990 (commit (string-append "r" version))))
991 (file-name (git-file-name name version))
994 "1ld3q75v8rvp169w5p85z1vznqs9bhck6bm2f6fykxx16hmpb6ga"))))
995 (build-system go-build-system)
997 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
998 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
1000 `(#:import-path "github.com/gokcehan/lf"))
1001 (home-page "https://github.com/gokcehan/lf")
1002 (synopsis "Console file browser similar to Ranger")
1003 (description "lf (as in \"list files\") is a terminal file manager
1004 written in Go. It is heavily inspired by ranger with some missing and
1005 extra features. Some of the missing features are deliberately omitted
1006 since they are better handled by external tools.")
1007 (license license:expat)))
1017 (string-append "mirror://sourceforge/xfe/xfe/" version "/"
1018 "xfe-" version ".tar.gz"))
1020 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs"))))
1021 (build-system gnu-build-system)
1024 (modify-phases %standard-phases
1025 (add-after 'unpack 'patch-bin-dirs
1026 (lambda* (#:key inputs #:allow-other-keys)
1027 (let* ((bash (assoc-ref inputs "bash"))
1028 (coreutils (assoc-ref inputs "coreutils"))
1029 (findutils (assoc-ref inputs "findutils"))
1030 (file-prog (assoc-ref inputs "file")))
1031 (with-directory-excursion "src"
1032 (substitute* '("FilePanel.cpp" "help.h" "SearchPanel.cpp"
1033 "startupnotification.cpp" "xfeutils.cpp"
1035 (("/bin/sh" file) (string-append bash file))
1036 (("/bin/ls" file) (string-append coreutils file))
1037 (("/usr(/bin/du)" _ file) (string-append coreutils file))
1038 (("/usr(/bin/sort)" _ file) (string-append coreutils file))
1039 (("/usr(/bin/cut)" _ file) (string-append coreutils file))
1040 (("/usr(/bin/xargs)" _ file) (string-append findutils file))
1041 (("/usr(/bin/file)" _ file) (string-append file-prog file))))
1043 (add-after 'unpack 'patch-share-dirs
1044 (lambda* (#:key outputs #:allow-other-keys)
1045 (let* ((out (assoc-ref outputs "out"))
1046 (share (string-append out "/share"))
1047 (xfe (string-append share "/xfe")))
1048 (with-directory-excursion "src"
1049 (substitute* '("foxhacks.cpp" "help.h" "xfedefs.h"
1050 "XFileExplorer.cpp")
1051 (("/(usr|opt)(/local)?/share") share)
1052 (("~/.config/xfe") xfe)))
1055 `(("intltool" ,intltool)
1056 ("pkg-config" ,pkg-config)))
1059 ("coreutils" ,coreutils)
1061 ("findutils" ,findutils)
1063 ("freetype" ,freetype)
1066 ("xcb-util" ,xcb-util)
1068 ("xrandr" ,libxrandr)))
1069 (synopsis "File Manager for X-Based Graphical Systems")
1070 (description "XFE (X File Explorer) is a file manager for X. It is based on
1071 the popular but discontinued, X Win Commander. It aims to be the file manager
1072 of choice for all light thinking Unix addicts!")
1073 (home-page "http://roland65.free.fr/xfe/")
1074 (license license:gpl2+)))
1076 (define-public hddtemp
1079 (version "0.3-beta15")
1082 (uri (string-append "mirror://savannah/hddtemp/hddtemp-"
1087 "0nzgg4nl8zm9023wp4dg007z6x3ir60rwbcapr9ks2al81c431b1"))))
1088 (build-system gnu-build-system)
1090 `(#:configure-flags (list (string-append
1092 (assoc-ref %outputs "out")
1093 "/share/hddtemp/hddtemp.db"))
1095 (modify-phases %standard-phases
1096 (add-after 'install 'install-db
1097 (lambda* (#:key inputs outputs #:allow-other-keys)
1098 (let ((target (string-append (assoc-ref outputs "out")
1099 "/share/hddtemp/hddtemp.db")))
1100 (mkdir-p (dirname target))
1101 (copy-file (assoc-ref inputs "db") target)))))))
1105 (uri "mirror://savannah/hddtemp/hddtemp.db")
1107 (base32 "1fr6qgns6qv7cr40lic5yqwkkc7yjmmgx8j0z6d93csg3smzhhya"))))))
1108 (home-page "https://savannah.nongnu.org/projects/hddtemp/")
1109 (synopsis "Report the temperature of hard drives from S.M.A.R.T. information")
1110 (description "@command{hddtemp} is a small utility that gives you the
1111 temperature of your hard drive by reading S.M.A.R.T. information (for drives
1112 that support this feature).")
1113 (license license:gpl2+)))
1115 (define-public memkind
1122 (url "https://github.com/memkind/memkind")
1123 (commit (string-append "v" version))))
1124 (file-name (git-file-name name version))
1127 "11iz887f3cp5pzf1bzm644wzab8gkbhz3b7x1w6pcps71yd94ylj"))))
1128 (build-system gnu-build-system)
1130 `(;; memkind patched jemalloc to add je_arenalookupx,
1131 ;; je_check_reallocatex--i.e. they forked jemalloc.
1132 ;("jemalloc" ,jemalloc)
1134 ("numactl" ,numactl)))
1136 `(("autoconf" ,autoconf)
1137 ("automake" ,automake)
1138 ("libtool" ,libtool)))
1140 `(#:tests? #f ; Tests require a NUMA-enabled system.
1142 (modify-phases %standard-phases
1143 (add-before 'build 'autogen-jemalloc
1145 (with-directory-excursion "jemalloc"
1146 (substitute* "Makefile.in"
1147 (("/bin/sh") (which "sh")))
1149 (substitute* "configure"
1150 (("/bin/sh") (which "sh"))))
1152 (home-page "https://github.com/memkind/memkind")
1153 (synopsis "Heap manager with memory kinds (for NUMA)")
1154 (description "This package provides a user-extensible heap manager
1155 built on top of jemalloc which enables control of memory characteristics
1156 and a partitioning of the heap between kinds of memory (for NUMA).")
1157 (license license:bsd-3)))