projects/guix·blob python-team · refs

2137 lines · 85.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013 Nikita Karetnikov <[email protected]>
3;;; Copyright © 2015 Mathieu Lirzin <[email protected]>
4;;; Copyright © 2015 Mark H Weaver <[email protected]>
5;;; Copyright © 2016, 2018–2022 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2016, 2019-2021, 2023, 2025 Efraim Flashner <[email protected]>
7;;; Copyright © 2016, 2023, 2024 Janneke Nieuwenhuizen <[email protected]>
8;;; Copyright © 2016 Roel Janssen <[email protected]>
9;;; Copyright © 2016, 2017 Marius Bakke <[email protected]>
10;;; Copyright © 2017 Hartmut Goebel <[email protected]>
11;;; Copyright © 2017 Stefan Reichör <[email protected]>
12;;; Copyright © 2018 Vasile Dumitrascu <[email protected]>
13;;; Copyright © 2018 Eric Bavier <[email protected]>
14;;; Copyright © 2018 Rutger Helling <[email protected]>
15;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <[email protected]>
16;;; Copyright © 2019, 2021 Leo Famulari <[email protected]>
17;;; Copyright © 2019 Pierre Langlois <[email protected]>
18;;; Copyright © 2020 Pkill -9 <[email protected]>
19;;; Copyright © 2020 Vincent Legoll <[email protected]>
20;;; Copyright © 2020 Raghav Gururajan <[email protected]>
21;;; Copyright © 2021 Michael Rohleder <[email protected]>
22;;; Copyright © 2021 Mathieu Othacehe <[email protected]>
23;;; Copyright © 2021 Brice Waegeneire <[email protected]>
24;;; Copyright © 2021 Justin Veilleux <[email protected]>
25;;; Copyright © 2021 Sarah Morgensen <[email protected]>
26;;; Copyright © 2014, 2022 Ludovic Courtès <[email protected]>
27;;; Copyright © 2022, 2025 Maxim Cournoyer <[email protected]>
28;;; Copyright © 2022 Disseminate Dissent <[email protected]>
29;;; Copyright © 2023 Timotej Lazar <[email protected]>
30;;; Copyright © 2023 Morgan Smith <[email protected]>
31;;; Copyright © 2023 Zheng Junjie <[email protected]>
32;;; Copyright © 2024-2025 Sharlatan Hellseher <[email protected]>
33;;; Copyright © 2025 Ashish SHUKLA <[email protected]>
34;;; Copyright © 2025, 2026 Vinicius Monego <[email protected]>
35;;; Copyright © 2025 Grigory Shepelev <[email protected]>
36;;; Copyright © 2026 Luis Guilherme Coelho <[email protected]>
37;;; Copyright © 2026 Murilo <[email protected]>
38
39;;;
40;;; This file is part of GNU Guix.
41;;;
42;;; GNU Guix is free software; you can redistribute it and/or modify it
43;;; under the terms of the GNU General Public License as published by
44;;; the Free Software Foundation; either version 3 of the License, or (at
45;;; your option) any later version.
46;;;
47;;; GNU Guix is distributed in the hope that it will be useful, but
48;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50;;; GNU General Public License for more details.
51;;;
52;;; You should have received a copy of the GNU General Public License
53;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
54
55(define-module (gnu packages disk)
56 #:use-module ((guix licenses) #:prefix license:)
57 #:use-module (guix build-system cargo)
58 #:use-module (guix build-system glib-or-gtk)
59 #:use-module (guix build-system gnu)
60 #:use-module (guix build-system go)
61 #:use-module (guix build-system meson)
62 #:use-module (guix build-system perl)
63 #:use-module (guix build-system pyproject)
64 #:use-module (guix build-system qt)
65 #:use-module (guix build-system scons)
66 #:use-module (guix build-system trivial)
67 #:use-module (guix download)
68 #:use-module (guix gexp)
69 #:use-module (guix git-download)
70 #:use-module (guix packages)
71 #:use-module (guix utils)
72 #:use-module (gnu packages)
73 #:use-module (gnu packages admin)
74 #:use-module (gnu packages autotools)
75 #:use-module (gnu packages base)
76 #:use-module (gnu packages bash)
77 #:use-module (gnu packages build-tools)
78 #:use-module (gnu packages c)
79 #:use-module (gnu packages nss)
80 #:use-module (gnu packages check)
81 #:use-module (gnu packages compression)
82 #:use-module (gnu packages crypto)
83 #:use-module (gnu packages cryptsetup)
84 #:use-module (gnu packages databases)
85 #:use-module (gnu packages digest)
86 #:use-module (gnu packages docbook)
87 #:use-module (gnu packages documentation)
88 #:use-module (gnu packages elf)
89 #:use-module (gnu packages file)
90 #:use-module (gnu packages file-systems)
91 #:use-module (gnu packages fontutils)
92 #:use-module (gnu packages freedesktop)
93 #:use-module (gnu packages gettext)
94 #:use-module (gnu packages glib)
95 #:use-module (gnu packages gnome)
96 #:use-module (gnu packages gnupg)
97 #:use-module (gnu packages golang-build)
98 #:use-module (gnu packages golang-check)
99 #:use-module (gnu packages golang-compression)
100 #:use-module (gnu packages golang-xyz)
101 #:use-module (gnu packages graphics)
102 #:use-module (gnu packages gtk)
103 #:use-module (gnu packages guile)
104 #:use-module (gnu packages hurd)
105 #:use-module (gnu packages image)
106 #:use-module (gnu packages imagemagick)
107 #:use-module (gnu packages jemalloc)
108 #:use-module (gnu packages libbsd)
109 #:use-module (gnu packages linux)
110 #:use-module (gnu packages lua)
111 #:use-module (gnu packages ncurses)
112 #:use-module (gnu packages nss)
113 #:use-module (gnu packages perl)
114 #:use-module (gnu packages perl-web)
115 #:use-module (gnu packages pkg-config)
116 #:use-module (gnu packages popt)
117 #:use-module (gnu packages python)
118 #:use-module (gnu packages python-build)
119 #:use-module (gnu packages python-crypto)
120 #:use-module (gnu packages python-web)
121 #:use-module (gnu packages python-xyz)
122 #:use-module (gnu packages qt)
123 #:use-module (gnu packages readline)
124 #:use-module (gnu packages regex)
125 #:use-module (gnu packages rust)
126 #:use-module (gnu packages samba)
127 #:use-module (gnu packages serialization)
128 #:use-module (gnu packages sphinx)
129 #:use-module (gnu packages sqlite)
130 #:use-module (gnu packages swig)
131 #:use-module (gnu packages terminals)
132 #:use-module (gnu packages textutils)
133 #:use-module (gnu packages tls)
134 #:use-module (gnu packages vim)
135 #:use-module (gnu packages w3m)
136 #:use-module (gnu packages web)
137 #:use-module (gnu packages xml)
138 #:use-module (gnu packages xorg))
139
140(define-public bcache-tools
141 ;; The 1.1 release is a year old and missing new features & documentation.
142 (let ((commit "096d205a9f1be8540cbc5a468c0da8203023de70")
143 (revision "0"))
144 (package
145 (name "bcache-tools")
146 (version (git-version "1.1" revision commit))
147 (source
148 (origin
149 (method git-fetch)
150 (uri (git-reference
151 (url (string-append "https://git.kernel.org/pub/scm/"
152 "linux/kernel/git/colyli/bcache-tools.git"))
153 (commit commit)))
154 (file-name (git-file-name name version))
155 (sha256
156 (base32 "0r0vwg4vacz5zgsafk360xn7gi2scy01c79mkmjrdyxjfij5z3iy"))))
157 (build-system gnu-build-system)
158 (arguments
159 `(#:tests? #f ; no test suite
160 #:make-flags
161 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
162 (string-append "UDEVLIBDIR=" (assoc-ref %outputs "out")
163 "/lib/udev")
164 (string-append "DRACUTLIBDIR=" (assoc-ref %outputs "out")
165 "/lib/dracut")
166 (string-append "CC=" ,(cc-for-target)))
167 #:phases
168 (modify-phases %standard-phases
169 (delete 'configure) ; no configure script
170 (add-before 'install 'fix-hard-coded-file-names
171 (lambda _
172 ;; Some rules still hard-code /usr.
173 (substitute* "Makefile"
174 (("/usr") "${PREFIX}"))
175 #t))
176 (add-before 'install 'create-target-directories
177 (lambda* (#:key outputs #:allow-other-keys)
178 (let* ((out (assoc-ref outputs "out")))
179 (for-each (lambda (dir)
180 (mkdir-p (string-append out dir)))
181 (list "/lib/udev/rules.d"
182 "/sbin"
183 "/share/man/man8"))
184 #t))))))
185 (native-inputs
186 (list pkg-config))
187 (inputs
188 `(("util-linux:lib" ,util-linux "lib"))) ; libblkid
189 (home-page "https://bcache.evilpiepirate.org")
190 (synopsis "Tools for the Linux kernel block layer cache")
191 (description
192 "This package contains user-space utilities to create and inspect bcache
193partitions. It's rather minimal as bcache is designed to work well without
194configuration on any system.
195
196Linux's @acronym{bcache, block layer cache} lets one or more fast block devices,
197such as flash-based @acronym{SSDs, solid state drives}, to act as a cache for
198one or more slower (and inexpensive) devices, such as hard disk drives or
199redundant storage arrays. In fact, bcache intends to be a superior alternative
200to battery-backed RAID controllers.
201
202Bcache is designed around the performance characteristics of SSDs and tries to
203minimize write inflation. It's file-system agnostic and does both write-through
204and write-back caching.")
205 (license license:gpl2))))
206
207(define-public udevil
208 (package
209 (name "udevil")
210 (version "0.4.4")
211 (source
212 (origin
213 (method git-fetch)
214 (uri
215 (git-reference
216 (url "https://github.com/IgnorantGuru/udevil")
217 (commit version)))
218 (file-name (git-file-name name version))
219 (sha256
220 (base32 "0x9mjr9abvbxzfa9mrip5264iz1qxvsl01k3ybz95q4a7xl4jcb3"))))
221 (build-system gnu-build-system)
222 (arguments
223 `(#:configure-flags
224 (list
225 "--disable-systemd"
226 (string-append "--sysconfdir="
227 (assoc-ref %outputs "out")
228 "/etc")
229 ;; udevil expects these programs to be run with an UID of root.
230 ;; mount and umount are %default-privileged-programs on Guix System;
231 ;; the others must be explicitly added if desired.
232 "--with-mount-prog=/run/privileged/bin/mount"
233 "--with-umount-prog=/run/privileged/bin/umount"
234 "--with-losetup-prog=/run/privileged/bin/losetup"
235 "--with-setfacl-prog=/run/privileged/bin/setfacl")
236 #:phases
237 (modify-phases %standard-phases
238 (add-after 'unpack 'remove-root-reference
239 (lambda _
240 (substitute* "src/Makefile.in"
241 (("-o root -g root") ""))
242 #t))
243 (add-after 'unpack 'patch-udevil-reference
244 ;; udevil expects itself to be run with uid set as root.
245 ;; devmon also expects udevil to be run with uid set as root.
246 ;; user has to manually add udevil to privileged-programs.
247 (lambda _
248 (substitute* "src/udevil.c"
249 (("/usr/bin/udevil") "/run/privileged/bin/udevil"))
250 (substitute* "src/devmon"
251 (("`which udevil 2>/dev/null`") "/run/privileged/bin/udevil"))
252 #t)))))
253 (native-inputs
254 (list intltool pkg-config))
255 (inputs
256 (list cifs-utils
257 curlftpfs
258 eudev
259 fakeroot
260 glib
261 sshfs))
262 (synopsis "Device and file system manager")
263 (description "udevil is a command line program that mounts and unmounts
264removable devices without a password, shows device info, and monitors device
265changes. It can also mount ISO files, NFS, SMB, FTP, SSH and WebDAV URLs, and
266tmpfs/ramfs filesystems.")
267 (home-page "https://ignorantguru.github.io/udevil/")
268 (license license:gpl3+)))
269
270(define-public parted
271 (package
272 (name "parted")
273 (version "3.7")
274 (source (origin
275 (method url-fetch)
276 (uri (string-append "mirror://gnu/parted/parted-"
277 version ".tar.xz"))
278 (sha256
279 (base32
280 "0yzga4cjq3yplqs47dl9714vwc3v3v8nxrj80rdc5wx4c5syb380"))))
281 (build-system gnu-build-system)
282 (arguments
283 (list
284 #:configure-flags (if (target-hurd?)
285 #~'("--disable-device-mapper")
286 #~'())
287 #:tests? (not (or (target-hurd?)
288 (%current-target-system)))
289 #:phases
290 #~(modify-phases %standard-phases
291 (add-after 'unpack 'fix-locales-and-python
292 (lambda _
293 (substitute* "tests/msdos-overlap"
294 (("/usr/bin/python") (which "python"))))))))
295 (inputs
296 `(,@(if (target-hurd?)
297 (list hurd-minimal)
298 (list lvm2))
299 ,readline
300 (,util-linux "lib")))
301 (native-inputs
302 (list gettext-minimal
303 pkg-config
304
305 ;; For the tests.
306 e2fsprogs
307 perl
308 python-wrapper
309 util-linux))
310 (outputs '("out" "debug"))
311 (home-page "https://www.gnu.org/software/parted/")
312 (synopsis "Disk partition editor")
313 (description
314 "GNU Parted is a package for creating and manipulating disk partition
315tables. It includes a library and command-line utility.")
316 (license license:gpl3+)))
317
318(define-public fdisk
319 (package
320 (name "fdisk")
321 (version "2.0.0a1")
322 (source
323 (origin
324 (method url-fetch)
325 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
326 version ".tar.gz"))
327 (sha256
328 (base32
329 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
330 (build-system gnu-build-system)
331 (inputs
332 `(("gettext" ,gettext-minimal)
333 ("guile" ,guile-1.8)
334 ("libxcrypt" ,libxcrypt)
335 ("util-linux" ,util-linux "lib")
336 ("parted" ,parted)))
337 ;; The build neglects to look for its own headers in its own tree. A next
338 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
339 (arguments
340 `(#:phases
341 (modify-phases %standard-phases
342 (add-after 'unpack 'skip-broken-header-probes
343 (lambda _
344 (substitute* "backend/configure"
345 (("gnufdisk-common.h .*") "\n"))
346 #t)))
347 #:make-flags (list (string-append "CPPFLAGS="
348 " -I../common/include "
349 " -I../debug/include "
350 " -I../exception/include")
351 (string-append
352 "CFLAGS="
353 "-Wno-error=implicit-function-declaration "
354 "-Wno-error=incompatible-pointer-types"))))
355 (home-page "https://www.gnu.org/software/fdisk/")
356 (synopsis "Low-level disk partitioning and formatting")
357 (description
358 "GNU fdisk provides a GNU version of the common disk partitioning tool
359fdisk. fdisk is used for the creation and manipulation of disk partition
360tables, and it understands a variety of different formats.")
361 (license license:gpl3+)))
362
363(define-public findimagedupes
364 (package
365 (name "findimagedupes")
366 (version "2.20.1")
367 (source
368 (origin
369 (method git-fetch)
370 (uri (git-reference
371 (url "https://github.com/jhnc/findimagedupes")
372 (commit version)))
373 (file-name (git-file-name name version))
374 (sha256
375 (base32 "1zfxmc6c1z4hzsq3k85xxida1v291frq4wbmxv9cg4jmw0ddk5ic"))))
376 (build-system perl-build-system)
377 (arguments
378 (list
379 #:tests? #f
380 #:phases #~(modify-phases %standard-phases
381 (delete 'configure)
382 (delete 'build)
383 (replace 'install
384 ;; There's no ‘make install’ target.
385 (lambda* (#:key outputs #:allow-other-keys)
386 (install-file "findimagedupes"
387 (string-append #$output "/bin"))))
388 (add-after 'unpack 'use-image-magick
389 ;; TODO: package perl-graphics-magick and switch this out
390 (lambda _
391 (substitute* "findimagedupes"
392 (("Graphics::Magick")
393 "Image::Magick"))))
394 (add-after 'unpack 'set-inline-dir
395 (lambda _
396 (substitute* "findimagedupes"
397 (("/usr/local")
398 #$output))))
399 (add-after 'install 'inline-generation
400 (lambda _
401 (mkdir-p (string-append #$output "/lib/findimagedupes"))
402 (invoke (string-append #$output "/bin/findimagedupes"))))
403 (add-after 'install 'wrap-findimagedupes
404 (lambda* (#:key outputs #:allow-other-keys)
405 (wrap-program (string-append #$output
406 "/bin/findimagedupes")
407 `("PERL5LIB" ":" prefix
408 (,(getenv "PERL5LIB") ,(string-append #$output
409 "/lib/perl5/site_perl")))))))))
410 (inputs (list bash-minimal perl-db-file perl-file-mimeinfo
411 perl-image-magick perl-inline-c))
412 (home-page "https://github.com/jhnc/findimagedupes")
413 (synopsis "Find visually similar or duplicate images")
414 (description "findimagedupes compares a list of files for visual
415similarity.")
416 (license license:gpl3+)))
417
418(define-public gdu
419 (package
420 (name "gdu")
421 (version "5.36.1")
422 (source
423 (origin
424 (method git-fetch)
425 (uri (git-reference
426 (url "https://github.com/dundee/gdu")
427 (commit (string-append "v" version))))
428 (file-name (git-file-name name version))
429 (sha256
430 (base32 "1wpmflp0jmmpzynn420ywgd0nvgm10ijdwksqgn97f48f1yibllf"))))
431 (build-system go-build-system)
432 (arguments
433 (list
434 #:install-source? #f
435 #:import-path "github.com/dundee/gdu/v5/cmd/gdu"
436 #:unpack-path "github.com/dundee/gdu/v5"
437 #:test-subdirs #~(list "../../...")))
438 (native-inputs
439 (list go-github-com-dgraph-io-badger-v4
440 go-github-com-fatih-color
441 go-github-com-gdamore-tcell-v2
442 go-github-com-h2non-filetype
443 go-github-com-maruel-natural
444 go-github-com-mattn-go-isatty
445 go-github-com-pkg-errors
446 go-github-com-rivo-tview
447 go-github-com-sirupsen-logrus
448 go-github-com-spf13-cobra
449 go-github-com-stretchr-testify
450 go-github-com-ulikunitz-xz
451 go-golang-org-x-sys
452 go-golang-org-x-text
453 go-gopkg-in-yaml-v3
454 go-modernc-org-sqlite))
455 (home-page "https://github.com/dundee/gdu")
456 (synopsis "Disk usage analyzer")
457 (description "Gdu is a disk usage analyzer written in Go. It is intended
458primarily for SSD disks where it can fully utilize parallel processing, but it
459also works on HDDs.")
460 (license license:expat)))
461
462(define-public gpart
463 ;; The latest (0.3) release is from 2015 and is missing a crash fix.
464 (let ((commit "ec03350a01ad69708b5a3e2d47b8e002b0eba6c9")
465 (revision "0"))
466 (package
467 (name "gpart")
468 (version (git-version "0.3" revision commit))
469 (source
470 (origin
471 (method git-fetch)
472 (uri (git-reference
473 (url "https://github.com/baruch/gpart")
474 (commit commit)))
475 (file-name (git-file-name name version))
476 (sha256
477 (base32 "1dassswliaiwhhmx7yz540yyxgk53fvg672dbvgc5q0v6cqrh5jx"))))
478 (build-system gnu-build-system)
479 (arguments
480 `(#:configure-flags
481 (list (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
482 ,name "-" ,version))
483 #:phases
484 (modify-phases %standard-phases
485 (add-after 'unpack 'skip-premature-configuration
486 (lambda _
487 (substitute* "autogen.sh"
488 (("\\./configure") "")))))))
489 (native-inputs
490 (list autoconf automake))
491 (home-page "https://github.com/baruch/gpart")
492 (synopsis "Guess and recover PC-style partition tables")
493 (description
494 "Gpart tries to guess the partitions on a PC-style, MBR-partitioned disk
495after they have been inadvertently deleted or the primary partition table at
496sector 0 damaged. In both cases, the contents of these partitions still exist
497on the disk but the operating system cannot access them.
498
499Gpart ignores the partition table and scans each sector of the device or image
500file for several known file system and partition types. Only partitions which
501have been formatted in some way can be recognized. Several file system guessing
502modules are built in; more can be written and loaded at run time.
503
504The guessed table can be restored manually, for example with @command{fdisk},
505written to a file, or---if you firmly believe it's entirely correct---directly
506to disk.
507
508It should be stressed that gpart does a very heuristic job. It can easily be
509right in its guesswork but it can also be terribly wrong. Never believe its
510output without any plausibility checks.")
511 (license license:gpl2+))))
512
513(define-public gptfdisk
514 (package
515 (name "gptfdisk")
516 (version "1.0.10")
517 (source
518 (origin
519 (method url-fetch)
520 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
521 version "/gptfdisk-" version ".tar.gz"))
522 (sha256
523 (base32 "10m2jgb2m6r0m6snjh0lsxr7ljw0ic5l9h3ki54yrffjqqdxdgia"))))
524 (build-system gnu-build-system)
525 (arguments
526 `(#:test-target "test"
527 #:phases
528 (modify-phases %standard-phases
529 (add-after 'unpack 'fix-include-directory
530 (lambda _
531 (substitute* "gptcurses.cc"
532 (("ncursesw/ncurses.h") "ncurses.h"))))
533 (delete 'configure) ; no configure script
534 (replace 'install
535 ;; There's no ‘make install’ target.
536 (lambda* (#:key outputs #:allow-other-keys)
537 (let* ((out (assoc-ref outputs "out"))
538 (bin (string-append out "/bin"))
539 (man (string-append out "/share/man/man8")))
540 (install-file "gdisk" bin)
541 (install-file "sgdisk" bin)
542 (install-file "cgdisk" bin)
543 (install-file "fixparts" bin)
544 (install-file "cgdisk.8" man)
545 (install-file "fixparts.8" man)
546 (install-file "gdisk.8" man)
547 (install-file "sgdisk.8" man)))))))
548 (native-inputs
549 (list gettext-minimal))
550 (inputs
551 (list ncurses
552 popt
553 `(,util-linux "lib"))) ;libuuid
554 (home-page "https://www.rodsbooks.com/gdisk/")
555 (synopsis "Low-level GPT disk partitioning and formatting")
556 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
557works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
558disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
559scheme.")
560 (license license:gpl2)))
561
562(define-public ddrescue
563 (package
564 (name "ddrescue")
565 (version "1.30")
566 (source
567 (origin
568 (method url-fetch)
569 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
570 version ".tar.lz"))
571 (sha256
572 (base32 "0hjmfj4g5m2w5xqd80mwx64acnc85clli4f1ryhqfv4x60nn4r12"))))
573 (build-system gnu-build-system)
574 (arguments
575 `(#:configure-flags (list (string-append "CXX=" ,(cxx-for-target)))))
576 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
577 (synopsis "Data recovery utility")
578 (native-inputs (list lzip))
579 (description
580 "GNU ddrescue is a fully automated data recovery tool. It copies data
581from one file to another, working to rescue data in case of read errors. The
582program also includes a tool for manipulating its log files, which are used
583to recover data more efficiently by only reading the necessary blocks.")
584 (license license:gpl3+)))
585
586(define-public dosfstools
587 (package
588 (name "dosfstools")
589 (version "4.2")
590 (source
591 (origin
592 (method git-fetch)
593 (uri (git-reference
594 (url "https://github.com/dosfstools/dosfstools")
595 (commit (string-append "v" version))))
596 (file-name (git-file-name name version))
597 (sha256
598 (base32 "1xygsixmmc9l7drxylggnzkqqiks8zmlsbhg3z723ii2ak94236s"))))
599 (build-system gnu-build-system)
600 (arguments
601 `(#:configure-flags (list "--enable-compat-symlinks")
602 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
603 (string-append "CC=" ,(cc-for-target)))))
604 (native-inputs
605 (list autoconf automake
606 ;; For tests.
607 xxd))
608 (home-page "https://github.com/dosfstools/dosfstools")
609 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
610 (description
611 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
612which respectively make and check MS-DOS FAT file systems.")
613 (license license:gpl3+)))
614
615(define dosfstools/static
616 (static-package
617 (package (inherit dosfstools))))
618
619(define-public fatfsck/static
620 (package
621 (name "fatfsck-static")
622 (version (package-version dosfstools))
623 (build-system trivial-build-system)
624 (source #f)
625 (arguments
626 `(#:modules ((guix build utils))
627 #:builder
628 (begin
629 (use-modules (guix build utils))
630 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
631 "/sbin"))
632 (exe "fsck.fat")
633 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
634 (mkdir-p bin)
635 (with-directory-excursion bin
636 (copy-file (string-append src "/" exe) exe)
637 (remove-store-references exe)
638 (chmod exe #o555)
639 ;; Add fsck.vfat symlink to match the Linux driver name.
640 (symlink exe "fsck.vfat")
641 #t)))))
642 (inputs (list dosfstools/static))
643 (home-page (package-home-page dosfstools))
644 (synopsis "Statically linked fsck.fat from dosfstools")
645 (description "This package provides a statically-linked @command{fsck.fat}
646and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
647 (license (package-license dosfstools))))
648
649(define-public fatresize
650 (package
651 (name "fatresize")
652 (version "1.1.0")
653 (source (origin
654 (method git-fetch)
655 (uri (git-reference
656 (url "https://github.com/ya-mouse/fatresize")
657 (commit (string-append "v" version))))
658 (file-name (git-file-name name version))
659 (sha256
660 (base32
661 "1vhz84kxfyl0q7mkqn68nvzzly0a4xgzv76m6db0bk7xyczv1qr2"))))
662 (build-system gnu-build-system)
663 (native-inputs
664 (list pkg-config))
665 (inputs
666 (list parted))
667 (home-page "https://github.com/ya-mouse/fatresize")
668 (synopsis "Resize FAT partitions")
669 (description
670 "This package provides a tool to resize FAT partitions using libparted.")
671 (license license:gpl3+)))
672
673(define-public hdparm
674 (package
675 (name "hdparm")
676 (version "9.65")
677 (source (origin
678 (method url-fetch)
679 (uri (string-append "mirror://sourceforge/hdparm/hdparm/"
680 "hdparm-" version ".tar.gz"))
681 (sha256
682 (base32
683 "0jssagggg52ssl9kg99m88afghj7bm1854vyf4p96q6h23wjjjfi"))))
684 (build-system gnu-build-system)
685 (arguments
686 (list #:make-flags
687 #~(list (string-append "binprefix=" #$output)
688 (string-append "manprefix=" #$output)
689 (string-append "CC=" #$(cc-for-target))
690 ;; Let Guix strip binaries and not break cross-compilation.
691 "STRIP=true")
692 #:phases
693 #~(modify-phases %standard-phases
694 (delete 'configure)) ; no configure script
695 #:tests? #f)) ; no test suite
696 (home-page "https://sourceforge.net/projects/hdparm/")
697 (synopsis "View and tune ATA disk drive parameters")
698 (description
699 "@command{hdparm} is a command-line utility to control ATA controllers and
700disk drives. It can increase performance and/or reliability by careful tuning
701of hardware settings like power and acoustic management, DMA modes, and caching.
702It can also display detailed device information, or be used as a simple
703performance benchmarking tool.
704
705@command{hdparm} provides a command line interface to various Linux kernel
706interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
707IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
708Translation (@dfn{SAT}) are also supported.")
709 (license (license:non-copyleft "file://LICENSE.TXT"))))
710
711(define-public sdparm
712 (package
713 (name "sdparm")
714 (version "1.12")
715 (source
716 (origin
717 (method url-fetch)
718 (uri (string-append "http://sg.danny.cz/sg/p/"
719 "sdparm-" version ".tar.xz"))
720 (sha256
721 (base32 "1gmdxr36allrgap2j4dv238d8awkj327ww0jjwpjwrpbvfpyzjf4"))))
722 (build-system gnu-build-system)
723 (home-page "https://sg.danny.cz/sg/sdparm.html")
724 (synopsis "Provide access to SCSI device parameters")
725 (description
726 "Sdparm reads and modifies SCSI device parameters. These devices can be
727SCSI disks, in which case the role of @command{sdparm} is similar to its
728namesake: the @command{hdparm} utility originally designed for ATA disks.
729However, @command{sdparm} can be used to access parameters on any device that
730uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
731transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
732also send commands associated with starting and stopping the media, loading
733and unloading removable media and some other housekeeping functions.")
734 (license license:bsd-3)))
735
736(define-public open-isns
737 (package
738 (name "open-isns")
739 (version "0.103")
740 (source
741 (origin
742 (method git-fetch)
743 (uri (git-reference
744 (url "https://github.com/open-iscsi/open-isns")
745 (commit (string-append "v" version))))
746 (file-name (git-file-name name version))
747 (modules '((guix build utils)))
748 (sha256
749 (base32 "0008f4sv0z3mmqgf5ifx6rp7nwpp41qd3shhi3b2ci1ir8r91skf"))))
750 (build-system meson-build-system)
751 (arguments
752 (list
753 ;; TODO: Figure out how to run tests, "build" directory contains 0 files
754 ;; from "source/tests", attempt to run them from that directorie failed
755 ;; with error: no pid file: /tmp/isns-test/Test01/server0/pid
756 #:tests? #f
757 #:configure-flags
758 #~(list "-Dslp=disabled"
759 (string-append "-Dsystemddir=" #$output "/lib/systemd")
760 "--sharedstatedir=/var")
761 #:phases
762 #~(modify-phases %standard-phases
763 (add-after 'unpack 'fix-meson.build
764 (lambda _
765 (substitute* "meson.build"
766 (("/usr/lib64")
767 (string-append #$output "/lib"))
768 (("/var/lib")
769 (string-append #$output "/lib"))))))))
770 (native-inputs
771 (list meson
772 ninja
773 pkg-config))
774 (inputs
775 (list openssl))
776 (home-page "https://github.com/open-iscsi/open-isns")
777 (synopsis "Linux server and client for iSNS")
778 (description
779 "This package provides a partial implementation of @acronym{iSNS,
780 Internet Storage Name Service}, specified by
781@url{https://www.rfc-editor.org/rfc/rfc3720.html, RFC4171}. It's an
782maintained fork of https://github.com/cleech/open-isns.")
783 (license license:gpl2)))
784
785(define-public open-iscsi
786 (package
787 (name "open-iscsi")
788 (version "2.1.11")
789 (source
790 (origin
791 (method git-fetch)
792 (uri (git-reference
793 (url "https://github.com/open-iscsi/open-iscsi")
794 (commit version)))
795 (file-name (git-file-name name version))
796 (sha256
797 (base32 "0bafxz3vwk0wfa5r3cl3h9sngdfkll10i8467q8d0im4sj489kay"))))
798 (build-system meson-build-system)
799 (arguments
800 (list
801 ;; XXX: 2nd of 4th test fails with iSCSI ERROR: Could not open
802 ;; /run/lock/iscsi: 2: No such file or directory
803 ;; ../source/libopeniscsiusr/idbm.c:_idbm_lock():327
804 #:tests? #f
805 #:configure-flags
806 #~(list "-Dno_systemd=true"
807 (string-append "-Discsi_sbindir="
808 #$output "/sbin")
809 (string-append "--sbindir="
810 #$output "/sbin"))
811 #:phases
812 #~(modify-phases %standard-phases
813 (add-after 'unpack 'dont-install-to-/var
814 (lambda _
815 (substitute* "meson.build"
816 (("install_data\\(iscsi_etc_iface_file_src, install_dir: db_root \\/ 'ifaces'\\)")
817 "")))))))
818 (native-inputs
819 (list meson
820 ninja
821 perl
822 pkg-config))
823 (inputs
824 (list kmod
825 open-isns
826 openssl
827 (list util-linux "lib")))
828 (home-page "https://github.com/open-iscsi/open-iscsi")
829 (synopsis "Linux iSCSI tools")
830 (description
831 "The Open @acronym{iSCSI, Internet Small Computer Systems Interface}
832project is a high-performance, transport independent, multi-platform
833implementation of @url{https://www.rfc-editor.org/rfc/rfc3720.html, RFC3720}
834iSCSI.
835
836Features:
837@itemize
838@item highly optimized and very small-footprint data path
839@item persistent configuration database
840@item SendTargets discovery
841@item provides @acronym{CHAP, Challenge Handshake Authentication Protocol}
842support
843@item @acronym{PDU, Protocol Data Unit} header Digest
844@item multiple sessions
845@end itemize")
846 ;; The daemon and other top-level commands are licensed as GPLv3, while
847 ;; the libopeniscsiusr library used by some of those commmands is licensed
848 ;; as LGPLv3.
849 (license (list license:gpl2+ ;attached license
850 license:gpl3 ;mentioned in README
851 license:lgpl3)))) ;mentioned in README
852
853(define-public idle3-tools
854 (package
855 (name "idle3-tools")
856 (version "0.9.1")
857 (source
858 (origin
859 (method url-fetch)
860 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
861 version ".tgz"))
862 (sha256
863 (base32
864 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
865 (build-system gnu-build-system)
866 (arguments
867 `(#:tests? #f ;no test suite
868 #:phases
869 (modify-phases %standard-phases
870 (delete 'configure))
871 #:make-flags (list "CC=gcc"
872 (string-append "manprefix=")
873 (string-append "DESTDIR="
874 (assoc-ref %outputs "out")))))
875 (home-page "https://idle3-tools.sourceforge.net")
876 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
877 (description
878 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
879present in many Western Digital hard drives. This timer is part of the
880\"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
881the default timer setting is not well suited to Linux or other *nix systems,
882and can dramatically shorten the lifespan of the drive if left unchecked.")
883 (license license:gpl3+)))
884
885(define-public greaseweazle-host-tools
886 (package
887 (name "greaseweazle-host-tools")
888 (version "1.22")
889 (source (origin
890 (method git-fetch)
891 (uri (git-reference
892 (url "https://github.com/keirf/greaseweazle")
893 (commit (string-append "v" version))))
894 (file-name (git-file-name name version))
895 (sha256
896 (base32
897 "1ji5sq9jf0p44982zkb5dj2d3mrpy675k0mkyg3r17q5syz0wbia"))))
898 (build-system pyproject-build-system)
899 (arguments
900 (list
901 #:tests? #f ;XXX: root access is required, see: <scripts/tests/test.sh>
902 #:phases
903 #~(modify-phases %standard-phases
904 (add-after 'install 'install-udev-rules
905 (lambda _
906 (install-file "scripts/49-greaseweazle.rules"
907 (string-append #$output "/lib/udev/rules.d/")))))))
908 (native-inputs
909 (list python-setuptools
910 python-setuptools-scm))
911 (propagated-inputs
912 (list python-bitarray python-crcmod python-pyserial python-requests))
913 (synopsis "Tools for accessing a floppy drive at the raw flux level")
914 (description
915 "This package provides the host tools for controlling a Greaseweazle: an
916Open Source USB device capable of reading and writing raw data on nearly any
917type of floppy disk")
918 (home-page "https://github.com/keirf/greaseweazle")
919 (license license:public-domain)))
920
921(define-public gparted
922 (package
923 (name "gparted")
924 (version "1.6.0")
925 (source
926 (origin
927 (method url-fetch)
928 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
929 version "/gparted-" version ".tar.gz"))
930 (sha256
931 (base32 "0nzaqvbdwq3daddby79k9rh3d560g5kaxqamkasxqka9rsrm37wv"))))
932 (build-system glib-or-gtk-build-system)
933 (arguments
934 ;; Tests require access to files outside the build container, such
935 ;; as ‘/dev/disk/by-id/’.
936 `(#:tests? #f))
937 (inputs
938 (list `(,util-linux "lib") parted glib gtkmm-3 lvm2 libxml2))
939 (native-inputs
940 (list intltool
941 itstool
942 yelp-tools
943 pkg-config))
944 (home-page "https://gparted.org/")
945 (synopsis "Partition editor to graphically manage disk partitions")
946 (description "GParted is a GNOME partition editor for creating,
947reorganizing, and deleting disk partitions. It uses libparted from the parted
948project to detect and manipulate partition tables. Optional file system tools
949permit managing file systems not included in libparted.")
950 ;; The home page says GPLv2, but the source code says GPLv2+.
951 (license license:gpl2+)))
952
953(define-public testdisk
954 (package
955 (name "testdisk")
956 (version "7.2")
957 (source (origin
958 (method url-fetch)
959 (uri (string-append "https://www.cgsecurity.org/testdisk-"
960 version ".tar.bz2"))
961 (sha256
962 (base32
963 "0gr87j0ynbwzb958j443dnp013rr33cvrqx2j5fiq05l1ki3nd7q"))))
964 (build-system gnu-build-system)
965 (inputs
966 (list ntfs-3g
967 `(,util-linux "lib")
968 openssl
969 ;; FIXME: add reiserfs.
970 zlib
971 e2fsprogs
972 libjpeg-turbo
973 ncurses))
974 (home-page "https://www.cgsecurity.org/wiki/TestDisk")
975 (synopsis "Data recovery tool")
976 (description "TestDisk is primarily designed to help recover lost
977partitions and/or make non-booting disks bootable again when these symptoms
978were caused by faulty software or human error (such as accidentally deleting a
979partition table). TestDisk can:
980@enumerate
981@item Fix partition table, recover deleted partition
982@item Recover FAT32 boot sector from its backup
983@item Rebuild FAT12/FAT16/FAT32 boot sector
984@item Fix FAT tables
985@item Rebuild NTFS boot sector
986@item Recover NTFS boot sector from its backup
987@item Fix MFT using MFT mirror
988@item Locate ext2/ext3/ext4 Backup SuperBlock
989@item Un-delete files from FAT, exFAT, NTFS and ext2 file systems
990@item Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions.
991@end enumerate
992This package also includes the @command{photorec} command, described below.
993
994PhotoRec is file data recovery software designed to recover lost files
995including video, documents and archives from hard disks, CD-ROMs, and lost
996pictures (thus the Photo Recovery name) from digital camera memory. PhotoRec
997ignores the file system and goes after the underlying data, so it will still
998work even if your media's file system has been severely damaged or
999reformatted. It can recover lost files from at least:
1000@enumerate
1001@item FAT
1002@item NTFS
1003@item exFAT
1004@item ext2/ext3/ext4 file system
1005@item HFS+
1006@end enumerate")
1007 (license license:gpl2+)))
1008
1009(define-public pydf
1010 (let ((commit "af38bb3b7aacbcc32271e6dafa8b8b0a77ffead8")
1011 (revision "0"))
1012 (package
1013 (name "pydf")
1014 (version (git-version "15" revision commit))
1015 (source
1016 (origin
1017 (method git-fetch)
1018 (uri (git-reference
1019 (url "https://github.com/garabik/pydf")
1020 (commit commit)))
1021 (file-name (git-file-name name version))
1022 (sha256
1023 (base32 "18ljigg8zm9pc3qg3alpyh3n4a4f1wcza4p36cchjn2vd4466jf4"))))
1024 (build-system pyproject-build-system)
1025 (arguments (list #:tests? #f)) ; No tests.
1026 (native-inputs (list python-setuptools))
1027 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
1028 (synopsis "Colourised @command{df} clone")
1029 (description
1030 "All-singing, all-dancing, fully colourised @command{df} clone written
1031in Python. It displays the amount of disk space available on the mounted file
1032systems, using different colours for different types of file systems. Output
1033format is completely customizable.")
1034 (license license:public-domain))))
1035
1036(define-public f3
1037 (package
1038 (name "f3")
1039 (version "9.0")
1040 (source
1041 (origin
1042 (method git-fetch)
1043 (uri (git-reference
1044 (url "https://github.com/AltraMayor/f3")
1045 (commit (string-append "v" version))))
1046 (file-name (git-file-name name version))
1047 (sha256
1048 (base32 "0k9299phdxp0yag0mm58sfrbqmb19zvia57wgcaqawf9clafba35"))))
1049 (build-system gnu-build-system)
1050 (arguments
1051 (list #:tests? #f ; no check target
1052 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
1053 (string-append "PREFIX=" #$output))
1054 #:phases
1055 #~(modify-phases %standard-phases
1056 (delete 'configure) ; no configure script
1057 (add-after 'build 'build-extra
1058 (lambda* (#:key make-flags #:allow-other-keys)
1059 (apply invoke "make" "extra" make-flags)))
1060 (add-after 'build 'install-extra
1061 (lambda* (#:key make-flags #:allow-other-keys)
1062 (apply invoke "make" "install-extra" make-flags))))))
1063 (inputs
1064 (list eudev parted))
1065 (home-page "http://oss.digirati.com.br/f3/")
1066 (synopsis "Test real capacity of flash memory cards and such")
1067 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
1068capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
1069the card and then checks if can read it. It will assure you haven't been sold
1070a card with a smaller capacity than stated.")
1071 (license license:gpl3+)))
1072
1073(define-public python-pyparted
1074 (package
1075 (name "python-pyparted")
1076 (version "3.13.0")
1077 (source
1078 (origin
1079 (method git-fetch)
1080 (uri (git-reference
1081 (url "https://github.com/dcantrell/pyparted")
1082 (commit (string-append "v" version))))
1083 (file-name (git-file-name name version))
1084 (sha256
1085 (base32 "09gjp60sr8l0v41anmdfnh9lizfz1mbb7mxvqq73s30vn4504982"))))
1086 (build-system pyproject-build-system)
1087 (native-inputs
1088 (list e2fsprogs
1089 pkg-config
1090 python-pytest
1091 python-setuptools
1092 python-wheel))
1093 (inputs
1094 (list parted))
1095 (home-page "https://github.com/dcantrell/pyparted")
1096 (synopsis "Parted bindings for Python")
1097 (description "This package provides @code{parted} bindings for Python.")
1098 (license license:gpl2+)))
1099
1100(define-public duperemove
1101 (package
1102 (name "duperemove")
1103 (version "0.15.2")
1104 (source
1105 (origin
1106 (method git-fetch)
1107 (uri (git-reference
1108 (url "https://github.com/markfasheh/duperemove")
1109 (commit (string-append "v" version))))
1110 (sha256
1111 (base32 "0dsjw7nqflxapsb1fkxbqncqzq6aa8dxklc5igcvfv5mmsmchwb3"))
1112 (file-name (git-file-name name version))))
1113 (build-system gnu-build-system)
1114 (native-inputs (list xxhash libbsd pkg-config))
1115 (inputs (list glib sqlite))
1116 (arguments
1117 `(#:tests? #f ;no test suite
1118 #:phases (modify-phases %standard-phases
1119 (delete 'configure)) ;no configure script
1120 #:make-flags (list (string-append "PREFIX=" %output)
1121 (string-append "CC="
1122 ,(cc-for-target))
1123 ;; Set to <next release>dev by default.
1124 (string-append "VER="
1125 ,version))))
1126 (home-page "https://github.com/markfasheh/duperemove")
1127 (synopsis "Tools for de-duplicating file system data")
1128 (description
1129 "Duperemove is a simple tool for finding duplicated extents
1130and submitting them for deduplication. When given a list of files it will
1131hash their contents on a block by block basis and compare those hashes to each
1132other, finding and categorizing blocks that match each other. When given the
1133@option{-d} option, duperemove will submit those extents for deduplication
1134using the Linux kernel extent-same @code{ioctl}.
1135
1136Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
1137existing hash file, duperemove will only compute hashes for those files which
1138have changed since the last run. Thus you can run duperemove repeatedly on
1139your data as it changes, without having to re-checksum unchanged data.
1140
1141Duperemove can also take input from the @command{fdupes} program.")
1142 (license license:gpl2)))
1143
1144(define-public ranger
1145 (package
1146 (name "ranger")
1147 (version "1.9.4")
1148 (source
1149 (origin
1150 (method url-fetch)
1151 (uri (string-append "https://ranger.fm/ranger-" version ".tar.gz"))
1152 (sha256
1153 (base32 "128ggxfhfmckl7x89flwxks7gxq0m02insdizcsp62193c6mxmvs"))))
1154 (build-system pyproject-build-system)
1155 (arguments
1156 (list
1157 #:phases
1158 #~(modify-phases %standard-phases
1159 (add-after 'unpack 'set-paths
1160 (lambda _
1161 (substitute* (find-files "ranger" "\\.py$")
1162 (("\"file\"")
1163 (simple-format #f "~s"
1164 #$(file-append (this-package-input "file")
1165 "/bin/file"))))))
1166 (add-after 'install 'wrap-program
1167 (lambda* (#:key inputs outputs #:allow-other-keys)
1168 (let* ((ranger (string-append #$output "/bin/ranger"))
1169 (scope.sh (string-append (site-packages inputs outputs)
1170 "/ranger/data/scope.sh"))
1171 (w3m #$(this-package-input "w3m"))
1172 (w3mimgdisplay (string-append w3m
1173 "/libexec/w3m/w3mimgdisplay")))
1174 ;; Restore execute permission for 'scope.sh'.
1175 (chmod scope.sh #o555)
1176 ;; Tell 'ranger' where 'w3mimgdisplay' is.
1177 (wrap-program ranger
1178 `("W3MIMGDISPLAY_PATH" ":" prefix
1179 (,w3mimgdisplay)))))))))
1180 (native-inputs (list python-pytest python-setuptools python-wheel))
1181 (inputs (list bash-minimal file w3m))
1182 (home-page "https://ranger.fm")
1183 (synopsis "Console file manager")
1184 (description
1185 "ranger is a console file manager with Vi key bindings. It provides a
1186minimalistic and nice curses interface with a view on the directory hierarchy.
1187It ships with @code{rifle}, a file launcher that is good at automatically
1188finding out which program to use for what file type.")
1189 (license license:gpl3)))
1190
1191(define-public fff
1192 (package
1193 (name "fff")
1194 (version "2.2")
1195 (source (origin
1196 (method git-fetch)
1197 (uri (git-reference
1198 (url "https://github.com/dylanaraps/fff")
1199 (commit version)))
1200 (file-name (git-file-name name version))
1201 (sha256
1202 (base32
1203 "14ymdw6l6phnil0xf1frd5kgznaiwppcic0v4hb61s1zpf4wrshg"))))
1204 (build-system gnu-build-system)
1205 (inputs
1206 (list bash
1207 file))
1208 (arguments
1209 (list
1210 #:tests? #f ; no tests
1211 #:make-flags
1212 #~(list
1213 (string-append "PREFIX=" #$output))
1214 #:phases
1215 #~(modify-phases %standard-phases
1216 (add-after 'unpack 'refer-to-inputs
1217 (lambda* (#:key inputs #:allow-other-keys)
1218 (let ((file (assoc-ref inputs "file")))
1219 (substitute* "fff"
1220 (("\\bfile [-\"]" match)
1221 (string-append file "/bin/" match))))))
1222 (delete 'configure)))) ; no configure script
1223 (home-page "https://github.com/dylanaraps/fff")
1224 (synopsis "Simple file manager written in bash")
1225 (description
1226 "@command{fff} (fast file-manager) is a simple, blazing fast and minimal
1227file manager for Linux, written in bash. It only requires bash and coreutils,
1228and its highly optimized now for efficient performance.")
1229 (license license:expat)))
1230
1231(define-public volume-key
1232 (package
1233 (name "volume-key")
1234 (version "0.3.12")
1235 (source
1236 (origin
1237 (method git-fetch)
1238 (uri (git-reference
1239 (url "https://pagure.io/volume_key")
1240 (commit (string-append "volume_key-" version))))
1241 (file-name (git-file-name name version))
1242 (sha256
1243 (base32 "0zadzbh26ckk263w02d02r2x3mry2kxbybkhwwaxwpv6jsrm7xr6"))))
1244 (build-system gnu-build-system)
1245 (native-inputs
1246 (list autoconf
1247 automake
1248 gettext-minimal
1249 libtool
1250 pkg-config
1251 python ; used to generate the Python bindings
1252 python-setuptools
1253 swig-4.0))
1254 (inputs
1255 (append
1256 (cons cryptsetup-minimal (libcryptsetup-propagated-inputs))
1257 (cons lvm2 (libdevmapper-propagated-inputs))
1258 (list nss
1259 (list util-linux "lib")
1260 glib
1261 gpgme)))
1262 (arguments
1263 (list
1264 #:tests? #f ; not sure how tests are supposed to pass, even when run manually
1265 #:configure-flags
1266 #~(list "--without-python"
1267 (string-append "--with-gpgme-prefix="
1268 #$(this-package-input "gpgme")))
1269 #:phases
1270 #~(modify-phases %standard-phases
1271 (add-before 'configure 'set-python-paths
1272 (lambda* (#:key inputs #:allow-other-keys)
1273 (let ((python #$(this-package-native-input "python")))
1274 (setenv "PYTHON3"
1275 (string-append python "/bin/python3"))
1276 (setenv "PYTHON3_CONFIG"
1277 (string-append python "/bin/python3-config"))))))))
1278 (home-page "https://pagure.io/volume_key")
1279 (synopsis "Manipulate storage volume encryption keys")
1280 (description
1281 "This package provides a library for manipulating storage volume
1282encryption keys and storing them separately from volumes to handle forgotten
1283passphrases.")
1284 (license license:gpl2)))
1285
1286(define-public ndctl
1287 (package
1288 (name "ndctl")
1289 (version "84")
1290 (source (origin
1291 (method git-fetch)
1292 (uri (git-reference
1293 (url "https://github.com/pmem/ndctl")
1294 (commit (string-append "v" version))))
1295 (file-name (git-file-name name version))
1296 (sha256
1297 (base32
1298 "0jal7w4mk5l5j0qfays27kya8n1h2qwkncl0s317rfxp56bkjp6y"))))
1299 (build-system meson-build-system)
1300 (arguments
1301 ;; The test suite runs but SKIPs all tests: do not consider this tested!
1302 (list #:configure-flags
1303 #~(list (string-append "-Drootprefix=" #$output)
1304 (string-append "-Dlibdir=" #$output "/lib")
1305 (string-append "-Dbashcompletiondir=" #$output
1306 "/share/bash-completion/completions")
1307 (string-append "-Dsysconfdir=" #$output "/etc")
1308 (string-append "-Diniparserdir="
1309 #$(this-package-input "iniparser")
1310 "/include")
1311 "-Dasciidoctor=disabled" ; use docbook-xsl instead
1312 "-Dsystemd=disabled")
1313 #:phases
1314 #~(modify-phases %standard-phases
1315 (add-after 'unpack 'fix-version
1316 ;; Our VERSION's always better than the build's poor guess.
1317 (lambda _
1318 (with-output-to-file "version"
1319 (lambda _ (display #$version)))))
1320 (add-after 'unpack 'patch-FHS-file-names
1321 (lambda _
1322 (substitute* "git-version-gen"
1323 (("/bin/sh") (which "sh")))
1324 (substitute* "git-version"
1325 (("/bin/bash") (which "bash"))))))))
1326 (native-inputs
1327 (list asciidoc
1328 bash-completion
1329 docbook-xsl
1330 libxml2
1331 pkg-config
1332 xmlto
1333 ;; Required for offline docbook generation.
1334 which))
1335 (inputs
1336 (list eudev
1337 iniparser
1338 json-c
1339 keyutils
1340 kmod
1341 libtraceevent
1342 libtracefs
1343 `(,util-linux "lib")))
1344 (home-page "https://github.com/pmem/ndctl")
1345 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
1346 (description
1347 "This package provides a utility library for managing the
1348libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
1349 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
1350 ;; the effective license. Note that some files under ccan/ are
1351 ;; covered by BSD-3 or public domain, see the individual directories.
1352 (license license:gpl2)))
1353
1354(define-public dmraid
1355 (package
1356 (name "dmraid")
1357 (version "1.0.0.rc16-3")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
1361 version ".tar.bz2"))
1362 (sha256
1363 (base32
1364 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
1365 (build-system gnu-build-system)
1366 (inputs (list lvm2))
1367 (native-inputs (list which))
1368 (arguments
1369 `(#:tests? #f ; No tests.
1370 ;; Prevent a race condition where some target would attempt to link
1371 ;; libdmraid.so before it had been built as reported in
1372 ;; <https://bugs.gnu.org/31999#187>.
1373 #:parallel-build? #f
1374 #:phases (modify-phases %standard-phases
1375 (add-before 'configure 'change-directory
1376 (lambda _
1377 (chdir (string-append ,version "/dmraid"))
1378 (substitute* "make.tmpl.in"
1379 (("/bin/sh") (which "sh")))
1380 #t)))
1381 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
1382 ;; find libdmraid.so.
1383 (string-append "LDFLAGS=-Wl,-rpath="
1384 (assoc-ref %outputs "out")
1385 "/lib"))))
1386 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
1387 (synopsis "Device mapper RAID interface")
1388 (description
1389 "This software supports RAID device discovery, RAID set activation, creation,
1390removal, rebuild and display of properties for ATARAID/DDF1 metadata.
1391
1392@command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
1393to create devices with respective mappings for the ATARAID sets discovered.")
1394 (license license:gpl2+)))
1395
1396(define-public libblockdev
1397 (package
1398 (name "libblockdev")
1399 (version "3.3.0")
1400 (source (origin
1401 (method url-fetch)
1402 (uri (string-append "https://github.com/storaged-project/"
1403 "libblockdev/releases/download/"
1404 version "/libblockdev-" version ".tar.gz"))
1405 (sha256
1406 (base32
1407 "19yzidh8i32327h8h7b9yx86yv1hm7kz1y91cn4gxzyypqd8wwy4"))))
1408 (build-system gnu-build-system)
1409 (arguments
1410 (list
1411 #:modules (cons '(ice-9 format) %default-gnu-modules)
1412 #:phases
1413 #~(modify-phases %standard-phases
1414 (add-after 'unpack 'patch-configuration-directory
1415 (lambda _
1416 (substitute* "src/lib/blockdev.c"
1417 (("/etc/libblockdev/conf.d/" path)
1418 (string-append #$output path)))))
1419 (add-after 'unpack 'patch-paths
1420 (lambda* (#:key inputs #:allow-other-keys)
1421 (define* (find-program program #:key fail-if-missing?)
1422 (or (and (string=? "vfat-resize" program)
1423 (string-append #$output "/bin/vfat-resize"))
1424 (false-if-exception
1425 (search-input-file inputs
1426 (string-append "bin/" program)))
1427 (false-if-exception
1428 (search-input-file inputs
1429 (string-append "sbin/" program)))
1430 (if fail-if-missing?
1431 (error "could not find" program)
1432 (begin
1433 (format (current-warning-port)
1434 "warning: program ~s left unpatched~%"
1435 program)
1436 program))))
1437 (substitute* (find-files "src/plugins" "\\.c$")
1438 (("(gchar \\*arg.+\\{\")([^\"]+)" all start program)
1439 (string-append
1440 start (find-program program))))
1441 (substitute* "src/plugins/fs/generic.c"
1442 (("_util = \"([^\"]*)\"" all program)
1443 (format #f "_util = ~s" (find-program program))))
1444 ;; Tip: look for check_deps calls in the source to find where
1445 ;; commands are looked up from PATH.
1446 (let-syntax
1447 ((patch-helpers
1448 (lambda (x)
1449 (syntax-case x ()
1450 ((_ file (helpers ...))
1451 (with-syntax ((pattern (datum->syntax x 'pattern)))
1452 #'(let ((pattern (format #f "\"(~{~a~^|~})\""
1453 '(helpers ...))))
1454 (substitute* file
1455 ((pattern dummy program)
1456 (format
1457 #f "~s"
1458 (find-program
1459 program #:fail-if-missing? #t)))))))))))
1460
1461 (patch-helpers "src/plugins/fs/btrfs.c"
1462 ("mkfs.btrfs" "btrfsck" "btrfs" "btrfstune"))
1463 (patch-helpers "src/plugins/fs/exfat.c"
1464 ("mkfs.exfat" "fsck.exfat" "tune.exfat"))
1465 (patch-helpers "src/plugins/fs/ext.c"
1466 ("mke2fs" "e2fsck" "tune2fs" "resize2fs"))
1467 (patch-helpers "src/plugins/fs/f2fs.c"
1468 ("mkfs.f2fs" "fsck.f2fs" "dump.f2fs"
1469 "resize.f2fs"))
1470 (patch-helpers "src/plugins/fs/nilfs.c"
1471 ("mkfs.nilfs2" "nilfs-tune" "nilfs-resize"))
1472 (patch-helpers "src/plugins/fs/ntfs.c"
1473 ("mkntfs" "ntfsfix" "ntfsresize" "ntfslabel"
1474 "ntfsinfo"))
1475 (patch-helpers "src/plugins/fs/udf.c"
1476 ("mkudffs" "udflabel" "udfinfo"))
1477 (patch-helpers "src/plugins/fs/vfat.c"
1478 ("mkfs.vfat" "fat label" "fsck.vfat"
1479 "vfat-resize" "fatlabel"))
1480 (patch-helpers "src/plugins/fs/xfs.c"
1481 ("mkfs.xfs" "xfs_db" "xfs_repair" "xfs_admin"
1482 "xfs_growfs"))
1483 (patch-helpers "src/plugins/swap.c"
1484 ("mkswap" "swaplabel"))))))))
1485 (native-inputs
1486 (list gobject-introspection
1487 pkg-config
1488 python-wrapper))
1489 (inputs
1490 (append
1491 (cons cryptsetup-minimal (libcryptsetup-propagated-inputs))
1492 (if (supported-package? multipath-tools)
1493 (list multipath-tools)
1494 '())
1495 (list bcache-tools
1496 btrfs-progs
1497 dosfstools
1498 dmraid
1499 e2fsprogs
1500 eudev
1501 exfatprogs
1502 f2fs-tools
1503 glib
1504 gptfdisk
1505 json-glib-minimal
1506 keyutils
1507 kmod
1508 libatasmart
1509 libbytesize
1510 libnvme
1511 libyaml
1512 lvm2
1513 mdadm
1514 ndctl
1515 nilfs-utils
1516 nss
1517 ntfs-3g
1518 parted
1519 udftools
1520 util-linux
1521 volume-key
1522 xfsprogs)))
1523 (home-page "https://github.com/storaged-project/libblockdev")
1524 (synopsis "Library for manipulating block devices")
1525 (description
1526 "libblockdev is a C library supporting GObject introspection for
1527manipulation of block devices. It has a plugin-based architecture where each
1528technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
1529plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
1530LVM D-Bus API).")
1531 (license license:lgpl2.1+)))
1532
1533(define-public rmlint
1534 (package
1535 (name "rmlint")
1536 (version "2.10.3")
1537 (source (origin
1538 (method git-fetch)
1539 (uri (git-reference
1540 (url "https://github.com/sahib/rmlint")
1541 (commit (string-append "v" version))))
1542 (file-name (git-file-name name version))
1543 (sha256
1544 (base32
1545 "1033h99z443wqb66rrh34gmnlnlbjsm5j1sqpg069jdih2ffi6a3"))))
1546 (build-system scons-build-system)
1547 (arguments
1548 (list
1549 #:scons-flags
1550 #~(list (string-append "--prefix=" #$output)
1551 (string-append "--actual-prefix=" #$output))
1552 #:tests? #f ; no tests
1553 #:phases
1554 #~(modify-phases %standard-phases
1555 (add-after 'unpack 'scons-propagate-environment
1556 (lambda* (#:key inputs #:allow-other-keys)
1557 ;; TODO: `rmlint --gui` fails with
1558 ;; "Failed to load shredder: No module named 'shredder'".
1559 ;; The GUI might also need extra dependencies, such as
1560 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
1561 (substitute* "lib/cmdline.c"
1562 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
1563 (string-append "const char *commands[] = {\""
1564 (search-input-file inputs "/bin/python")
1565 "\", \"python\", NULL};")))
1566 ;; By design, SCons does not, by default, propagate
1567 ;; environment variables to subprocesses. See:
1568 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
1569 ;; Here, we modify the SConstruct file to arrange for
1570 ;; environment variables to be propagated.
1571 (substitute* "SConstruct"
1572 (("^env = Environment\\(.*\\)" all)
1573 (string-append all "\nenv['ENV']=os.environ"))))))))
1574 (native-inputs
1575 (list `(,glib "bin") pkg-config python-sphinx))
1576 (inputs
1577 (list elfutils
1578 glib
1579 json-glib
1580 python-wrapper
1581 `(,util-linux "lib")))
1582 (home-page "https://rmlint.rtfd.org")
1583 (synopsis "Remove duplicates and other lint from the file system")
1584 (description "@command{rmlint} finds space waste and other broken things
1585on your file system and offers to remove it. @command{rmlint} can find:
1586
1587@itemize
1588@item duplicate files and duplicate directories,
1589@item non-stripped binaries (i.e. binaries with debug symbols),
1590@item broken symbolic links,
1591@item empty files and directories,
1592@item files with broken user and/or group ID.
1593@end itemize\n")
1594 (license license:gpl3+)))
1595
1596(define-public lf
1597 (package
1598 (name "lf")
1599 (version "41")
1600 (source
1601 (origin
1602 (method git-fetch)
1603 (uri (git-reference
1604 (url "https://github.com/gokcehan/lf")
1605 (commit (string-append "r" version))))
1606 (file-name (git-file-name name version))
1607 (sha256
1608 (base32 "1rrc720ziaf84wz98y414kfjyh80mqb6wsb3x658g9cjhff7vmxk"))))
1609 (build-system go-build-system)
1610 (arguments
1611 (list
1612 #:install-source? #f
1613 #:import-path "github.com/gokcehan/lf"
1614 #:phases
1615 #~(modify-phases %standard-phases
1616 (add-after 'install 'install-man-page
1617 (lambda* (#:key import-path #:allow-other-keys)
1618 (install-file
1619 (string-append "src/" import-path "/lf.1")
1620 (string-append #$output "/share/man/man1"))))
1621 (add-after 'install 'install-desktop-entry
1622 (lambda* (#:key import-path #:allow-other-keys)
1623 (install-file
1624 (string-append "src/" import-path "/lf.desktop")
1625 (string-append #$output "/share/applications")))))))
1626 (native-inputs
1627 (list go-github-com-djherbis-times
1628 go-github-com-fsnotify-fsnotify
1629 go-github-com-gdamore-tcell-v2
1630 go-github-com-mattn-go-runewidth
1631 go-golang-org-x-sys
1632 go-golang-org-x-term))
1633 (home-page "https://github.com/gokcehan/lf")
1634 (synopsis "Console file browser similar to Ranger")
1635 (description
1636 "@code{lf} (as in \"list files\") is a terminal file manager written in
1637Go. It is heavily inspired by @code{ranger} with some missing and extra
1638features. Some of the missing features are deliberately omitted since they
1639are better handled by external tools.")
1640 (license license:expat)))
1641
1642(define-public yazi
1643 (package
1644 (name "yazi")
1645 (version "26.5.6")
1646 (source
1647 (origin
1648 (method git-fetch)
1649 (uri (git-reference
1650 (url "https://github.com/sxyazi/yazi")
1651 (commit (string-append "v" version))))
1652 (file-name (git-file-name name version))
1653 (sha256
1654 (base32 "08zjkj5vj5qimjcj8n8pzdm84qirkxjykpckhd9z1yfv09ksmmmi"))
1655 (modules '((guix build utils)))
1656 (snippet
1657 #~(begin ;; Don't try to vendor lua.
1658 ;; We substitute on each individual Cargo.toml
1659 ;; because new features might get added in
1660 ;; the future, makes updating the package easier.
1661 (substitute* '("yazi-actor/Cargo.toml"
1662 "yazi-runner/Cargo.toml"
1663 "yazi-scheduler/Cargo.toml"
1664 "yazi-core/Cargo.toml"
1665 "yazi-binding/Cargo.toml"
1666 "yazi-dds/Cargo.toml"
1667 "yazi-parser/Cargo.toml"
1668 "yazi-fm/Cargo.toml"
1669 "yazi-widgets/Cargo.toml"
1670 "yazi-shim/Cargo.toml"
1671 "yazi-plugin/Cargo.toml")
1672 (("\"vendored-lua\", ") "")
1673 (("^vendored-lua.*") "vendored-lua = []\n"))))))
1674 (build-system cargo-build-system)
1675 (arguments
1676 (list
1677 #:install-source? #f
1678 #:rust rust-1.95
1679 #:cargo-install-paths ''("yazi-cli"
1680 "yazi-fm")
1681 #:phases
1682 #~(modify-phases %standard-phases
1683 (add-after 'configure 'generate-completions
1684 (lambda _
1685 (setenv "YAZI_GEN_COMPLETIONS" "1")))
1686 (add-after 'generate-completions 'override-jemalloc
1687 (lambda _
1688 ;; This flag is needed when not using the bundled jemalloc.
1689 ;; https://github.com/tikv/jemallocator/issues/19
1690 (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS"
1691 "1")
1692 ;; Override jemalloc
1693 (setenv "JEMALLOC_OVERRIDE"
1694 (string-append #$(this-package-input "jemalloc")
1695 "/lib/libjemalloc.so"))))
1696 (add-after 'install 'install-extra
1697 (lambda _
1698 (let* ((share (string-append #$output "/share"))
1699 (applications (string-append share "/applications"))
1700 (bash-completions-dir
1701 (string-append share "/bash-completion/completions"))
1702 (elv-completions-dir
1703 (string-append share "/elvish/lib"))
1704 (fish-completions-dir
1705 (string-append share "/fish/vendor_completions.d"))
1706 (nu-completions-dir
1707 (string-append share "/nushell/vendor/autoload")))
1708 (install-file "assets/yazi.desktop" applications)
1709 (for-each mkdir-p (list bash-completions-dir
1710 elv-completions-dir
1711 fish-completions-dir
1712 nu-completions-dir))
1713 (copy-file "yazi-boot/completions/yazi.bash"
1714 (string-append bash-completions-dir "/yazi"))
1715 (copy-file "yazi-boot/completions/yazi.elv"
1716 (string-append elv-completions-dir "/yazi"))
1717 (copy-file "yazi-boot/completions/yazi.fish"
1718 (string-append fish-completions-dir "/yazi.fish"))
1719 (copy-file "yazi-boot/completions/yazi.nu"
1720 (string-append nu-completions-dir "/yazi.nu")))))
1721 (add-after 'install-extra 'wrap-required
1722 (lambda _
1723 (wrap-program (string-append #$output "/bin/yazi")
1724 `("PATH" ":" prefix
1725 (,(string-append #$(this-package-input "file") "/bin")))))))))
1726 (native-inputs (list pkg-config))
1727 (inputs (cons* file
1728 jemalloc
1729 lua-5.5
1730 oniguruma
1731 (cargo-inputs 'yazi)))
1732 (home-page "https://yazi-rs.github.io")
1733 (synopsis "Terminal file manager based on async I/O")
1734 (description
1735 "Yazi (duck in Chinese) is a terminal file manager based on non-blocking
1736async I/O. It aims to provide an efficient, user-friendly, and customizable
1737file management experience.")
1738 (license (list license:expat))))
1739
1740(define-public xfe
1741 (package
1742 (name "xfe")
1743 (version "1.44")
1744 (source
1745 (origin
1746 (method url-fetch)
1747 (uri
1748 (string-append "mirror://sourceforge/xfe/xfe/" version "/"
1749 "xfe-" version ".tar.xz"))
1750 (sha256
1751 (base32 "1dihq03jqjllb69r78d9ihjjadi39v7sgzdf68qpxz5xhp8i8k2r"))))
1752 (build-system gnu-build-system)
1753 (arguments
1754 `(#:phases
1755 (modify-phases %standard-phases
1756 (add-after 'unpack 'patch-potfiles
1757 (lambda _
1758 ;; To add missing entry 'intl/plural.c' to potfiles list.
1759 ;; Refer to https://sourceforge.net/p/xfe/bugs/257/
1760 (substitute* "po/POTFILES.in"
1761 (("src/help.h")
1762 (string-append "src/help.h\n"
1763 "intl/plural.c")))))
1764 (add-after 'unpack 'patch-bin-dirs
1765 (lambda* (#:key inputs #:allow-other-keys)
1766 (let* ((bash (assoc-ref inputs "bash"))
1767 (coreutils (assoc-ref inputs "coreutils"))
1768 (findutils (assoc-ref inputs "findutils"))
1769 (file-prog (assoc-ref inputs "file")))
1770 (with-directory-excursion "src"
1771 (substitute* '("FilePanel.cpp" "help.h" "SearchPanel.cpp"
1772 "startupnotification.cpp" "xfeutils.cpp"
1773 "../st/config.h")
1774 (("/bin/sh" file) (string-append bash file))
1775 (("/bin/ls" file) (string-append coreutils file))
1776 (("/usr(/bin/du)" _ file) (string-append coreutils file))
1777 (("/usr(/bin/sort)" _ file) (string-append coreutils file))
1778 (("/usr(/bin/cut)" _ file) (string-append coreutils file))
1779 (("/usr(/bin/xargs)" _ file) (string-append findutils file))
1780 (("/usr(/bin/file)" _ file) (string-append file-prog file))))
1781 #t)))
1782 (add-after 'unpack 'patch-share-dirs
1783 (lambda* (#:key outputs #:allow-other-keys)
1784 (let* ((out (assoc-ref outputs "out"))
1785 (share (string-append out "/share"))
1786 (xfe (string-append share "/xfe")))
1787 (with-directory-excursion "src"
1788 (substitute* '("foxhacks.cpp" "help.h" "xfedefs.h"
1789 "XFileExplorer.cpp")
1790 (("/(usr|opt)(/local)?/share") share)
1791 (("~/.config/xfe") xfe)))
1792 #t))))))
1793 (native-inputs
1794 (list intltool pkg-config))
1795 (inputs
1796 `(("bash" ,bash)
1797 ("coreutils" ,coreutils)
1798 ("file" ,file)
1799 ("findutils" ,findutils)
1800 ("fox" ,fox)
1801 ("freetype" ,freetype)
1802 ("x11" ,libx11)
1803 ("xcb" ,libxcb)
1804 ("xcb-util" ,xcb-util)
1805 ("xft" ,libxft)
1806 ("xrandr" ,libxrandr)))
1807 (synopsis "File Manager for X-Based Graphical Systems")
1808 (description "XFE (X File Explorer) is a file manager for X. It is based on
1809the popular but discontinued, X Win Commander. It aims to be the file manager
1810of choice for all light thinking Unix addicts!")
1811 (home-page "http://roland65.free.fr/xfe/")
1812 (license license:gpl2+)))
1813
1814(define-public hddtemp
1815 (package
1816 (name "hddtemp")
1817 ;; <https://savannah.nongnu.org/projects/hddtemp/> advertises the project as
1818 ;; ‘orphaned/unmaintained’. Use a maintained fork/continuation.
1819 (version "0.4.3")
1820 (source
1821 (origin
1822 (method git-fetch)
1823 (uri (git-reference
1824 (url "https://github.com/vitlav/hddtemp")
1825 (commit (string-append "v" version))))
1826 (file-name (git-file-name name version))
1827 (sha256
1828 (base32 "04kylb2ka0jimi238zpfq1yii2caidpmj3ck51rvxz03y5lpq8fw"))))
1829 (build-system gnu-build-system)
1830 (arguments
1831 `(#:configure-flags (list (string-append
1832 "--with-db-path="
1833 (assoc-ref %outputs "out")
1834 "/share/hddtemp/hddtemp.db"))
1835 #:phases
1836 (modify-phases %standard-phases
1837 (add-before 'bootstrap 'delete-autogen.sh
1838 (lambda _
1839 ;; The default 'bootstrap phase works better.
1840 (delete-file "autogen.sh")))
1841 (add-after 'install 'install-db
1842 (lambda* (#:key outputs #:allow-other-keys)
1843 (let ((out (assoc-ref outputs "out")))
1844 (install-file "data/hddtemp.db"
1845 (string-append out "/share/hddtemp"))))))))
1846 (native-inputs
1847 `(("autoconf" ,autoconf)
1848 ("automake" ,automake)
1849 ("gettext" ,gettext-minimal)))
1850 (home-page "https://github.com/vitlav/hddtemp")
1851 (synopsis "Report the temperature of hard drives from S.M.A.R.T. information")
1852 (description "@command{hddtemp} is a small utility that gives you the
1853temperature of your hard drive by reading S.M.A.R.T. information (for drives
1854that support this feature).")
1855 (license license:gpl2+)))
1856
1857(define-public memkind
1858 (package
1859 (name "memkind")
1860 (version "1.13.0")
1861 (source (origin
1862 (method git-fetch)
1863 (uri (git-reference
1864 (url "https://github.com/memkind/memkind")
1865 (commit (string-append "v" version))))
1866 (file-name (git-file-name name version))
1867 (sha256
1868 (base32 "0zbil6xqmsrnh773ihxyfna6pvvxv3kczdb3g863ssflwwvv7h4w"))))
1869 (build-system gnu-build-system)
1870 (inputs
1871 (list ;; memkind patched jemalloc to add je_arenalookupx,
1872 ;; je_check_reallocatex--i.e. they forked jemalloc.
1873 ;("jemalloc" ,jemalloc)
1874 ndctl numactl))
1875 (native-inputs
1876 (list autoconf automake libtool))
1877 (arguments
1878 `(#:configure-flags
1879 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1880 "/share/doc/" ,name "-" ,version))
1881 #:parallel-build? #f ;fails otherwise
1882 #:tests? #f ; Tests require a NUMA-enabled system.
1883 #:phases
1884 (modify-phases %standard-phases
1885 (add-before 'build 'autogen-jemalloc
1886 (lambda _
1887 (with-directory-excursion "jemalloc"
1888 (substitute* "Makefile.in"
1889 (("/bin/sh") (which "sh")))
1890 (invoke "autoconf")
1891 (substitute* "configure"
1892 (("/bin/sh") (which "sh")))))))))
1893 (home-page "https://github.com/memkind/memkind")
1894 (synopsis "Heap manager with memory kinds (for NUMA)")
1895 (description "This package provides a user-extensible heap manager
1896built on top of jemalloc which enables control of memory characteristics
1897and a partitioning of the heap between kinds of memory (for NUMA).")
1898 (license license:bsd-3)))
1899
1900(define-public mmc-utils
1901 (let ((commit "3969aa4804edb8aed7bcb3c958e49d0c7388b067")
1902 (revision "1"))
1903 (package
1904 (name "mmc-utils")
1905 (version (git-version "0.1" revision commit))
1906 (source
1907 (origin
1908 (method git-fetch)
1909 (uri (git-reference
1910 (url "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git")
1911 (commit commit)))
1912 (file-name (git-file-name name version))
1913 (sha256
1914 (base32 "0pvcm685x63afvp8795jd4vn4zs8psh8bs6j2yvk1kgrawpyk10g"))))
1915 (build-system gnu-build-system)
1916 (arguments
1917 `(#:tests? #f ; No test suite
1918 #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))
1919 (string-append "CC=" ,(cc-for-target)))
1920 #:phases
1921 (modify-phases %standard-phases
1922 ;; No ./configure script
1923 (delete 'configure)
1924 ;; The Makefile's "install-man" target is a no-op.
1925 (add-after 'install 'install-doc
1926 (lambda* (#:key outputs #:allow-other-keys)
1927 (let* ((out (assoc-ref outputs "out"))
1928 (man1 (string-append out "/share/man/man1")))
1929 (install-file "man/mmc.1" man1)))))))
1930 (home-page
1931 "https://www.kernel.org/doc/html/latest/driver-api/mmc/mmc-tools.html")
1932 (synopsis "Configure MMC storage devices from userspace")
1933 (description "mmc-utils is a command-line tool for configuring and
1934inspecting MMC storage devices from userspace.")
1935 (license license:gpl2))))
1936
1937(define-public duc
1938 (package
1939 (name "duc")
1940 (version "1.4.5")
1941 (source (origin
1942 (method git-fetch)
1943 (uri (git-reference
1944 (url "https://github.com/zevv/duc")
1945 (commit version)))
1946 (file-name (git-file-name name version))
1947 (sha256
1948 (base32
1949 "0sglcn38rgn6y3m5ahngizyn3x2rzhqjphs7g0ppnlinkz56rcv4"))
1950 (patches
1951 (search-patches "duc-fix-test-sh.patch"))))
1952 (build-system gnu-build-system)
1953 (arguments
1954 (list
1955 #:phases
1956 #~(modify-phases %standard-phases
1957 (add-after 'unpack 'patch
1958 (lambda* (#:key outputs #:allow-other-keys)
1959 (let* ((out (assoc-ref outputs "out")))
1960 (substitute* "src/duc/cmd-ui.c"
1961 (("ncursesw/ncurses.h") "ncurses.h"))
1962 (substitute* "examples/index.cgi"
1963 (("/usr/local/bin/duc")
1964 (string-append out "/bin/duc"))))))
1965 (add-after 'install 'install-examples
1966 (lambda* (#:key outputs #:allow-other-keys)
1967 (let* ((out (assoc-ref outputs "out"))
1968 (doc (string-append out "/share/doc/" #$name "-" #$version)))
1969 (copy-recursively "examples" (string-append doc "/examples")))))
1970 (replace 'check
1971 (lambda* (#:key tests? #:allow-other-keys)
1972 (substitute* "test.sh"
1973 ;; Keep the test logs where --keep-failed can see them.
1974 (("^(DUC_TEST_DIR=).*" _ assign)
1975 (format #f "~a~a/test-directory~%" assign (getcwd)))
1976 ;; XXX ‘actual size’ differed on my system (a consistent 348160
1977 ;; bytes where the tests expect 540672). However, the ‘apparent
1978 ;; size’ matches, as does the actual test output. Good enough…?
1979 ((" [0-9]*B actual") " [0-9]*B actual"))
1980 (when tests?
1981 (invoke "./test.sh"))))))) ; no ‘check’ target
1982 (native-inputs
1983 (list autoconf automake libtool pkg-config))
1984 (inputs
1985 (list cairo pango tokyocabinet ncurses))
1986 (home-page "https://duc.zevv.nl")
1987 (synopsis "Library and suite of tools for inspecting disk usage")
1988 (description "Duc maintains a database of accumulated sizes of
1989directories of the file system, and allows you to query this database with
1990some tools, or create fancy graphs showing you where your bytes are.
1991
1992Duc comes with console utilities, ncurses and X11 user interfaces and a CGI
1993wrapper for disk usage querying and visualisation.")
1994 (license license:lgpl3+)))
1995
1996(define-public qdirstat
1997 (package
1998 (name "qdirstat")
1999 (version "1.9")
2000 (source (origin
2001 (method git-fetch)
2002 (uri (git-reference
2003 (url "https://github.com/shundhammer/qdirstat")
2004 (commit version)))
2005 (file-name (git-file-name name version))
2006 (sha256
2007 (base32
2008 "09amjkg0h097kahscap59imyg4wpjy43lkaiqw60ady3s6b6c1x7"))))
2009 (build-system qt-build-system)
2010 (arguments
2011 (list
2012 #:tests? #f
2013 #:modules '((guix build qt-build-system)
2014 ((guix build gnu-build-system) #:prefix gnu:)
2015 (guix build utils))
2016 #:phases
2017 #~(modify-phases %standard-phases
2018 (replace 'configure
2019 (lambda _
2020 (system* "qmake" (string-append "INSTALL_PREFIX=" #$output))))
2021 (replace 'build (assoc-ref gnu:%standard-phases 'build))
2022 (replace 'install (assoc-ref gnu:%standard-phases 'install))
2023 (add-after 'install 'wrap
2024 (lambda _
2025 (wrap-program (string-append #$output
2026 "/bin/qdirstat-cache-writer")
2027 `("PERL5LIB" ":" prefix
2028 (,(string-append
2029 #$(this-package-input "perl-uri-escape")
2030 "/lib/perl5/site_perl")))))))))
2031 (inputs
2032 (list bash-minimal
2033 perl
2034 perl-uri-escape
2035 qtbase-5
2036 qtwayland-5
2037 zlib))
2038 (home-page "https://github.com/shundhammer/qdirstat")
2039 (synopsis "Storage utilisation visualization tool")
2040 (description
2041 "QDirStat is a graphical application to show where your disk space has
2042gone and to help you to clean it up.")
2043 (license license:gpl2)))
2044
2045(define-public nwipe
2046 (package
2047 (name "nwipe")
2048 (version "0.36")
2049 (source
2050 (origin
2051 (method git-fetch)
2052 (uri (git-reference
2053 (url "https://github.com/martijnvanbrummelen/nwipe")
2054 (commit (string-append "v" version))))
2055 (file-name (git-file-name name version))
2056 (sha256
2057 (base32 "075zwakv3lva46v6wab00l5x7bs2k73mzzhwlbvm839r8a6gm0dh"))))
2058 (build-system gnu-build-system)
2059 (arguments
2060 (list #:phases
2061 #~(modify-phases %standard-phases
2062 (add-after 'install 'wrap
2063 (lambda* (#:key inputs outputs #:allow-other-keys)
2064 (wrap-program (search-input-file outputs "bin/nwipe")
2065 (list "PATH" ":" 'prefix
2066 (map (lambda (p) (dirname (search-input-file inputs p)))
2067 '("sbin/dmidecode"
2068 "sbin/hdparm"
2069 "sbin/smartctl")))))))))
2070 (inputs
2071 (list bash-minimal
2072 dmidecode
2073 hdparm
2074 libconfig
2075 ncurses
2076 parted
2077 smartmontools))
2078 (native-inputs
2079 (list autoconf automake libtool pkg-config))
2080 (home-page "https://github.com/martijnvanbrummelen/nwipe")
2081 (synopsis "Secure disk wiping utility")
2082 (description
2083 "@command{nwipe} securely erases disks using a variety of methods to
2084ensure the data cannot be recovered. It can wipe multiple drives in parallel
2085and can be used noninteractively or with a text-based user interface.")
2086 (license
2087 (list license:gpl2
2088 license:bsd-3 ; mt19937ar-cok
2089 license:public-domain)))) ; {isaac_rand,PDFGen}
2090
2091(define-public wipe
2092 (package
2093 (name "wipe")
2094 (version "2.3.1")
2095 (source (origin
2096 (method url-fetch)
2097 (uri (string-append "mirror://sourceforge/wipe/wipe/" version
2098 "/wipe-" version ".tar.bz2"))
2099 (sha256
2100 (base32
2101 "180snqvh6k6il6prb19fncflf2jcvkihlb4w84sbndcv1wvicfa6"))))
2102 (build-system gnu-build-system)
2103 (arguments
2104 (list
2105 #:tests? #f ;no tests
2106 #:phases
2107 #~(modify-phases %standard-phases
2108 (add-after 'unpack 'patch-makefile
2109 (lambda _
2110 (substitute* "Makefile.in"
2111 ;; The Makefile.in uses install -o root, but during the
2112 ;; build there is no root user, so if we leave that in,
2113 ;; the build fails with the following error:
2114 ;; /gnu/[...]/install: invalid user ‘root’
2115 (("-o root") "")
2116 ;; It's up to the distribution to strip the binaries or
2117 ;; not.
2118 (("\\$\\(INSTALL_BIN\\) -s ")
2119 "$(INSTALL_BIN) "))))
2120 (add-after 'unpack 'force-autotools-bootstrap
2121 (lambda _
2122 ;; Rebuild the build system scripts, as the ones in bundles are
2123 ;; very old and do not support all the options used by Guix.
2124 (delete-file "configure"))))))
2125 (native-inputs (list autoconf automake libtool))
2126 (home-page "https://wipe.sourceforge.net")
2127 (synopsis "Secure file/block device wiping utility")
2128 (description
2129 "Wipe can erase files and block devices securely. To work properly it
2130relies on several assumptions like having the block device write the correct
2131sectors, etc. For files it also doesn't work on log-structured file systems
2132such as F2FS, JFFS, LogFS, etc. You should @emph{not} trust @command{wipe} to
2133work as advertised until you have manually verified that all its assumption
2134hold true on your system. To overwrite data it uses the Mersenne Twister
2135pseudo-random number generator (PRNG) that is seeded with @file{/dev/urandom}
2136or, if unavailable, @file{/dev/random}.")
2137 (license license:gpl2+)))