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 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 "/" name "-" version ".tar.gz"))
172 "13d7gff4prl1nsdknjigmb7bbqhn79165n01v4y9mwbnd0d3jqxn"))))
173 (build-system gnu-build-system)
175 `(("gettext" ,gettext-minimal)
178 ("util-linux" ,util-linux))) ; libuuid
180 `(#:test-target "test"
182 (modify-phases %standard-phases
183 ;; no configure script
187 (lambda* (#:key outputs #:allow-other-keys)
188 (let* ((out (assoc-ref outputs "out"))
189 (bin (string-append out "/bin"))
190 (man (string-append out "/share/man/man8")))
191 (install-file "gdisk" bin)
192 (install-file "sgdisk" bin)
193 (install-file "cgdisk" bin)
194 (install-file "fixparts" bin)
195 (install-file "cgdisk.8" man)
196 (install-file "fixparts.8" man)
197 (install-file "gdisk.8" man)
198 (install-file "sgdisk.8" man)))))))
199 (home-page "http://www.rodsbooks.com/gdisk/")
200 (synopsis "Low-level GPT disk partitioning and formatting")
201 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
202 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
203 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
205 (license license:gpl2)))
207 (define-public ddrescue
214 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
217 (base32 "11qh0bbzf00mfb4yq35gnv5m260k4d7q9ixklry6bqvhvvp3ypab"))))
218 (build-system gnu-build-system)
219 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
220 (synopsis "Data recovery utility")
221 (native-inputs `(("lzip" ,lzip)))
223 "GNU ddrescue is a fully automated data recovery tool. It copies data
224 from one file to another, working to rescue data in case of read errors. The
225 program also includes a tool for manipulating its log files, which are used
226 to recover data more efficiently by only reading the necessary blocks.")
227 (license license:gpl3+)))
229 (define-public dosfstools
236 (uri (string-append "https://github.com/" name "/" name
237 "/releases/download/v" version "/"
238 name "-" version ".tar.xz"))
241 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
242 (build-system gnu-build-system)
244 `(#:configure-flags (list "--enable-compat-symlinks")
245 #:make-flags (list (string-append "PREFIX=" %output)
248 `(("xxd" ,xxd))) ; for tests
249 (home-page "https://github.com/dosfstools/dosfstools")
250 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
252 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
253 which respectively make and check MS-DOS FAT file systems.")
254 (license license:gpl3+)))
256 (define dosfstools/static
258 (package (inherit dosfstools))))
260 (define-public fatfsck/static
262 (name "fatfsck-static")
263 (version (package-version dosfstools))
264 (build-system trivial-build-system)
267 `(#:modules ((guix build utils))
270 (use-modules (guix build utils))
271 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
274 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
276 (with-directory-excursion bin
277 (copy-file (string-append src "/" exe) exe)
278 (remove-store-references exe)
280 ;; Add fsck.vfat symlink to match the Linux driver name.
281 (symlink exe "fsck.vfat")
283 (inputs `(("dosfstools" ,dosfstools/static)))
284 (home-page (package-home-page dosfstools))
285 (synopsis "Statically linked fsck.fat from dosfstools")
286 (description "This package provides a statically-linked @command{fsck.fat}
287 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
288 (license (package-license dosfstools))))
290 (define-public sdparm
297 (uri (string-append "http://sg.danny.cz/sg/p/"
298 name "-" version ".tar.xz"))
301 "1jjq3lzgfy4r76rc26q02lv4wm5cb4dx5nh913h489zjrr4f3jbx"))))
302 (build-system gnu-build-system)
303 (home-page "http://sg.danny.cz/sg/sdparm.html")
304 (synopsis "Provide access to SCSI device parameters")
306 "Sdparm reads and modifies SCSI device parameters. These devices can be
307 SCSI disks, in which case the role of @command{sdparm} is similar to its
308 namesake: the @command{hdparm} utility originally designed for ATA disks.
309 However, @command{sdparm} can be used to access parameters on any device that
310 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
311 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
312 also send commands associated with starting and stopping the media, loading
313 and unloading removable media and some other housekeeping functions.")
314 (license license:bsd-3)))
316 (define-public idle3-tools
323 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
327 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
328 (build-system gnu-build-system)
330 `(#:tests? #f ;no test suite
332 (modify-phases %standard-phases
334 #:make-flags (list "CC=gcc"
335 (string-append "manprefix=")
336 (string-append "DESTDIR="
337 (assoc-ref %outputs "out")))))
338 (home-page "http://idle3-tools.sourceforge.net")
339 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
341 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
342 present in many Western Digital hard drives. This timer is part of the
343 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
344 the default timer setting is not well suited to Linux or other *nix systems,
345 and can dramatically shorten the lifespan of the drive if left unchecked.")
346 (license license:gpl3+)))
348 (define-public gparted
355 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
356 version "/gparted-" version ".tar.gz"))
358 (base32 "092rgwjh1825fal6v3yafq2wr0i61hh0a2n0j4296zn0zdx7pzp2"))))
359 (build-system gnu-build-system)
361 ;; Tests require access to paths outside the build container, such
362 ;; as '/dev/disk/by-id'
365 `(("util-linux" ,util-linux)
370 ("yelp-tools" ,yelp-tools)))
372 `(("intltool" ,intltool)
374 ("lvm2" ,lvm2) ; for tests
375 ("pkg-config" ,pkg-config)))
376 (home-page "https://gparted.org/")
377 (synopsis "Partition editor to graphically manage disk partitions")
378 (description "GParted is a GNOME partition editor for creating,
379 reorganizing, and deleting disk partitions. It uses libparted from the parted
380 project to detect and manipulate partition tables. Optional file system tools
381 permit managing file systems not included in libparted.")
382 ;; The home page says GPLv2, but the source code says GPLv2+.
383 (license license:gpl2+)))
392 (uri (pypi-uri "pydf" version))
395 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
396 (build-system python-build-system)
397 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
398 (synopsis "Colourised @command{df} clone")
399 (description "All-singing, all-dancing, fully colourised @command{df} clone
400 written in Python. It displays the amount of disk space available on the
401 mounted file systems, using different colours for different types of file
402 systems. Output format is completely customizable.")
403 (license license:public-domain)))
413 (url "https://github.com/AltraMayor/f3.git")
414 (commit (string-append "v" version))))
415 (file-name (git-file-name name version))
417 (base32 "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy"))))
418 (build-system gnu-build-system)
420 '(#:tests? #f ; no check target
421 #:make-flags (list "CC=gcc"
422 (string-append "PREFIX=" %output))
424 (modify-phases %standard-phases
425 (delete 'configure) ; no configure script
426 (add-after 'build 'build-extra
427 (lambda* (#:key make-flags #:allow-other-keys)
428 (apply invoke "make" "extra" make-flags)))
429 (add-after 'build 'install-extra
430 (lambda* (#:key make-flags #:allow-other-keys)
431 (apply invoke "make" "install-extra" make-flags))))))
435 (home-page "http://oss.digirati.com.br/f3/")
436 (synopsis "Test real capacity of flash memory cards and such.")
437 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
438 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
439 the card and then checks if can read it. It will assure you haven't been sold
440 a card with a smaller capacity than stated.")
441 (license license:gpl3+)))
443 (define-public python-parted
445 (name "python-parted")
451 (url "https://github.com/dcantrell/pyparted.git")
452 (commit (string-append "v" version))))
453 (file-name (git-file-name name version))
455 (base32 "0r6916n3w4vldxrq30a3z2iagvxgly4vfmlidjm65vwqnyv17bvn"))))
456 (build-system python-build-system)
459 (modify-phases %standard-phases
461 (add-after 'install 'check
462 (lambda* (#:key outputs inputs #:allow-other-keys)
463 (add-installed-pythonpath inputs outputs)
464 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
465 (substitute* "tests/test__ped_ped.py"
466 (("\"/tmp/temp-device-\"") "self.path"))
467 (invoke "python" "-m" "unittest" "discover" "-v")
470 `(("e2fsprogs" ,e2fsprogs)
471 ("pkg-config" ,pkg-config)))
473 `(("python-six" ,python-six)))
475 `(("parted" ,parted)))
476 (home-page "https://github.com/dcantrell/pyparted")
477 (synopsis "Parted bindings for Python")
478 (description "This package provides @code{parted} bindings for Python.")
479 (license license:gpl2+)))
481 (define-public python2-parted
482 (package-with-python2 python-parted))
484 (define-public duperemove
492 (url "https://github.com/markfasheh/duperemove.git")
493 (commit (string-append "v" version))))
495 (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z"))
496 (file-name (git-file-name name version))))
497 (build-system gnu-build-system)
499 `(("pkg-config" ,pkg-config)))
504 `(#:tests? #f ; no test suite
506 (modify-phases %standard-phases
507 (delete 'configure)) ; no configure script
508 #:make-flags (list (string-append "PREFIX=" %output)
510 (home-page "https://github.com/markfasheh/duperemove")
511 (synopsis "Tools for de-duplicating file system data")
512 (description "Duperemove is a simple tool for finding duplicated extents
513 and submitting them for deduplication. When given a list of files it will
514 hash their contents on a block by block basis and compare those hashes to each
515 other, finding and categorizing blocks that match each other. When given the
516 @option{-d} option, duperemove will submit those extents for deduplication
517 using the Linux kernel extent-same @code{ioctl}.
519 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
520 existing hash file, duperemove will only compute hashes for those files which
521 have changed since the last run. Thus you can run duperemove repeatedly on
522 your data as it changes, without having to re-checksum unchanged data.
524 Duperemove can also take input from the @command{fdupes} program.")
525 (license license:gpl2)))
527 (define-public ranger
533 (uri (string-append "https://ranger.github.io/"
534 "ranger-" version ".tar.gz"))
537 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
538 (build-system python-build-system)
545 ("python-pytest" ,python-pytest)))
547 '( ;; The 'test' target runs developer tools like pylint, which fail.
548 #:test-target "test_pytest"
550 (modify-phases %standard-phases
551 (add-after 'configure 'wrap-program
552 ;; Tell 'ranger' where 'w3mimgdisplay' is.
553 (lambda* (#:key inputs outputs #:allow-other-keys)
554 (let* ((out (assoc-ref outputs "out"))
555 (ranger (string-append out "/bin/ranger"))
556 (w3m (assoc-ref inputs "w3m"))
557 (w3mimgdisplay (string-append w3m
558 "/libexec/w3m/w3mimgdisplay")))
560 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
563 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
564 (lambda* (#:key test-target #:allow-other-keys)
565 (invoke "make" test-target))))))
566 (home-page "https://ranger.github.io/")
567 (synopsis "Console file manager")
568 (description "ranger is a console file manager with Vi key bindings. It
569 provides a minimalistic and nice curses interface with a view on the directory
570 hierarchy. It ships with @code{rifle}, a file launcher that is good at
571 automatically finding out which program to use for what file type.")
572 (license license:gpl3)))
574 (define-public volume-key
580 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
584 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
585 (build-system gnu-build-system)
587 `(("pkg-config" ,pkg-config)
589 ("python" ,python-3))) ; used to generate the Python bindings
591 `(("cryptsetup" ,cryptsetup)
593 ("libblkid" ,util-linux)
594 ("lvm2" ,lvm2) ; for "-ldevmapper"
598 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
600 (modify-phases %standard-phases
601 (add-before 'configure 'patch-python.h-path
602 (lambda* (#:key inputs #:allow-other-keys)
603 (let ((python (assoc-ref inputs "python")))
604 (substitute* "Makefile.in"
605 (("/usr/include/python") (string-append python "/include/python")))
607 (home-page "https://pagure.io/volume_key")
608 (synopsis "Manipulate storage volume encryption keys")
610 "This package provides a library for manipulating storage volume
611 encryption keys and storing them separately from volumes to handle forgotten
613 (license license:gpl2)))
622 (url "https://github.com/pmem/ndctl.git")
623 (commit (string-append "v" version))))
624 (file-name (git-file-name name version))
627 "076jgw1g2aafqgnq705in0wnabysqk46dq5yxdv1qzgjmyhka39n"))))
628 (build-system gnu-build-system)
630 `(("asciidoc" ,asciidoc)
631 ("automake" ,automake)
632 ("autoconf" ,autoconf)
633 ("bash-completion" ,bash-completion)
634 ("docbook-xsl" ,docbook-xsl)
637 ("pkg-config" ,pkg-config)
639 ;; Required for offline docbook generation.
644 ("keyutils" ,keyutils)
646 ("util-linux" ,util-linux)))
649 (list "--disable-asciidoctor" ; use docbook-xsl instead
652 (modify-phases %standard-phases
653 (add-after 'unpack 'patch-FHS-file-names
655 (substitute* "git-version-gen"
656 (("/bin/sh") (which "sh")))
657 (substitute* "git-version"
658 (("/bin/bash") (which "bash")))
661 (let ((out (assoc-ref %outputs "out")))
662 (list (string-append "BASH_COMPLETION_DIR=" out
663 "/share/bash-completion/completions")))))
664 (home-page "https://github.com/pmem/ndctl")
665 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
667 "This package provides a utility library for managing the
668 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
669 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
670 ;; the effective license. Note that some files under ccan/ are
671 ;; covered by BSD-3 or public domain, see the individual folders.
672 (license license:gpl2)))
674 (define-public dmraid
677 (version "1.0.0.rc16-3")
680 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
684 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
685 (build-system gnu-build-system)
686 (inputs `(("lvm2" ,lvm2)))
687 (native-inputs `(("which" ,which)))
689 `(#:tests? #f ; No tests.
690 ;; Prevent a race condition where some target would attempt to link
691 ;; libdmraid.so before it had been built as reported in
692 ;; <https://bugs.gnu.org/31999#187>.
694 #:phases (modify-phases %standard-phases
695 (add-before 'configure 'change-directory
697 (chdir (string-append ,version "/dmraid"))
698 (substitute* "make.tmpl.in"
699 (("/bin/sh") (which "sh")))
701 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
702 ;; find libdmraid.so.
703 (string-append "LDFLAGS=-Wl,-rpath="
704 (assoc-ref %outputs "out")
706 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
707 (synopsis "Device mapper RAID interface")
709 "This software supports RAID device discovery, RAID set activation, creation,
710 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
712 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
713 to create devices with respective mappings for the ATARAID sets discovered.")
714 (license license:gpl2+)))
716 (define-public libblockdev
722 (uri (string-append "https://github.com/storaged-project/"
723 "libblockdev/releases/download/"
724 version "-1/libblockdev-" version ".tar.gz"))
727 "15c7g2gbkahmy8c6677pvbvblan5h8jxcqqmn6nlvqwqynq2mkjm"))))
728 (build-system gnu-build-system)
730 `(("pkg-config" ,pkg-config)
731 ("python" ,python-wrapper)
732 ("util-linux" ,util-linux)))
734 `(("btrfs-progs" ,btrfs-progs)
735 ("cryptsetup" ,cryptsetup)
736 ("dosfstools" ,dosfstools)
740 ("gobject-introspection" ,gobject-introspection)
742 ("libbytesize" ,libbytesize)
749 ("volume-key" ,volume-key)
750 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
752 (home-page "https://github.com/storaged-project/libblockdev")
753 (synopsis "Library for manipulating block devices")
755 "libblockdev is a C library supporting GObject introspection for
756 manipulation of block devices. It has a plugin-based architecture where each
757 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
758 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
760 (license license:lgpl2.1+)))
762 (define-public rmlint
769 (url "https://github.com/sahib/rmlint")
770 (commit (string-append "v" version))))
771 (file-name (git-file-name name version))
774 "1b5cziam14h80xrfb285fmfrzz2rligxcpsq1xsig14xf4l2875i"))))
775 (build-system scons-build-system)
777 `(#:scons ,scons-python2
778 #:scons-flags (list (string-append "--prefix=" %output)
779 (string-append "--actual-prefix=" %output))
780 #:tests? #f ; No tests?
782 (modify-phases %standard-phases
783 (add-after 'unpack 'scons-propagate-environment
784 (lambda* (#:key inputs #:allow-other-keys)
785 ;; TODO: `rmlint --gui` fails with
786 ;; "Failed to load shredder: No module named 'shredder'".
787 ;; The GUI might also need extra dependencies, such as
788 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
789 (substitute* "lib/cmdline.c"
790 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
792 "const char *commands[] = {\""
793 (assoc-ref inputs "python") "/bin/python"
794 "\", \"python\", NULL};")))
795 ;; By design, SCons does not, by default, propagate
796 ;; environment variables to subprocesses. See:
797 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
798 ;; Here, we modify the SConstruct file to arrange for
799 ;; environment variables to be propagated.
800 (substitute* "SConstruct"
801 (("^env = Environment\\(.*\\)" all)
804 "\nenv['ENV']=os.environ"))))))))
806 `(("pkg-config" ,pkg-config)
807 ("glib:bin" ,glib "bin")
808 ("python-sphinx" ,python-sphinx)))
810 `(("python" ,python-wrapper)
813 ("elfutils" ,elfutils)
814 ("json-glib" ,json-glib)
815 ("libblkid" ,util-linux)))
816 (home-page "https://rmlint.rtfd.org")
817 (synopsis "Remove duplicates and other lint from the file system")
818 (description "@command{rmlint} finds space waste and other broken things
819 on your file system and offers to remove it. @command{rmlint} can find:
822 @item duplicate files and duplicate directories,
823 @item non-stripped binaries (i.e. binaries with debug symbols),
824 @item broken symbolic links,
825 @item empty files and directories,
826 @item files with broken user and/or group ID.
828 (license license:gpl3+)))
837 (url "https://github.com/gokcehan/lf.git")
838 (commit (string-append "r" version))))
839 (file-name (git-file-name name version))
842 "1ld3q75v8rvp169w5p85z1vznqs9bhck6bm2f6fykxx16hmpb6ga"))))
843 (build-system go-build-system)
845 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
846 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
848 `(#:import-path "github.com/gokcehan/lf"))
849 (home-page "https://github.com/gokcehan/lf")
850 (synopsis "Console file browser similar to Ranger")
851 (description "lf (as in \"list files\") is a terminal file manager
852 written in Go. It is heavily inspired by ranger with some missing and
853 extra features. Some of the missing features are deliberately omitted
854 since they are better handled by external tools.")
855 (license license:expat)))