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, 2019, 2020 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 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>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages disk)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages bash)
40 #:use-module (gnu packages c)
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages crypto)
44 #:use-module (gnu packages cryptsetup)
45 #:use-module (gnu packages docbook)
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages elf)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages glib)
50 #:use-module (gnu packages gnome)
51 #:use-module (gnu packages gnupg)
52 #:use-module (gnu packages gtk)
53 #:use-module (gnu packages guile)
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages ncurses)
56 #:use-module (gnu packages nss)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages popt)
60 #:use-module (gnu packages python)
61 #:use-module (gnu packages python-xyz)
62 #:use-module (gnu packages readline)
63 #:use-module (gnu packages sphinx)
64 #:use-module (gnu packages sqlite)
65 #:use-module (gnu packages swig)
66 #:use-module (gnu packages terminals)
67 #:use-module (gnu packages textutils)
68 #:use-module (gnu packages vim)
69 #:use-module (gnu packages w3m)
70 #:use-module (gnu packages web)
71 #:use-module (gnu packages xml)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system go)
74 #:use-module (guix build-system python)
75 #:use-module (guix build-system trivial)
76 #:use-module (guix build-system scons)
77 #:use-module (guix download)
78 #:use-module (guix git-download)
79 #:use-module ((guix licenses) #:prefix license:)
80 #:use-module (guix packages))
88 (uri (string-append "mirror://gnu/parted/parted-"
92 "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"))))
93 (build-system gnu-build-system)
96 (modify-phases %standard-phases
97 (add-after 'unpack 'fix-locales-and-python
98 (lambda* (#:key inputs #:allow-other-keys)
99 (substitute* "tests/t0251-gpt-unicode.sh"
100 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
101 (substitute* "tests/msdos-overlap"
102 (("/usr/bin/python") (which "python")))
106 ("readline" ,readline)
107 ("util-linux" ,util-linux)))
109 `(("gettext" ,gettext-minimal)
111 ("e2fsprogs" ,e2fsprogs)
113 ("python" ,python-2)))
114 (home-page "https://www.gnu.org/software/parted/")
115 (synopsis "Disk partition editor")
117 "GNU Parted is a package for creating and manipulating disk partition
118 tables. It includes a library and command-line utility.")
119 (license license:gpl3+)))
128 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
132 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
133 (build-system gnu-build-system)
135 `(("gettext" ,gettext-minimal)
137 ("util-linux" ,util-linux)
139 ;; The build neglects to look for its own headers in its own tree. A next
140 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
143 (modify-phases %standard-phases
144 (add-after 'unpack 'skip-broken-header-probes
146 (substitute* "backend/configure"
147 (("gnufdisk-common.h .*") "\n"))
149 #:make-flags (list (string-append "CPPFLAGS="
150 " -I../common/include "
151 " -I../debug/include "
152 " -I../exception/include"))))
153 (home-page "https://www.gnu.org/software/fdisk/")
154 (synopsis "Low-level disk partitioning and formatting")
156 "GNU fdisk provides a GNU version of the common disk partitioning tool
157 fdisk. fdisk is used for the creation and manipulation of disk partition
158 tables, and it understands a variety of different formats.")
159 (license license:gpl3+)))
161 (define-public gptfdisk
168 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
169 version "/gptfdisk-" version ".tar.gz"))
171 (base32 "0bybgp30pqxb6x5krxazkq4drca0gz4inxj89fpyr204rn3kjz8f"))))
172 (build-system gnu-build-system)
174 `(("gettext" ,gettext-minimal)
177 ("util-linux" ,util-linux))) ; libuuid
179 `(#:test-target "test"
181 (modify-phases %standard-phases
182 (add-after 'unpack 'fix-include-directory
184 (substitute* "gptcurses.cc"
185 (("ncursesw/ncurses.h") "ncurses.h"))
187 (delete 'configure) ; no configure script
189 ;; There's no ‘make install’ target.
190 (lambda* (#:key outputs #:allow-other-keys)
191 (let* ((out (assoc-ref outputs "out"))
192 (bin (string-append out "/bin"))
193 (man (string-append out "/share/man/man8")))
194 (install-file "gdisk" bin)
195 (install-file "sgdisk" bin)
196 (install-file "cgdisk" bin)
197 (install-file "fixparts" bin)
198 (install-file "cgdisk.8" man)
199 (install-file "fixparts.8" man)
200 (install-file "gdisk.8" man)
201 (install-file "sgdisk.8" man)))))))
202 (home-page "http://www.rodsbooks.com/gdisk/")
203 (synopsis "Low-level GPT disk partitioning and formatting")
204 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
205 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
206 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
208 (license license:gpl2)))
210 (define-public ddrescue
217 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
220 (base32 "0qqh38izl5ppap9a5izf3hijh94k65s3zbfkczd4b7x04syqwlyf"))))
221 (build-system gnu-build-system)
222 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
223 (synopsis "Data recovery utility")
224 (native-inputs `(("lzip" ,lzip)))
226 "GNU ddrescue is a fully automated data recovery tool. It copies data
227 from one file to another, working to rescue data in case of read errors. The
228 program also includes a tool for manipulating its log files, which are used
229 to recover data more efficiently by only reading the necessary blocks.")
230 (license license:gpl3+)))
232 (define-public dosfstools
239 (uri (string-append "https://github.com/" name "/" name
240 "/releases/download/v" version "/"
241 name "-" version ".tar.xz"))
244 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
245 (build-system gnu-build-system)
247 `(#:configure-flags (list "--enable-compat-symlinks")
248 #:make-flags (list (string-append "PREFIX=" %output)
251 `(("xxd" ,xxd))) ; for tests
252 (home-page "https://github.com/dosfstools/dosfstools")
253 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
255 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
256 which respectively make and check MS-DOS FAT file systems.")
257 (license license:gpl3+)))
259 (define dosfstools/static
261 (package (inherit dosfstools))))
263 (define-public fatfsck/static
265 (name "fatfsck-static")
266 (version (package-version dosfstools))
267 (build-system trivial-build-system)
270 `(#:modules ((guix build utils))
273 (use-modules (guix build utils))
274 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
277 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
279 (with-directory-excursion bin
280 (copy-file (string-append src "/" exe) exe)
281 (remove-store-references exe)
283 ;; Add fsck.vfat symlink to match the Linux driver name.
284 (symlink exe "fsck.vfat")
286 (inputs `(("dosfstools" ,dosfstools/static)))
287 (home-page (package-home-page dosfstools))
288 (synopsis "Statically linked fsck.fat from dosfstools")
289 (description "This package provides a statically-linked @command{fsck.fat}
290 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
291 (license (package-license dosfstools))))
293 (define-public sdparm
300 (uri (string-append "http://sg.danny.cz/sg/p/"
301 name "-" version ".tar.xz"))
304 "1jjq3lzgfy4r76rc26q02lv4wm5cb4dx5nh913h489zjrr4f3jbx"))))
305 (build-system gnu-build-system)
306 (home-page "http://sg.danny.cz/sg/sdparm.html")
307 (synopsis "Provide access to SCSI device parameters")
309 "Sdparm reads and modifies SCSI device parameters. These devices can be
310 SCSI disks, in which case the role of @command{sdparm} is similar to its
311 namesake: the @command{hdparm} utility originally designed for ATA disks.
312 However, @command{sdparm} can be used to access parameters on any device that
313 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
314 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
315 also send commands associated with starting and stopping the media, loading
316 and unloading removable media and some other housekeeping functions.")
317 (license license:bsd-3)))
319 (define-public idle3-tools
326 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
330 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
331 (build-system gnu-build-system)
333 `(#:tests? #f ;no test suite
335 (modify-phases %standard-phases
337 #:make-flags (list "CC=gcc"
338 (string-append "manprefix=")
339 (string-append "DESTDIR="
340 (assoc-ref %outputs "out")))))
341 (home-page "http://idle3-tools.sourceforge.net")
342 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
344 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
345 present in many Western Digital hard drives. This timer is part of the
346 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
347 the default timer setting is not well suited to Linux or other *nix systems,
348 and can dramatically shorten the lifespan of the drive if left unchecked.")
349 (license license:gpl3+)))
351 (define-public gparted
358 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
359 version "/gparted-" version ".tar.gz"))
361 (base32 "092rgwjh1825fal6v3yafq2wr0i61hh0a2n0j4296zn0zdx7pzp2"))))
362 (build-system gnu-build-system)
364 ;; Tests require access to paths outside the build container, such
365 ;; as '/dev/disk/by-id'
368 `(("util-linux" ,util-linux)
373 ("yelp-tools" ,yelp-tools)))
375 `(("intltool" ,intltool)
377 ("lvm2" ,lvm2) ; for tests
378 ("pkg-config" ,pkg-config)))
379 (home-page "https://gparted.org/")
380 (synopsis "Partition editor to graphically manage disk partitions")
381 (description "GParted is a GNOME partition editor for creating,
382 reorganizing, and deleting disk partitions. It uses libparted from the parted
383 project to detect and manipulate partition tables. Optional file system tools
384 permit managing file systems not included in libparted.")
385 ;; The home page says GPLv2, but the source code says GPLv2+.
386 (license license:gpl2+)))
395 (uri (pypi-uri "pydf" version))
398 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
399 (build-system python-build-system)
400 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
401 (synopsis "Colourised @command{df} clone")
402 (description "All-singing, all-dancing, fully colourised @command{df} clone
403 written in Python. It displays the amount of disk space available on the
404 mounted file systems, using different colours for different types of file
405 systems. Output format is completely customizable.")
406 (license license:public-domain)))
416 (url "https://github.com/AltraMayor/f3.git")
417 (commit (string-append "v" version))))
418 (file-name (git-file-name name version))
420 (base32 "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy"))))
421 (build-system gnu-build-system)
423 '(#:tests? #f ; no check target
424 #:make-flags (list "CC=gcc"
425 (string-append "PREFIX=" %output))
427 (modify-phases %standard-phases
428 (delete 'configure) ; no configure script
429 (add-after 'build 'build-extra
430 (lambda* (#:key make-flags #:allow-other-keys)
431 (apply invoke "make" "extra" make-flags)))
432 (add-after 'build 'install-extra
433 (lambda* (#:key make-flags #:allow-other-keys)
434 (apply invoke "make" "install-extra" make-flags))))))
438 (home-page "http://oss.digirati.com.br/f3/")
439 (synopsis "Test real capacity of flash memory cards and such.")
440 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
441 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
442 the card and then checks if can read it. It will assure you haven't been sold
443 a card with a smaller capacity than stated.")
444 (license license:gpl3+)))
446 (define-public python-parted
448 (name "python-parted")
454 (url "https://github.com/dcantrell/pyparted.git")
455 (commit (string-append "v" version))))
456 (file-name (git-file-name name version))
458 (base32 "0r6916n3w4vldxrq30a3z2iagvxgly4vfmlidjm65vwqnyv17bvn"))))
459 (build-system python-build-system)
462 (modify-phases %standard-phases
464 (add-after 'install 'check
465 (lambda* (#:key outputs inputs #:allow-other-keys)
466 (add-installed-pythonpath inputs outputs)
467 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
468 (substitute* "tests/test__ped_ped.py"
469 (("\"/tmp/temp-device-\"") "self.path"))
470 (invoke "python" "-m" "unittest" "discover" "-v")
473 `(("e2fsprogs" ,e2fsprogs)
474 ("pkg-config" ,pkg-config)))
476 `(("python-six" ,python-six)))
478 `(("parted" ,parted)))
479 (home-page "https://github.com/dcantrell/pyparted")
480 (synopsis "Parted bindings for Python")
481 (description "This package provides @code{parted} bindings for Python.")
482 (license license:gpl2+)))
484 (define-public python2-parted
485 (package-with-python2 python-parted))
487 (define-public duperemove
495 (url "https://github.com/markfasheh/duperemove.git")
496 (commit (string-append "v" version))))
498 (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z"))
499 (file-name (git-file-name name version))))
500 (build-system gnu-build-system)
502 `(("pkg-config" ,pkg-config)))
507 `(#:tests? #f ; no test suite
509 (modify-phases %standard-phases
510 (delete 'configure)) ; no configure script
511 #:make-flags (list (string-append "PREFIX=" %output)
513 (home-page "https://github.com/markfasheh/duperemove")
514 (synopsis "Tools for de-duplicating file system data")
515 (description "Duperemove is a simple tool for finding duplicated extents
516 and submitting them for deduplication. When given a list of files it will
517 hash their contents on a block by block basis and compare those hashes to each
518 other, finding and categorizing blocks that match each other. When given the
519 @option{-d} option, duperemove will submit those extents for deduplication
520 using the Linux kernel extent-same @code{ioctl}.
522 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
523 existing hash file, duperemove will only compute hashes for those files which
524 have changed since the last run. Thus you can run duperemove repeatedly on
525 your data as it changes, without having to re-checksum unchanged data.
527 Duperemove can also take input from the @command{fdupes} program.")
528 (license license:gpl2)))
530 (define-public ranger
536 (uri (string-append "https://ranger.github.io/"
537 "ranger-" version ".tar.gz"))
540 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
541 (build-system python-build-system)
548 ("python-pytest" ,python-pytest)))
550 '( ;; The 'test' target runs developer tools like pylint, which fail.
551 #:test-target "test_pytest"
553 (modify-phases %standard-phases
554 (add-after 'configure 'wrap-program
555 ;; Tell 'ranger' where 'w3mimgdisplay' is.
556 (lambda* (#:key inputs outputs #:allow-other-keys)
557 (let* ((out (assoc-ref outputs "out"))
558 (ranger (string-append out "/bin/ranger"))
559 (w3m (assoc-ref inputs "w3m"))
560 (w3mimgdisplay (string-append w3m
561 "/libexec/w3m/w3mimgdisplay")))
563 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
566 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
567 (lambda* (#:key test-target #:allow-other-keys)
568 (invoke "make" test-target))))))
569 (home-page "https://ranger.github.io/")
570 (synopsis "Console file manager")
571 (description "ranger is a console file manager with Vi key bindings. It
572 provides a minimalistic and nice curses interface with a view on the directory
573 hierarchy. It ships with @code{rifle}, a file launcher that is good at
574 automatically finding out which program to use for what file type.")
575 (license license:gpl3)))
577 (define-public volume-key
583 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
587 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
588 (build-system gnu-build-system)
590 `(("pkg-config" ,pkg-config)
592 ("python" ,python-3))) ; used to generate the Python bindings
594 `(("cryptsetup" ,cryptsetup)
596 ("libblkid" ,util-linux)
597 ("lvm2" ,lvm2) ; for "-ldevmapper"
601 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
603 (modify-phases %standard-phases
604 (add-before 'configure 'patch-python.h-path
605 (lambda* (#:key inputs #:allow-other-keys)
606 (let ((python (assoc-ref inputs "python")))
607 (substitute* "Makefile.in"
608 (("/usr/include/python") (string-append python "/include/python")))
610 (home-page "https://pagure.io/volume_key")
611 (synopsis "Manipulate storage volume encryption keys")
613 "This package provides a library for manipulating storage volume
614 encryption keys and storing them separately from volumes to handle forgotten
616 (license license:gpl2)))
625 (url "https://github.com/pmem/ndctl.git")
626 (commit (string-append "v" version))))
627 (file-name (git-file-name name version))
630 "076jgw1g2aafqgnq705in0wnabysqk46dq5yxdv1qzgjmyhka39n"))))
631 (build-system gnu-build-system)
633 `(("asciidoc" ,asciidoc)
634 ("automake" ,automake)
635 ("autoconf" ,autoconf)
636 ("bash-completion" ,bash-completion)
637 ("docbook-xsl" ,docbook-xsl)
640 ("pkg-config" ,pkg-config)
642 ;; Required for offline docbook generation.
647 ("keyutils" ,keyutils)
649 ("util-linux" ,util-linux)))
652 (list "--disable-asciidoctor" ; use docbook-xsl instead
655 (modify-phases %standard-phases
656 (add-after 'unpack 'patch-FHS-file-names
658 (substitute* "git-version-gen"
659 (("/bin/sh") (which "sh")))
660 (substitute* "git-version"
661 (("/bin/bash") (which "bash")))
664 (let ((out (assoc-ref %outputs "out")))
665 (list (string-append "BASH_COMPLETION_DIR=" out
666 "/share/bash-completion/completions")))))
667 (home-page "https://github.com/pmem/ndctl")
668 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
670 "This package provides a utility library for managing the
671 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
672 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
673 ;; the effective license. Note that some files under ccan/ are
674 ;; covered by BSD-3 or public domain, see the individual folders.
675 (license license:gpl2)))
677 (define-public dmraid
680 (version "1.0.0.rc16-3")
683 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
687 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
688 (build-system gnu-build-system)
689 (inputs `(("lvm2" ,lvm2)))
690 (native-inputs `(("which" ,which)))
692 `(#:tests? #f ; No tests.
693 ;; Prevent a race condition where some target would attempt to link
694 ;; libdmraid.so before it had been built as reported in
695 ;; <https://bugs.gnu.org/31999#187>.
697 #:phases (modify-phases %standard-phases
698 (add-before 'configure 'change-directory
700 (chdir (string-append ,version "/dmraid"))
701 (substitute* "make.tmpl.in"
702 (("/bin/sh") (which "sh")))
704 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
705 ;; find libdmraid.so.
706 (string-append "LDFLAGS=-Wl,-rpath="
707 (assoc-ref %outputs "out")
709 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
710 (synopsis "Device mapper RAID interface")
712 "This software supports RAID device discovery, RAID set activation, creation,
713 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
715 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
716 to create devices with respective mappings for the ATARAID sets discovered.")
717 (license license:gpl2+)))
719 (define-public libblockdev
725 (uri (string-append "https://github.com/storaged-project/"
726 "libblockdev/releases/download/"
727 version "-1/libblockdev-" version ".tar.gz"))
730 "15c7g2gbkahmy8c6677pvbvblan5h8jxcqqmn6nlvqwqynq2mkjm"))))
731 (build-system gnu-build-system)
733 `(("pkg-config" ,pkg-config)
734 ("python" ,python-wrapper)
735 ("util-linux" ,util-linux)))
737 `(("btrfs-progs" ,btrfs-progs)
738 ("cryptsetup" ,cryptsetup)
739 ("dosfstools" ,dosfstools)
743 ("gobject-introspection" ,gobject-introspection)
745 ("libbytesize" ,libbytesize)
752 ("volume-key" ,volume-key)
753 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
755 (home-page "https://github.com/storaged-project/libblockdev")
756 (synopsis "Library for manipulating block devices")
758 "libblockdev is a C library supporting GObject introspection for
759 manipulation of block devices. It has a plugin-based architecture where each
760 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
761 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
763 (license license:lgpl2.1+)))
765 (define-public rmlint
772 (url "https://github.com/sahib/rmlint")
773 (commit (string-append "v" version))))
774 (file-name (git-file-name name version))
777 "1b5cziam14h80xrfb285fmfrzz2rligxcpsq1xsig14xf4l2875i"))))
778 (build-system scons-build-system)
780 `(#:scons ,scons-python2
781 #:scons-flags (list (string-append "--prefix=" %output)
782 (string-append "--actual-prefix=" %output))
783 #:tests? #f ; No tests?
785 (modify-phases %standard-phases
786 (add-after 'unpack 'scons-propagate-environment
787 (lambda* (#:key inputs #:allow-other-keys)
788 ;; TODO: `rmlint --gui` fails with
789 ;; "Failed to load shredder: No module named 'shredder'".
790 ;; The GUI might also need extra dependencies, such as
791 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
792 (substitute* "lib/cmdline.c"
793 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
795 "const char *commands[] = {\""
796 (assoc-ref inputs "python") "/bin/python"
797 "\", \"python\", NULL};")))
798 ;; By design, SCons does not, by default, propagate
799 ;; environment variables to subprocesses. See:
800 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
801 ;; Here, we modify the SConstruct file to arrange for
802 ;; environment variables to be propagated.
803 (substitute* "SConstruct"
804 (("^env = Environment\\(.*\\)" all)
807 "\nenv['ENV']=os.environ"))))))))
809 `(("pkg-config" ,pkg-config)
810 ("glib:bin" ,glib "bin")
811 ("python-sphinx" ,python-sphinx)))
813 `(("python" ,python-wrapper)
816 ("elfutils" ,elfutils)
817 ("json-glib" ,json-glib)
818 ("libblkid" ,util-linux)))
819 (home-page "https://rmlint.rtfd.org")
820 (synopsis "Remove duplicates and other lint from the file system")
821 (description "@command{rmlint} finds space waste and other broken things
822 on your file system and offers to remove it. @command{rmlint} can find:
825 @item duplicate files and duplicate directories,
826 @item non-stripped binaries (i.e. binaries with debug symbols),
827 @item broken symbolic links,
828 @item empty files and directories,
829 @item files with broken user and/or group ID.
831 (license license:gpl3+)))
840 (url "https://github.com/gokcehan/lf.git")
841 (commit (string-append "r" version))))
842 (file-name (git-file-name name version))
845 "1ld3q75v8rvp169w5p85z1vznqs9bhck6bm2f6fykxx16hmpb6ga"))))
846 (build-system go-build-system)
848 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
849 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
851 `(#:import-path "github.com/gokcehan/lf"))
852 (home-page "https://github.com/gokcehan/lf")
853 (synopsis "Console file browser similar to Ranger")
854 (description "lf (as in \"list files\") is a terminal file manager
855 written in Go. It is heavily inspired by ranger with some missing and
856 extra features. Some of the missing features are deliberately omitted
857 since they are better handled by external tools.")
858 (license license:expat)))