gnu: Add rust-sharded-slab-0.1.
[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–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>
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 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))
91
92 (define-public bcache-tools
93 ;; The 1.1 release is a year old and missing new features & documentation.
94 (let ((commit "096d205a9f1be8540cbc5a468c0da8203023de70")
95 (revision "0"))
96 (package
97 (name "bcache-tools")
98 (version (git-version "1.1" revision commit))
99 (source
100 (origin
101 (method git-fetch)
102 (uri (git-reference
103 (url (string-append "https://git.kernel.org/pub/scm/"
104 "linux/kernel/git/colyli/bcache-tools.git"))
105 (commit commit)))
106 (file-name (git-file-name name version))
107 (sha256
108 (base32 "0r0vwg4vacz5zgsafk360xn7gi2scy01c79mkmjrdyxjfij5z3iy"))))
109 (build-system gnu-build-system)
110 (arguments
111 `(#:tests? #f ; no test suite
112 #:make-flags
113 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
114 (string-append "UDEVLIBDIR=" (assoc-ref %outputs "out")
115 "/lib/udev")
116 (string-append "DRACUTLIBDIR=" (assoc-ref %outputs "out")
117 "/lib/dracut")
118 (string-append "CC=" ,(cc-for-target)))
119 #:phases
120 (modify-phases %standard-phases
121 (delete 'configure) ; no configure script
122 (add-before 'install 'fix-hard-coded-file-names
123 (lambda _
124 ;; Some rules still hard-code /usr.
125 (substitute* "Makefile"
126 (("/usr") "${PREFIX}"))
127 #t))
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"
134 "/sbin"
135 "/share/man/man8"))
136 #t))))))
137 (native-inputs
138 `(("pkg-config" ,pkg-config)))
139 (inputs
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")
143 (description
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.
147
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.
153
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))))
158
159 (define-public udevil
160 (package
161 (name "udevil")
162 (version "0.4.4")
163 (source
164 (origin
165 (method git-fetch)
166 (uri
167 (git-reference
168 (url "https://github.com/IgnorantGuru/udevil")
169 (commit version)))
170 (file-name (git-file-name name version))
171 (sha256
172 (base32 "0x9mjr9abvbxzfa9mrip5264iz1qxvsl01k3ybz95q4a7xl4jcb3"))))
173 (build-system gnu-build-system)
174 (arguments
175 `(#:configure-flags
176 (list
177 "--disable-systemd"
178 (string-append "--sysconfdir="
179 (assoc-ref %outputs "out")
180 "/etc")
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")
188 #:phases
189 (modify-phases %standard-phases
190 (add-after 'unpack 'remove-root-reference
191 (lambda _
192 (substitute* "src/Makefile.in"
193 (("-o root -g root") ""))
194 #t))
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.
199 (lambda _
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"))
204 #t)))))
205 (native-inputs
206 `(("intltool" ,intltool)
207 ("pkg-config" ,pkg-config)))
208 (inputs
209 `(("cifs-utils" ,cifs-utils)
210 ("curlftpfs" ,curlftpfs)
211 ("eudev" ,eudev)
212 ("fakeroot" ,fakeroot)
213 ("glib" ,glib)
214 ("sshfs" ,sshfs)))
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+)))
222
223 (define-public parted
224 (package
225 (name "parted")
226 (version "3.3")
227 (source (origin
228 (method url-fetch)
229 (uri (string-append "mirror://gnu/parted/parted-"
230 version ".tar.xz"))
231 (sha256
232 (base32
233 "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"))))
234 (build-system gnu-build-system)
235 (arguments
236 `(#:phases
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")))
244 #t)))))
245 (inputs
246 `(("lvm2" ,lvm2)
247 ("readline" ,readline)
248 ("util-linux" ,util-linux "lib")))
249 (native-inputs
250 `(("gettext" ,gettext-minimal)
251
252 ;; For the tests.
253 ("e2fsprogs" ,e2fsprogs)
254 ("perl" ,perl)
255 ("python" ,python-2)
256 ("util-linux" ,util-linux)))
257 (home-page "https://www.gnu.org/software/parted/")
258 (synopsis "Disk partition editor")
259 (description
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+)))
263
264 (define-public fdisk
265 (package
266 (name "fdisk")
267 (version "2.0.0a1")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
272 version ".tar.gz"))
273 (sha256
274 (base32
275 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
276 (build-system gnu-build-system)
277 (inputs
278 `(("gettext" ,gettext-minimal)
279 ("guile" ,guile-1.8)
280 ("util-linux" ,util-linux "lib")
281 ("parted" ,parted)))
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.
284 (arguments
285 `(#:phases
286 (modify-phases %standard-phases
287 (add-after 'unpack 'skip-broken-header-probes
288 (lambda _
289 (substitute* "backend/configure"
290 (("gnufdisk-common.h .*") "\n"))
291 #t)))
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")
298 (description
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+)))
303
304 (define-public gptfdisk
305 (package
306 (name "gptfdisk")
307 (version "1.0.5")
308 (source
309 (origin
310 (method url-fetch)
311 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
312 version "/gptfdisk-" version ".tar.gz"))
313 (sha256
314 (base32 "0bybgp30pqxb6x5krxazkq4drca0gz4inxj89fpyr204rn3kjz8f"))))
315 (build-system gnu-build-system)
316 (inputs
317 `(("gettext" ,gettext-minimal)
318 ("ncurses" ,ncurses)
319 ("popt" ,popt)
320 ("util-linux" ,util-linux "lib"))) ;libuuid
321 (arguments
322 `(#:test-target "test"
323 #:phases
324 (modify-phases %standard-phases
325 (add-after 'unpack 'fix-include-directory
326 (lambda _
327 (substitute* "gptcurses.cc"
328 (("ncursesw/ncurses.h") "ncurses.h"))
329 #t))
330 (delete 'configure) ; no configure script
331 (replace 'install
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
350 scheme.")
351 (license license:gpl2)))
352
353 (define-public ddrescue
354 (package
355 (name "ddrescue")
356 (version "1.25")
357 (source
358 (origin
359 (method url-fetch)
360 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
361 version ".tar.lz"))
362 (sha256
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)))
368 (description
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+)))
374
375 (define-public dosfstools
376 (package
377 (name "dosfstools")
378 (version "4.1")
379 (source
380 (origin
381 (method url-fetch)
382 (uri (string-append "https://github.com/" name "/" name
383 "/releases/download/v" version "/"
384 name "-" version ".tar.xz"))
385 (sha256
386 (base32
387 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
388 (build-system gnu-build-system)
389 (arguments
390 `(#:configure-flags (list "--enable-compat-symlinks")
391 #:make-flags (list (string-append "PREFIX=" %output)
392 "CC=gcc")))
393 (native-inputs
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")
397 (description
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+)))
401
402 (define dosfstools/static
403 (static-package
404 (package (inherit dosfstools))))
405
406 (define-public fatfsck/static
407 (package
408 (name "fatfsck-static")
409 (version (package-version dosfstools))
410 (build-system trivial-build-system)
411 (source #f)
412 (arguments
413 `(#:modules ((guix build utils))
414 #:builder
415 (begin
416 (use-modules (guix build utils))
417 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
418 "/sbin"))
419 (exe "fsck.fat")
420 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
421 (mkdir-p bin)
422 (with-directory-excursion bin
423 (copy-file (string-append src "/" exe) exe)
424 (remove-store-references exe)
425 (chmod exe #o555)
426 ;; Add fsck.vfat symlink to match the Linux driver name.
427 (symlink exe "fsck.vfat")
428 #t)))))
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))))
435
436 (define-public sdparm
437 (package
438 (name "sdparm")
439 (version "1.11")
440 (source
441 (origin
442 (method url-fetch)
443 (uri (string-append "http://sg.danny.cz/sg/p/"
444 "sdparm-" version ".tar.xz"))
445 (sha256
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")
450 (description
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)))
460
461 (define-public idle3-tools
462 (package
463 (name "idle3-tools")
464 (version "0.9.1")
465 (source
466 (origin
467 (method url-fetch)
468 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
469 version ".tgz"))
470 (sha256
471 (base32
472 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
473 (build-system gnu-build-system)
474 (arguments
475 `(#:tests? #f ;no test suite
476 #:phases
477 (modify-phases %standard-phases
478 (delete 'configure))
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")
485 (description
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+)))
492
493 (define-public gparted
494 (package
495 (name "gparted")
496 (version "1.1.0")
497 (source
498 (origin
499 (method url-fetch)
500 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
501 version "/gparted-" version ".tar.gz"))
502 (sha256
503 (base32 "092rgwjh1825fal6v3yafq2wr0i61hh0a2n0j4296zn0zdx7pzp2"))))
504 (build-system glib-or-gtk-build-system)
505 (arguments
506 ;; Tests require access to paths outside the build container, such
507 ;; as '/dev/disk/by-id'
508 `(#:tests? #f))
509 (inputs
510 `(("util-linux" ,util-linux "lib")
511 ("parted" ,parted)
512 ("glib" ,glib)
513 ("gtkmm" ,gtkmm)
514 ("libxml2" ,libxml2)))
515 (native-inputs
516 `(("intltool" ,intltool)
517 ("itstool" ,itstool)
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+)))
529
530 (define-public pydf
531 (package
532 (name "pydf")
533 (version "12")
534 (source
535 (origin
536 (method url-fetch)
537 (uri (pypi-uri "pydf" version))
538 (sha256
539 (base32
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)))
549
550 (define-public f3
551 (package
552 (name "f3")
553 (version "8.0")
554 (source
555 (origin
556 (method git-fetch)
557 (uri (git-reference
558 (url "https://github.com/AltraMayor/f3")
559 (commit (string-append "v" version))))
560 (file-name (git-file-name name version))
561 (sha256
562 (base32 "17l5vspfcgfbkqg7bakp3gql29yb05gzawm8n3im30ilzdr53678"))))
563 (build-system gnu-build-system)
564 (arguments
565 `(#:tests? #f ; no check target
566 #:make-flags (list (string-append "CC=" ,(cc-for-target))
567 (string-append "PREFIX=" %output))
568 #:phases
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))))))
577 (inputs
578 `(("eudev" ,eudev)
579 ("parted" ,parted)))
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+)))
587
588 (define-public python-parted
589 (package
590 (name "python-parted")
591 (version "3.11.7")
592 (source
593 (origin
594 (method git-fetch)
595 (uri (git-reference
596 (url "https://github.com/dcantrell/pyparted")
597 (commit (string-append "v" version))))
598 (file-name (git-file-name name version))
599 (sha256
600 (base32 "01193fmkss9icjvqpw85szpk8ld1pnha7p9kqm7mpwk6rc6gi2m3"))))
601 (build-system python-build-system)
602 (arguments
603 `(#:phases
604 (modify-phases %standard-phases
605 (delete 'check)
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")
613 #t)))))
614 (native-inputs
615 `(("e2fsprogs" ,e2fsprogs)
616 ("pkg-config" ,pkg-config)))
617 (propagated-inputs
618 `(("python-six" ,python-six)))
619 (inputs
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+)))
625
626 (define-public duperemove
627 (package
628 (name "duperemove")
629 (version "0.11.2")
630 (source
631 (origin
632 (method git-fetch)
633 (uri (git-reference
634 (url "https://github.com/markfasheh/duperemove")
635 (commit (string-append "v" version))))
636 (sha256
637 (base32 "1a87mka2sfzhbch2jip6wlvvs0glxq9lqwmyrp359d1rmwwmqiw9"))
638 (file-name (git-file-name name version))))
639 (build-system gnu-build-system)
640 (native-inputs
641 `(("pkg-config" ,pkg-config)))
642 (inputs
643 `(("glib" ,glib)
644 ("sqlite" ,sqlite)))
645 (arguments
646 `(#:tests? #f ; no test suite
647 #:phases
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}.
662
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.
667
668 Duperemove can also take input from the @command{fdupes} program.")
669 (license license:gpl2)))
670
671 (define-public ranger
672 (package
673 (name "ranger")
674 (version "1.9.3")
675 (source (origin
676 (method url-fetch)
677 (uri (string-append "https://ranger.github.io/"
678 "ranger-" version ".tar.gz"))
679 (sha256
680 (base32
681 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
682 (build-system python-build-system)
683 (inputs
684 `(("w3m" ,w3m)))
685 (native-inputs
686 `(("which" ,which)
687
688 ;; For tests.
689 ("python-pytest" ,python-pytest)))
690 (arguments
691 '( ;; The 'test' target runs developer tools like pylint, which fail.
692 #:test-target "test_pytest"
693 #:phases
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")))
703 (wrap-program ranger
704 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
705 #t)))
706 (replace 'check
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)))
717
718 (define-public volume-key
719 (package
720 (name "volume-key")
721 (version "0.3.12")
722 (source (origin
723 (method url-fetch)
724 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
725 version ".tar.xz"))
726 (sha256
727 (base32
728 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
729 (build-system gnu-build-system)
730 (native-inputs
731 `(("pkg-config" ,pkg-config)
732 ("swig" ,swig)
733 ("python" ,python-3))) ; used to generate the Python bindings
734 (inputs
735 `(("cryptsetup" ,cryptsetup)
736 ("nss" ,nss)
737 ("libblkid" ,util-linux "lib")
738 ("lvm2" ,lvm2) ; for "-ldevmapper"
739 ("glib" ,glib)
740 ("gpgme" ,gpgme)))
741 (arguments
742 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
743 #:phases
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")))
750 #t))))))
751 (home-page "https://pagure.io/volume_key")
752 (synopsis "Manipulate storage volume encryption keys")
753 (description
754 "This package provides a library for manipulating storage volume
755 encryption keys and storing them separately from volumes to handle forgotten
756 passphrases.")
757 (license license:gpl2)))
758
759 (define-public ndctl
760 (package
761 (name "ndctl")
762 (version "71.1")
763 (source (origin
764 (method git-fetch)
765 (uri (git-reference
766 (url "https://github.com/pmem/ndctl")
767 (commit (string-append "v" version))))
768 (file-name (git-file-name name version))
769 (sha256
770 (base32
771 "1vi61bm9wyawklswh9mj9zdp28ar7r97qckwnhgiyila73fb3jx2"))))
772 (build-system gnu-build-system)
773 (native-inputs
774 `(("asciidoc" ,asciidoc)
775 ("automake" ,automake)
776 ("autoconf" ,autoconf)
777 ("bash-completion" ,bash-completion)
778 ("docbook-xsl" ,docbook-xsl)
779 ("libtool" ,libtool)
780 ("libxml2" ,libxml2)
781 ("pkg-config" ,pkg-config)
782 ("xmlto" ,xmlto)
783 ;; Required for offline docbook generation.
784 ("which" ,which)))
785 (inputs
786 `(("eudev" ,eudev)
787 ("json-c" ,json-c)
788 ("keyutils" ,keyutils)
789 ("kmod" ,kmod)
790 ("util-linux" ,util-linux "lib")))
791 (arguments
792 `(#:configure-flags
793 (list "--disable-asciidoctor" ; use docbook-xsl instead
794 "--without-systemd")
795 #:phases
796 (modify-phases %standard-phases
797 (add-after 'unpack 'patch-FHS-file-names
798 (lambda _
799 (substitute* "git-version-gen"
800 (("/bin/sh") (which "sh")))
801 (substitute* "git-version"
802 (("/bin/bash") (which "bash")))
803 #t)))
804 #:make-flags
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")
810 (description
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)))
817
818 (define-public dmraid
819 (package
820 (name "dmraid")
821 (version "1.0.0.rc16-3")
822 (source (origin
823 (method url-fetch)
824 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
825 version ".tar.bz2"))
826 (sha256
827 (base32
828 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
829 (build-system gnu-build-system)
830 (inputs `(("lvm2" ,lvm2)))
831 (native-inputs `(("which" ,which)))
832 (arguments
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>.
837 #:parallel-build? #f
838 #:phases (modify-phases %standard-phases
839 (add-before 'configure 'change-directory
840 (lambda _
841 (chdir (string-append ,version "/dmraid"))
842 (substitute* "make.tmpl.in"
843 (("/bin/sh") (which "sh")))
844 #t)))
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")
849 "/lib"))))
850 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
851 (synopsis "Device mapper RAID interface")
852 (description
853 "This software supports RAID device discovery, RAID set activation, creation,
854 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
855
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+)))
859
860 (define-public libblockdev
861 (package
862 (name "libblockdev")
863 (version "2.24")
864 (source (origin
865 (method url-fetch)
866 (uri (string-append "https://github.com/storaged-project/"
867 "libblockdev/releases/download/"
868 version "-1/libblockdev-" version ".tar.gz"))
869 (sha256
870 (base32
871 "0wq7624pnprvfzrf39bq1cybd9lqwawbdg5bm0cchlpgvdq7q86w"))))
872 (build-system gnu-build-system)
873 (arguments
874 `(#:phases
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)))))))))
881 (native-inputs
882 `(("gobject-introspection" ,gobject-introspection)
883 ("pkg-config" ,pkg-config)
884 ("python" ,python-wrapper)
885 ("util-linux" ,util-linux)))
886 (inputs
887 `(("btrfs-progs" ,btrfs-progs)
888 ("cryptsetup" ,cryptsetup)
889 ("dosfstools" ,dosfstools)
890 ("dmraid" ,dmraid)
891 ("eudev" ,eudev)
892 ("glib" ,glib)
893 ("kmod" ,kmod)
894 ("libbytesize" ,libbytesize)
895 ("libyaml" ,libyaml)
896 ("lvm2" ,lvm2)
897 ("mdadm" ,mdadm)
898 ("ndctl" ,ndctl)
899 ("nss" ,nss)
900 ("parted" ,parted)
901 ("volume-key" ,volume-key)
902 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
903 ))
904 (home-page "https://github.com/storaged-project/libblockdev")
905 (synopsis "Library for manipulating block devices")
906 (description
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
911 LVM D-Bus API).")
912 (license license:lgpl2.1+)))
913
914 (define-public rmlint
915 (package
916 (name "rmlint")
917 (version "2.10.1")
918 (source (origin
919 (method git-fetch)
920 (uri (git-reference
921 (url "https://github.com/sahib/rmlint")
922 (commit (string-append "v" version))))
923 (file-name (git-file-name name version))
924 (sha256
925 (base32
926 "15xfkcw1bkfyf3z8kl23k3rlv702m0h7ghqxvhniynvlwbgh6j2x"))))
927 (build-system scons-build-system)
928 (arguments
929 `(#:scons ,scons-python2
930 #:scons-flags (list (string-append "--prefix=" %output)
931 (string-append "--actual-prefix=" %output))
932 #:tests? #f ; No tests?
933 #:phases
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\\};")
943 (string-append
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)
954 (string-append
955 all
956 "\nenv['ENV']=os.environ"))))))))
957 (native-inputs
958 `(("pkg-config" ,pkg-config)
959 ("glib:bin" ,glib "bin")
960 ("python-sphinx" ,python-sphinx)))
961 (inputs
962 `(("python" ,python-wrapper)
963 ("glib" ,glib)
964 ("libelf" ,libelf)
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:
972
973 @itemize
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.
979 @end itemize\n")
980 (license license:gpl3+)))
981
982 (define-public lf
983 (package
984 (name "lf")
985 (version "13")
986 (source (origin
987 (method git-fetch)
988 (uri (git-reference
989 (url "https://github.com/gokcehan/lf")
990 (commit (string-append "r" version))))
991 (file-name (git-file-name name version))
992 (sha256
993 (base32
994 "1ld3q75v8rvp169w5p85z1vznqs9bhck6bm2f6fykxx16hmpb6ga"))))
995 (build-system go-build-system)
996 (native-inputs
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)))
999 (arguments
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)))
1008
1009 (define-public xfe
1010 (package
1011 (name "xfe")
1012 (version "1.43.2")
1013 (source
1014 (origin
1015 (method url-fetch)
1016 (uri
1017 (string-append "mirror://sourceforge/xfe/xfe/" version "/"
1018 "xfe-" version ".tar.gz"))
1019 (sha256
1020 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs"))))
1021 (build-system gnu-build-system)
1022 (arguments
1023 `(#:phases
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"
1034 "../st/config.h")
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))))
1042 #t)))
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)))
1053 #t))))))
1054 (native-inputs
1055 `(("intltool" ,intltool)
1056 ("pkg-config" ,pkg-config)))
1057 (inputs
1058 `(("bash" ,bash)
1059 ("coreutils" ,coreutils)
1060 ("file" ,file)
1061 ("findutils" ,findutils)
1062 ("fox" ,fox)
1063 ("freetype" ,freetype)
1064 ("x11" ,libx11)
1065 ("xcb" ,libxcb)
1066 ("xcb-util" ,xcb-util)
1067 ("xft" ,libxft)
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+)))
1075
1076 (define-public hddtemp
1077 (package
1078 (name "hddtemp")
1079 (version "0.3-beta15")
1080 (source (origin
1081 (method url-fetch)
1082 (uri (string-append "mirror://savannah/hddtemp/hddtemp-"
1083 version
1084 ".tar.bz2"))
1085 (sha256
1086 (base32
1087 "0nzgg4nl8zm9023wp4dg007z6x3ir60rwbcapr9ks2al81c431b1"))))
1088 (build-system gnu-build-system)
1089 (arguments
1090 `(#:configure-flags (list (string-append
1091 "--with-db-path="
1092 (assoc-ref %outputs "out")
1093 "/share/hddtemp/hddtemp.db"))
1094 #:phases
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)))))))
1102 (inputs
1103 `(("db" ,(origin
1104 (method url-fetch)
1105 (uri "mirror://savannah/hddtemp/hddtemp.db")
1106 (sha256
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+)))
1114
1115 (define-public memkind
1116 (package
1117 (name "memkind")
1118 (version "1.10.1")
1119 (source (origin
1120 (method git-fetch)
1121 (uri (git-reference
1122 (url "https://github.com/memkind/memkind")
1123 (commit (string-append "v" version))))
1124 (file-name (git-file-name name version))
1125 (sha256
1126 (base32
1127 "11iz887f3cp5pzf1bzm644wzab8gkbhz3b7x1w6pcps71yd94ylj"))))
1128 (build-system gnu-build-system)
1129 (inputs
1130 `(;; memkind patched jemalloc to add je_arenalookupx,
1131 ;; je_check_reallocatex--i.e. they forked jemalloc.
1132 ;("jemalloc" ,jemalloc)
1133 ("ndctl" ,ndctl)
1134 ("numactl" ,numactl)))
1135 (native-inputs
1136 `(("autoconf" ,autoconf)
1137 ("automake" ,automake)
1138 ("libtool" ,libtool)))
1139 (arguments
1140 `(#:tests? #f ; Tests require a NUMA-enabled system.
1141 #:phases
1142 (modify-phases %standard-phases
1143 (add-before 'build 'autogen-jemalloc
1144 (lambda _
1145 (with-directory-excursion "jemalloc"
1146 (substitute* "Makefile.in"
1147 (("/bin/sh") (which "sh")))
1148 (invoke "autoconf")
1149 (substitute* "configure"
1150 (("/bin/sh") (which "sh"))))
1151 #t)))))
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)))