gnu: ecl: Update to 20.4.24.
[jackhill/guix/guix.git] / gnu / packages / disk.scm
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>
19 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
20 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
21 ;;;
22 ;;; This file is part of GNU Guix.
23 ;;;
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.
28 ;;;
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.
33 ;;;
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/>.
36
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 fontutils)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnome)
55 #:use-module (gnu packages gnupg)
56 #:use-module (gnu packages graphics)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages guile)
59 #:use-module (gnu packages linux)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages nss)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages popt)
65 #:use-module (gnu packages python)
66 #:use-module (gnu packages python-xyz)
67 #:use-module (gnu packages readline)
68 #:use-module (gnu packages samba)
69 #:use-module (gnu packages sphinx)
70 #:use-module (gnu packages sqlite)
71 #:use-module (gnu packages swig)
72 #:use-module (gnu packages terminals)
73 #:use-module (gnu packages textutils)
74 #:use-module (gnu packages vim)
75 #:use-module (gnu packages w3m)
76 #:use-module (gnu packages web)
77 #:use-module (gnu packages xml)
78 #:use-module (gnu packages xorg)
79 #:use-module (guix build-system gnu)
80 #:use-module (guix build-system go)
81 #:use-module (guix build-system python)
82 #:use-module (guix build-system trivial)
83 #:use-module (guix build-system scons)
84 #:use-module (guix download)
85 #:use-module (guix git-download)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (guix packages))
88
89 (define-public udevil
90 (package
91 (name "udevil")
92 (version "0.4.4")
93 (source
94 (origin
95 (method git-fetch)
96 (uri
97 (git-reference
98 (url "https://github.com/IgnorantGuru/udevil.git")
99 (commit version)))
100 (file-name (git-file-name name version))
101 (sha256
102 (base32 "0x9mjr9abvbxzfa9mrip5264iz1qxvsl01k3ybz95q4a7xl4jcb3"))))
103 (build-system gnu-build-system)
104 (arguments
105 `(#:configure-flags
106 (list "--disable-systemd"
107 (string-append "--sysconfdir="
108 (assoc-ref %outputs "out")
109 "/etc"))
110 #:phases
111 (modify-phases %standard-phases
112 (add-after 'unpack 'remove-root-reference
113 (lambda _
114 (substitute* "src/Makefile.in"
115 (("-o root -g root") ""))
116 #t)))))
117 (native-inputs
118 `(("intltool" ,intltool)
119 ("pkg-config" ,pkg-config)))
120 (inputs
121 `(("cifs-utils" ,cifs-utils)
122 ("curlftpfs" ,curlftpfs)
123 ("eudev" ,eudev)
124 ("fakeroot" ,fakeroot)
125 ("glib" ,glib)
126 ("sshfs" ,sshfs)))
127 (synopsis "Device and file system manager")
128 (description "udevil is a command line program that mounts and unmounts
129 removable devices without a password, shows device info, and monitors device
130 changes. It can also mount ISO files, NFS, SMB, FTP, SSH and WebDAV URLs, and
131 tmpfs/ramfs filesystems.")
132 (home-page "https://ignorantguru.github.io/udevil/")
133 (license license:gpl3+)))
134
135 (define-public parted
136 (package
137 (name "parted")
138 (version "3.3")
139 (source (origin
140 (method url-fetch)
141 (uri (string-append "mirror://gnu/parted/parted-"
142 version ".tar.xz"))
143 (sha256
144 (base32
145 "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"))))
146 (build-system gnu-build-system)
147 (arguments
148 `(#:phases
149 (modify-phases %standard-phases
150 (add-after 'unpack 'fix-locales-and-python
151 (lambda* (#:key inputs #:allow-other-keys)
152 (substitute* "tests/t0251-gpt-unicode.sh"
153 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
154 (substitute* "tests/msdos-overlap"
155 (("/usr/bin/python") (which "python")))
156 #t)))))
157 (inputs
158 `(("lvm2" ,lvm2)
159 ("readline" ,readline)
160 ("util-linux" ,util-linux)))
161 (native-inputs
162 `(("gettext" ,gettext-minimal)
163 ;; For the tests.
164 ("e2fsprogs" ,e2fsprogs)
165 ("perl" ,perl)
166 ("python" ,python-2)))
167 (home-page "https://www.gnu.org/software/parted/")
168 (synopsis "Disk partition editor")
169 (description
170 "GNU Parted is a package for creating and manipulating disk partition
171 tables. It includes a library and command-line utility.")
172 (license license:gpl3+)))
173
174 (define-public fdisk
175 (package
176 (name "fdisk")
177 (version "2.0.0a1")
178 (source
179 (origin
180 (method url-fetch)
181 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
182 version ".tar.gz"))
183 (sha256
184 (base32
185 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
186 (build-system gnu-build-system)
187 (inputs
188 `(("gettext" ,gettext-minimal)
189 ("guile" ,guile-1.8)
190 ("util-linux" ,util-linux)
191 ("parted" ,parted)))
192 ;; The build neglects to look for its own headers in its own tree. A next
193 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
194 (arguments
195 `(#:phases
196 (modify-phases %standard-phases
197 (add-after 'unpack 'skip-broken-header-probes
198 (lambda _
199 (substitute* "backend/configure"
200 (("gnufdisk-common.h .*") "\n"))
201 #t)))
202 #:make-flags (list (string-append "CPPFLAGS="
203 " -I../common/include "
204 " -I../debug/include "
205 " -I../exception/include"))))
206 (home-page "https://www.gnu.org/software/fdisk/")
207 (synopsis "Low-level disk partitioning and formatting")
208 (description
209 "GNU fdisk provides a GNU version of the common disk partitioning tool
210 fdisk. fdisk is used for the creation and manipulation of disk partition
211 tables, and it understands a variety of different formats.")
212 (license license:gpl3+)))
213
214 (define-public gptfdisk
215 (package
216 (name "gptfdisk")
217 (version "1.0.5")
218 (source
219 (origin
220 (method url-fetch)
221 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
222 version "/gptfdisk-" version ".tar.gz"))
223 (sha256
224 (base32 "0bybgp30pqxb6x5krxazkq4drca0gz4inxj89fpyr204rn3kjz8f"))))
225 (build-system gnu-build-system)
226 (inputs
227 `(("gettext" ,gettext-minimal)
228 ("ncurses" ,ncurses)
229 ("popt" ,popt)
230 ("util-linux" ,util-linux))) ; libuuid
231 (arguments
232 `(#:test-target "test"
233 #:phases
234 (modify-phases %standard-phases
235 (add-after 'unpack 'fix-include-directory
236 (lambda _
237 (substitute* "gptcurses.cc"
238 (("ncursesw/ncurses.h") "ncurses.h"))
239 #t))
240 (delete 'configure) ; no configure script
241 (replace 'install
242 ;; There's no ‘make install’ target.
243 (lambda* (#:key outputs #:allow-other-keys)
244 (let* ((out (assoc-ref outputs "out"))
245 (bin (string-append out "/bin"))
246 (man (string-append out "/share/man/man8")))
247 (install-file "gdisk" bin)
248 (install-file "sgdisk" bin)
249 (install-file "cgdisk" bin)
250 (install-file "fixparts" bin)
251 (install-file "cgdisk.8" man)
252 (install-file "fixparts.8" man)
253 (install-file "gdisk.8" man)
254 (install-file "sgdisk.8" man)))))))
255 (home-page "https://www.rodsbooks.com/gdisk/")
256 (synopsis "Low-level GPT disk partitioning and formatting")
257 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
258 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
259 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
260 scheme.")
261 (license license:gpl2)))
262
263 (define-public ddrescue
264 (package
265 (name "ddrescue")
266 (version "1.25")
267 (source
268 (origin
269 (method url-fetch)
270 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
271 version ".tar.lz"))
272 (sha256
273 (base32 "0qqh38izl5ppap9a5izf3hijh94k65s3zbfkczd4b7x04syqwlyf"))))
274 (build-system gnu-build-system)
275 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
276 (synopsis "Data recovery utility")
277 (native-inputs `(("lzip" ,lzip)))
278 (description
279 "GNU ddrescue is a fully automated data recovery tool. It copies data
280 from one file to another, working to rescue data in case of read errors. The
281 program also includes a tool for manipulating its log files, which are used
282 to recover data more efficiently by only reading the necessary blocks.")
283 (license license:gpl3+)))
284
285 (define-public dosfstools
286 (package
287 (name "dosfstools")
288 (version "4.1")
289 (source
290 (origin
291 (method url-fetch)
292 (uri (string-append "https://github.com/" name "/" name
293 "/releases/download/v" version "/"
294 name "-" version ".tar.xz"))
295 (sha256
296 (base32
297 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
298 (build-system gnu-build-system)
299 (arguments
300 `(#:configure-flags (list "--enable-compat-symlinks")
301 #:make-flags (list (string-append "PREFIX=" %output)
302 "CC=gcc")))
303 (native-inputs
304 `(("xxd" ,xxd))) ; for tests
305 (home-page "https://github.com/dosfstools/dosfstools")
306 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
307 (description
308 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
309 which respectively make and check MS-DOS FAT file systems.")
310 (license license:gpl3+)))
311
312 (define dosfstools/static
313 (static-package
314 (package (inherit dosfstools))))
315
316 (define-public fatfsck/static
317 (package
318 (name "fatfsck-static")
319 (version (package-version dosfstools))
320 (build-system trivial-build-system)
321 (source #f)
322 (arguments
323 `(#:modules ((guix build utils))
324 #:builder
325 (begin
326 (use-modules (guix build utils))
327 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
328 "/sbin"))
329 (exe "fsck.fat")
330 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
331 (mkdir-p bin)
332 (with-directory-excursion bin
333 (copy-file (string-append src "/" exe) exe)
334 (remove-store-references exe)
335 (chmod exe #o555)
336 ;; Add fsck.vfat symlink to match the Linux driver name.
337 (symlink exe "fsck.vfat")
338 #t)))))
339 (inputs `(("dosfstools" ,dosfstools/static)))
340 (home-page (package-home-page dosfstools))
341 (synopsis "Statically linked fsck.fat from dosfstools")
342 (description "This package provides a statically-linked @command{fsck.fat}
343 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
344 (license (package-license dosfstools))))
345
346 (define-public sdparm
347 (package
348 (name "sdparm")
349 (version "1.11")
350 (source
351 (origin
352 (method url-fetch)
353 (uri (string-append "http://sg.danny.cz/sg/p/"
354 "sdparm-" version ".tar.xz"))
355 (sha256
356 (base32 "1nqjc4w2w47zavcbf5xmm53x1zbwgljaw1lpajcdi537cgy32fa8"))))
357 (build-system gnu-build-system)
358 (home-page "http://sg.danny.cz/sg/sdparm.html")
359 (synopsis "Provide access to SCSI device parameters")
360 (description
361 "Sdparm reads and modifies SCSI device parameters. These devices can be
362 SCSI disks, in which case the role of @command{sdparm} is similar to its
363 namesake: the @command{hdparm} utility originally designed for ATA disks.
364 However, @command{sdparm} can be used to access parameters on any device that
365 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
366 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
367 also send commands associated with starting and stopping the media, loading
368 and unloading removable media and some other housekeeping functions.")
369 (license license:bsd-3)))
370
371 (define-public idle3-tools
372 (package
373 (name "idle3-tools")
374 (version "0.9.1")
375 (source
376 (origin
377 (method url-fetch)
378 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
379 version ".tgz"))
380 (sha256
381 (base32
382 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
383 (build-system gnu-build-system)
384 (arguments
385 `(#:tests? #f ;no test suite
386 #:phases
387 (modify-phases %standard-phases
388 (delete 'configure))
389 #:make-flags (list "CC=gcc"
390 (string-append "manprefix=")
391 (string-append "DESTDIR="
392 (assoc-ref %outputs "out")))))
393 (home-page "http://idle3-tools.sourceforge.net")
394 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
395 (description
396 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
397 present in many Western Digital hard drives. This timer is part of the
398 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
399 the default timer setting is not well suited to Linux or other *nix systems,
400 and can dramatically shorten the lifespan of the drive if left unchecked.")
401 (license license:gpl3+)))
402
403 (define-public gparted
404 (package
405 (name "gparted")
406 (version "1.1.0")
407 (source
408 (origin
409 (method url-fetch)
410 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
411 version "/gparted-" version ".tar.gz"))
412 (sha256
413 (base32 "092rgwjh1825fal6v3yafq2wr0i61hh0a2n0j4296zn0zdx7pzp2"))))
414 (build-system gnu-build-system)
415 (arguments
416 ;; Tests require access to paths outside the build container, such
417 ;; as '/dev/disk/by-id'
418 `(#:tests? #f))
419 (inputs
420 `(("util-linux" ,util-linux)
421 ("parted" ,parted)
422 ("glib" ,glib)
423 ("gtkmm" ,gtkmm)
424 ("libxml2" ,libxml2)))
425 (native-inputs
426 `(("intltool" ,intltool)
427 ("itstool" ,itstool)
428 ("lvm2" ,lvm2) ; for tests
429 ("yelp-tools" ,yelp-tools)
430 ("pkg-config" ,pkg-config)))
431 (home-page "https://gparted.org/")
432 (synopsis "Partition editor to graphically manage disk partitions")
433 (description "GParted is a GNOME partition editor for creating,
434 reorganizing, and deleting disk partitions. It uses libparted from the parted
435 project to detect and manipulate partition tables. Optional file system tools
436 permit managing file systems not included in libparted.")
437 ;; The home page says GPLv2, but the source code says GPLv2+.
438 (license license:gpl2+)))
439
440 (define-public pydf
441 (package
442 (name "pydf")
443 (version "12")
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "pydf" version))
448 (sha256
449 (base32
450 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
451 (build-system python-build-system)
452 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
453 (synopsis "Colourised @command{df} clone")
454 (description "All-singing, all-dancing, fully colourised @command{df} clone
455 written in Python. It displays the amount of disk space available on the
456 mounted file systems, using different colours for different types of file
457 systems. Output format is completely customizable.")
458 (license license:public-domain)))
459
460 (define-public f3
461 (package
462 (name "f3")
463 (version "7.2")
464 (source
465 (origin
466 (method git-fetch)
467 (uri (git-reference
468 (url "https://github.com/AltraMayor/f3.git")
469 (commit (string-append "v" version))))
470 (file-name (git-file-name name version))
471 (sha256
472 (base32 "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy"))))
473 (build-system gnu-build-system)
474 (arguments
475 '(#:tests? #f ; no check target
476 #:make-flags (list "CC=gcc"
477 (string-append "PREFIX=" %output))
478 #:phases
479 (modify-phases %standard-phases
480 (delete 'configure) ; no configure script
481 (add-after 'build 'build-extra
482 (lambda* (#:key make-flags #:allow-other-keys)
483 (apply invoke "make" "extra" make-flags)))
484 (add-after 'build 'install-extra
485 (lambda* (#:key make-flags #:allow-other-keys)
486 (apply invoke "make" "install-extra" make-flags))))))
487 (inputs
488 `(("eudev" ,eudev)
489 ("parted" ,parted)))
490 (home-page "http://oss.digirati.com.br/f3/")
491 (synopsis "Test real capacity of flash memory cards and such.")
492 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
493 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
494 the card and then checks if can read it. It will assure you haven't been sold
495 a card with a smaller capacity than stated.")
496 (license license:gpl3+)))
497
498 (define-public python-parted
499 (package
500 (name "python-parted")
501 (version "3.11.2")
502 (source
503 (origin
504 (method git-fetch)
505 (uri (git-reference
506 (url "https://github.com/dcantrell/pyparted.git")
507 (commit (string-append "v" version))))
508 (file-name (git-file-name name version))
509 (sha256
510 (base32 "0r6916n3w4vldxrq30a3z2iagvxgly4vfmlidjm65vwqnyv17bvn"))))
511 (build-system python-build-system)
512 (arguments
513 `(#:phases
514 (modify-phases %standard-phases
515 (delete 'check)
516 (add-after 'install 'check
517 (lambda* (#:key outputs inputs #:allow-other-keys)
518 (add-installed-pythonpath inputs outputs)
519 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
520 (substitute* "tests/test__ped_ped.py"
521 (("\"/tmp/temp-device-\"") "self.path"))
522 (invoke "python" "-m" "unittest" "discover" "-v")
523 #t)))))
524 (native-inputs
525 `(("e2fsprogs" ,e2fsprogs)
526 ("pkg-config" ,pkg-config)))
527 (propagated-inputs
528 `(("python-six" ,python-six)))
529 (inputs
530 `(("parted" ,parted)))
531 (home-page "https://github.com/dcantrell/pyparted")
532 (synopsis "Parted bindings for Python")
533 (description "This package provides @code{parted} bindings for Python.")
534 (license license:gpl2+)))
535
536 (define-public python2-parted
537 (package-with-python2 python-parted))
538
539 (define-public duperemove
540 (package
541 (name "duperemove")
542 (version "0.11.1")
543 (source
544 (origin
545 (method git-fetch)
546 (uri (git-reference
547 (url "https://github.com/markfasheh/duperemove.git")
548 (commit (string-append "v" version))))
549 (sha256
550 (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z"))
551 (file-name (git-file-name name version))))
552 (build-system gnu-build-system)
553 (native-inputs
554 `(("pkg-config" ,pkg-config)))
555 (inputs
556 `(("glib" ,glib)
557 ("sqlite" ,sqlite)))
558 (arguments
559 `(#:tests? #f ; no test suite
560 #:phases
561 (modify-phases %standard-phases
562 (delete 'configure)) ; no configure script
563 #:make-flags (list (string-append "PREFIX=" %output)
564 "CC=gcc")))
565 (home-page "https://github.com/markfasheh/duperemove")
566 (synopsis "Tools for de-duplicating file system data")
567 (description "Duperemove is a simple tool for finding duplicated extents
568 and submitting them for deduplication. When given a list of files it will
569 hash their contents on a block by block basis and compare those hashes to each
570 other, finding and categorizing blocks that match each other. When given the
571 @option{-d} option, duperemove will submit those extents for deduplication
572 using the Linux kernel extent-same @code{ioctl}.
573
574 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
575 existing hash file, duperemove will only compute hashes for those files which
576 have changed since the last run. Thus you can run duperemove repeatedly on
577 your data as it changes, without having to re-checksum unchanged data.
578
579 Duperemove can also take input from the @command{fdupes} program.")
580 (license license:gpl2)))
581
582 (define-public ranger
583 (package
584 (name "ranger")
585 (version "1.9.3")
586 (source (origin
587 (method url-fetch)
588 (uri (string-append "https://ranger.github.io/"
589 "ranger-" version ".tar.gz"))
590 (sha256
591 (base32
592 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
593 (build-system python-build-system)
594 (inputs
595 `(("w3m" ,w3m)))
596 (native-inputs
597 `(("which" ,which)
598
599 ;; For tests.
600 ("python-pytest" ,python-pytest)))
601 (arguments
602 '( ;; The 'test' target runs developer tools like pylint, which fail.
603 #:test-target "test_pytest"
604 #:phases
605 (modify-phases %standard-phases
606 (add-after 'configure 'wrap-program
607 ;; Tell 'ranger' where 'w3mimgdisplay' is.
608 (lambda* (#:key inputs outputs #:allow-other-keys)
609 (let* ((out (assoc-ref outputs "out"))
610 (ranger (string-append out "/bin/ranger"))
611 (w3m (assoc-ref inputs "w3m"))
612 (w3mimgdisplay (string-append w3m
613 "/libexec/w3m/w3mimgdisplay")))
614 (wrap-program ranger
615 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
616 #t)))
617 (replace 'check
618 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
619 (lambda* (#:key test-target #:allow-other-keys)
620 (invoke "make" test-target))))))
621 (home-page "https://ranger.github.io/")
622 (synopsis "Console file manager")
623 (description "ranger is a console file manager with Vi key bindings. It
624 provides a minimalistic and nice curses interface with a view on the directory
625 hierarchy. It ships with @code{rifle}, a file launcher that is good at
626 automatically finding out which program to use for what file type.")
627 (license license:gpl3)))
628
629 (define-public volume-key
630 (package
631 (name "volume-key")
632 (version "0.3.12")
633 (source (origin
634 (method url-fetch)
635 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
636 version ".tar.xz"))
637 (sha256
638 (base32
639 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
640 (build-system gnu-build-system)
641 (native-inputs
642 `(("pkg-config" ,pkg-config)
643 ("swig" ,swig)
644 ("python" ,python-3))) ; used to generate the Python bindings
645 (inputs
646 `(("cryptsetup" ,cryptsetup)
647 ("nss" ,nss)
648 ("libblkid" ,util-linux)
649 ("lvm2" ,lvm2) ; for "-ldevmapper"
650 ("glib" ,glib)
651 ("gpgme" ,gpgme)))
652 (arguments
653 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
654 #:phases
655 (modify-phases %standard-phases
656 (add-before 'configure 'patch-python.h-path
657 (lambda* (#:key inputs #:allow-other-keys)
658 (let ((python (assoc-ref inputs "python")))
659 (substitute* "Makefile.in"
660 (("/usr/include/python") (string-append python "/include/python")))
661 #t))))))
662 (home-page "https://pagure.io/volume_key")
663 (synopsis "Manipulate storage volume encryption keys")
664 (description
665 "This package provides a library for manipulating storage volume
666 encryption keys and storing them separately from volumes to handle forgotten
667 passphrases.")
668 (license license:gpl2)))
669
670 (define-public ndctl
671 (package
672 (name "ndctl")
673 (version "68")
674 (source (origin
675 (method git-fetch)
676 (uri (git-reference
677 (url "https://github.com/pmem/ndctl.git")
678 (commit (string-append "v" version))))
679 (file-name (git-file-name name version))
680 (sha256
681 (base32
682 "0xmim7z4qp6x2ggndnbwd940c73pa1qlf3hxyn3qh5pyr69nh9y8"))))
683 (build-system gnu-build-system)
684 (native-inputs
685 `(("asciidoc" ,asciidoc)
686 ("automake" ,automake)
687 ("autoconf" ,autoconf)
688 ("bash-completion" ,bash-completion)
689 ("docbook-xsl" ,docbook-xsl)
690 ("libtool" ,libtool)
691 ("libxml2" ,libxml2)
692 ("pkg-config" ,pkg-config)
693 ("xmlto" ,xmlto)
694 ;; Required for offline docbook generation.
695 ("which" ,which)))
696 (inputs
697 `(("eudev" ,eudev)
698 ("json-c" ,json-c)
699 ("keyutils" ,keyutils)
700 ("kmod" ,kmod)
701 ("util-linux" ,util-linux)))
702 (arguments
703 `(#:configure-flags
704 (list "--disable-asciidoctor" ; use docbook-xsl instead
705 "--without-systemd")
706 #:phases
707 (modify-phases %standard-phases
708 (add-after 'unpack 'patch-FHS-file-names
709 (lambda _
710 (substitute* "git-version-gen"
711 (("/bin/sh") (which "sh")))
712 (substitute* "git-version"
713 (("/bin/bash") (which "bash")))
714 #t)))
715 #:make-flags
716 (let ((out (assoc-ref %outputs "out")))
717 (list (string-append "BASH_COMPLETION_DIR=" out
718 "/share/bash-completion/completions")))))
719 (home-page "https://github.com/pmem/ndctl")
720 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
721 (description
722 "This package provides a utility library for managing the
723 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
724 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
725 ;; the effective license. Note that some files under ccan/ are
726 ;; covered by BSD-3 or public domain, see the individual folders.
727 (license license:gpl2)))
728
729 (define-public dmraid
730 (package
731 (name "dmraid")
732 (version "1.0.0.rc16-3")
733 (source (origin
734 (method url-fetch)
735 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
736 version ".tar.bz2"))
737 (sha256
738 (base32
739 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
740 (build-system gnu-build-system)
741 (inputs `(("lvm2" ,lvm2)))
742 (native-inputs `(("which" ,which)))
743 (arguments
744 `(#:tests? #f ; No tests.
745 ;; Prevent a race condition where some target would attempt to link
746 ;; libdmraid.so before it had been built as reported in
747 ;; <https://bugs.gnu.org/31999#187>.
748 #:parallel-build? #f
749 #:phases (modify-phases %standard-phases
750 (add-before 'configure 'change-directory
751 (lambda _
752 (chdir (string-append ,version "/dmraid"))
753 (substitute* "make.tmpl.in"
754 (("/bin/sh") (which "sh")))
755 #t)))
756 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
757 ;; find libdmraid.so.
758 (string-append "LDFLAGS=-Wl,-rpath="
759 (assoc-ref %outputs "out")
760 "/lib"))))
761 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
762 (synopsis "Device mapper RAID interface")
763 (description
764 "This software supports RAID device discovery, RAID set activation, creation,
765 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
766
767 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
768 to create devices with respective mappings for the ATARAID sets discovered.")
769 (license license:gpl2+)))
770
771 (define-public libblockdev
772 (package
773 (name "libblockdev")
774 (version "2.23")
775 (source (origin
776 (method url-fetch)
777 (uri (string-append "https://github.com/storaged-project/"
778 "libblockdev/releases/download/"
779 version "-1/libblockdev-" version ".tar.gz"))
780 (sha256
781 (base32
782 "15c7g2gbkahmy8c6677pvbvblan5h8jxcqqmn6nlvqwqynq2mkjm"))))
783 (build-system gnu-build-system)
784 (native-inputs
785 `(("pkg-config" ,pkg-config)
786 ("python" ,python-wrapper)
787 ("util-linux" ,util-linux)))
788 (inputs
789 `(("btrfs-progs" ,btrfs-progs)
790 ("cryptsetup" ,cryptsetup)
791 ("dosfstools" ,dosfstools)
792 ("dmraid" ,dmraid)
793 ("eudev" ,eudev)
794 ("glib" ,glib)
795 ("gobject-introspection" ,gobject-introspection)
796 ("kmod" ,kmod)
797 ("libbytesize" ,libbytesize)
798 ("libyaml" ,libyaml)
799 ("lvm2" ,lvm2)
800 ("mdadm" ,mdadm)
801 ("ndctl" ,ndctl)
802 ("nss" ,nss)
803 ("parted" ,parted)
804 ("volume-key" ,volume-key)
805 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
806 ))
807 (home-page "https://github.com/storaged-project/libblockdev")
808 (synopsis "Library for manipulating block devices")
809 (description
810 "libblockdev is a C library supporting GObject introspection for
811 manipulation of block devices. It has a plugin-based architecture where each
812 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
813 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
814 LVM D-Bus API).")
815 (license license:lgpl2.1+)))
816
817 (define-public rmlint
818 (package
819 (name "rmlint")
820 (version "2.9.0")
821 (source (origin
822 (method git-fetch)
823 (uri (git-reference
824 (url "https://github.com/sahib/rmlint")
825 (commit (string-append "v" version))))
826 (file-name (git-file-name name version))
827 (sha256
828 (base32
829 "1b5cziam14h80xrfb285fmfrzz2rligxcpsq1xsig14xf4l2875i"))))
830 (build-system scons-build-system)
831 (arguments
832 `(#:scons ,scons-python2
833 #:scons-flags (list (string-append "--prefix=" %output)
834 (string-append "--actual-prefix=" %output))
835 #:tests? #f ; No tests?
836 #:phases
837 (modify-phases %standard-phases
838 (add-after 'unpack 'scons-propagate-environment
839 (lambda* (#:key inputs #:allow-other-keys)
840 ;; TODO: `rmlint --gui` fails with
841 ;; "Failed to load shredder: No module named 'shredder'".
842 ;; The GUI might also need extra dependencies, such as
843 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
844 (substitute* "lib/cmdline.c"
845 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
846 (string-append
847 "const char *commands[] = {\""
848 (assoc-ref inputs "python") "/bin/python"
849 "\", \"python\", NULL};")))
850 ;; By design, SCons does not, by default, propagate
851 ;; environment variables to subprocesses. See:
852 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
853 ;; Here, we modify the SConstruct file to arrange for
854 ;; environment variables to be propagated.
855 (substitute* "SConstruct"
856 (("^env = Environment\\(.*\\)" all)
857 (string-append
858 all
859 "\nenv['ENV']=os.environ"))))))))
860 (native-inputs
861 `(("pkg-config" ,pkg-config)
862 ("glib:bin" ,glib "bin")
863 ("python-sphinx" ,python-sphinx)))
864 (inputs
865 `(("python" ,python-wrapper)
866 ("glib" ,glib)
867 ("libelf" ,libelf)
868 ("elfutils" ,elfutils)
869 ("json-glib" ,json-glib)
870 ("libblkid" ,util-linux)))
871 (home-page "https://rmlint.rtfd.org")
872 (synopsis "Remove duplicates and other lint from the file system")
873 (description "@command{rmlint} finds space waste and other broken things
874 on your file system and offers to remove it. @command{rmlint} can find:
875
876 @itemize
877 @item duplicate files and duplicate directories,
878 @item non-stripped binaries (i.e. binaries with debug symbols),
879 @item broken symbolic links,
880 @item empty files and directories,
881 @item files with broken user and/or group ID.
882 @end itemize\n")
883 (license license:gpl3+)))
884
885 (define-public lf
886 (package
887 (name "lf")
888 (version "13")
889 (source (origin
890 (method git-fetch)
891 (uri (git-reference
892 (url "https://github.com/gokcehan/lf.git")
893 (commit (string-append "r" version))))
894 (file-name (git-file-name name version))
895 (sha256
896 (base32
897 "1ld3q75v8rvp169w5p85z1vznqs9bhck6bm2f6fykxx16hmpb6ga"))))
898 (build-system go-build-system)
899 (native-inputs
900 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
901 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
902 (arguments
903 `(#:import-path "github.com/gokcehan/lf"))
904 (home-page "https://github.com/gokcehan/lf")
905 (synopsis "Console file browser similar to Ranger")
906 (description "lf (as in \"list files\") is a terminal file manager
907 written in Go. It is heavily inspired by ranger with some missing and
908 extra features. Some of the missing features are deliberately omitted
909 since they are better handled by external tools.")
910 (license license:expat)))
911
912 (define-public xfe
913 (package
914 (name "xfe")
915 (version "1.43.2")
916 (source
917 (origin
918 (method url-fetch)
919 (uri
920 (string-append "https://sourceforge.net/projects/xfe/files/xfe/"
921 version
922 "/xfe-" version ".tar.gz"))
923 (sha256
924 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs"))))
925 (build-system gnu-build-system)
926 (native-inputs
927 `(("intltool" ,intltool)
928 ("pkg-config" ,pkg-config)))
929 (inputs
930 `(("fox" ,fox)
931 ("freetype" ,freetype)
932 ("x11" ,libx11)
933 ("xcb" ,libxcb)
934 ("xcb-util" ,xcb-util)
935 ("xft" ,libxft)
936 ("xrandr" ,libxrandr)))
937 (arguments
938 `(#:phases
939 (modify-phases %standard-phases
940 (add-after 'unpack 'patch-xferc-path
941 (lambda* (#:key outputs #:allow-other-keys)
942 (let* ((out (assoc-ref outputs "out"))
943 (xferc (string-append out "/share/xfe/xferc")))
944 (substitute* "src/XFileExplorer.cpp"
945 (("/usr/share/xfe/xferc") xferc))
946 #t))))
947 #:make-flags
948 (let ((out (assoc-ref %outputs "out")))
949 (list (string-append "BASH_COMPLETION_DIR=" out
950 "/share/bash-completion/completions")))))
951 (synopsis "File Manager for X-Based Graphical Systems")
952 (description"XFE (X File Explorer) is a file manager for X. It is based on
953 the popular but discontinued, X Win Commander. It aims to be the file manager
954 of choice for all light thinking Unix addicts!")
955 (home-page "http://roland65.free.fr/xfe/")
956 (license license:gpl2+)))