1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2016, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
9 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
11 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
12 ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
15 ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
16 ;;; Copyright © 2019 Leo Famulari <leo@famulari.name>
17 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
18 ;;; Copyright © 2020 Pkill -9 <pkill9@runbox.com>
19 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
20 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
22 ;;; This file is part of GNU Guix.
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.
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.
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/>.
37 (define-module (gnu packages disk)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages bash)
42 #:use-module (gnu packages c)
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages crypto)
46 #:use-module (gnu packages cryptsetup)
47 #:use-module (gnu packages docbook)
48 #:use-module (gnu packages documentation)
49 #:use-module (gnu packages elf)
50 #:use-module (gnu packages file-systems)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnome)
55 #:use-module (gnu packages gnupg)
56 #:use-module (gnu packages graphics)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages guile)
59 #:use-module (gnu packages linux)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages nss)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages popt)
65 #:use-module (gnu packages python)
66 #:use-module (gnu packages python-xyz)
67 #:use-module (gnu packages readline)
68 #:use-module (gnu packages samba)
69 #:use-module (gnu packages sphinx)
70 #:use-module (gnu packages sqlite)
71 #:use-module (gnu packages swig)
72 #:use-module (gnu packages terminals)
73 #:use-module (gnu packages textutils)
74 #:use-module (gnu packages vim)
75 #:use-module (gnu packages w3m)
76 #:use-module (gnu packages web)
77 #:use-module (gnu packages xml)
78 #:use-module (gnu packages xorg)
79 #:use-module (guix build-system gnu)
80 #:use-module (guix build-system go)
81 #:use-module (guix build-system python)
82 #:use-module (guix build-system trivial)
83 #:use-module (guix build-system scons)
84 #:use-module (guix download)
85 #:use-module (guix git-download)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (guix packages))
98 (url "https://github.com/IgnorantGuru/udevil.git")
100 (file-name (git-file-name name version))
102 (base32 "0x9mjr9abvbxzfa9mrip5264iz1qxvsl01k3ybz95q4a7xl4jcb3"))))
103 (build-system gnu-build-system)
108 (string-append "--sysconfdir="
109 (assoc-ref %outputs "out")
111 ;; udevil expects these programs to be run with uid set as root.
112 ;; user has to manually add these programs to setuid-programs.
113 ;; mount and umount are default setuid-programs in guix system.
114 "--with-mount-prog=/run/setuid-programs/mount"
115 "--with-umount-prog=/run/setuid-programs/umount"
116 "--with-losetup-prog=/run/setuid-programs/losetup"
117 "--with-setfacl-prog=/run/setuid-programs/setfacl")
119 (modify-phases %standard-phases
120 (add-after 'unpack 'remove-root-reference
122 (substitute* "src/Makefile.in"
123 (("-o root -g root") ""))
125 (add-after 'unpack 'patch-udevil-reference
126 ;; udevil expects itself to be run with uid set as root.
127 ;; devmon also expects udevil to be run with uid set as root.
128 ;; user has to manually add udevil to setuid-programs.
130 (substitute* "src/udevil.c"
131 (("/usr/bin/udevil") "/run/setuid-programs/udevil"))
132 (substitute* "src/devmon"
133 (("`which udevil 2>/dev/null`") "/run/setuid-programs/udevil"))
136 `(("intltool" ,intltool)
137 ("pkg-config" ,pkg-config)))
139 `(("cifs-utils" ,cifs-utils)
140 ("curlftpfs" ,curlftpfs)
142 ("fakeroot" ,fakeroot)
145 (synopsis "Device and file system manager")
146 (description "udevil is a command line program that mounts and unmounts
147 removable devices without a password, shows device info, and monitors device
148 changes. It can also mount ISO files, NFS, SMB, FTP, SSH and WebDAV URLs, and
149 tmpfs/ramfs filesystems.")
150 (home-page "https://ignorantguru.github.io/udevil/")
151 (license license:gpl3+)))
153 (define-public parted
159 (uri (string-append "mirror://gnu/parted/parted-"
163 "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"))))
164 (build-system gnu-build-system)
167 (modify-phases %standard-phases
168 (add-after 'unpack 'fix-locales-and-python
169 (lambda* (#:key inputs #:allow-other-keys)
170 (substitute* "tests/t0251-gpt-unicode.sh"
171 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
172 (substitute* "tests/msdos-overlap"
173 (("/usr/bin/python") (which "python")))
177 ("readline" ,readline)
178 ("util-linux" ,util-linux)))
180 `(("gettext" ,gettext-minimal)
182 ("e2fsprogs" ,e2fsprogs)
184 ("python" ,python-2)))
185 (home-page "https://www.gnu.org/software/parted/")
186 (synopsis "Disk partition editor")
188 "GNU Parted is a package for creating and manipulating disk partition
189 tables. It includes a library and command-line utility.")
190 (license license:gpl3+)))
199 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
203 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
204 (build-system gnu-build-system)
206 `(("gettext" ,gettext-minimal)
208 ("util-linux" ,util-linux)
210 ;; The build neglects to look for its own headers in its own tree. A next
211 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
214 (modify-phases %standard-phases
215 (add-after 'unpack 'skip-broken-header-probes
217 (substitute* "backend/configure"
218 (("gnufdisk-common.h .*") "\n"))
220 #:make-flags (list (string-append "CPPFLAGS="
221 " -I../common/include "
222 " -I../debug/include "
223 " -I../exception/include"))))
224 (home-page "https://www.gnu.org/software/fdisk/")
225 (synopsis "Low-level disk partitioning and formatting")
227 "GNU fdisk provides a GNU version of the common disk partitioning tool
228 fdisk. fdisk is used for the creation and manipulation of disk partition
229 tables, and it understands a variety of different formats.")
230 (license license:gpl3+)))
232 (define-public gptfdisk
239 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
240 version "/gptfdisk-" version ".tar.gz"))
242 (base32 "0bybgp30pqxb6x5krxazkq4drca0gz4inxj89fpyr204rn3kjz8f"))))
243 (build-system gnu-build-system)
245 `(("gettext" ,gettext-minimal)
248 ("util-linux" ,util-linux))) ; libuuid
250 `(#:test-target "test"
252 (modify-phases %standard-phases
253 (add-after 'unpack 'fix-include-directory
255 (substitute* "gptcurses.cc"
256 (("ncursesw/ncurses.h") "ncurses.h"))
258 (delete 'configure) ; no configure script
260 ;; There's no ‘make install’ target.
261 (lambda* (#:key outputs #:allow-other-keys)
262 (let* ((out (assoc-ref outputs "out"))
263 (bin (string-append out "/bin"))
264 (man (string-append out "/share/man/man8")))
265 (install-file "gdisk" bin)
266 (install-file "sgdisk" bin)
267 (install-file "cgdisk" bin)
268 (install-file "fixparts" bin)
269 (install-file "cgdisk.8" man)
270 (install-file "fixparts.8" man)
271 (install-file "gdisk.8" man)
272 (install-file "sgdisk.8" man)))))))
273 (home-page "https://www.rodsbooks.com/gdisk/")
274 (synopsis "Low-level GPT disk partitioning and formatting")
275 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
276 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
277 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
279 (license license:gpl2)))
281 (define-public ddrescue
288 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
291 (base32 "0qqh38izl5ppap9a5izf3hijh94k65s3zbfkczd4b7x04syqwlyf"))))
292 (build-system gnu-build-system)
293 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
294 (synopsis "Data recovery utility")
295 (native-inputs `(("lzip" ,lzip)))
297 "GNU ddrescue is a fully automated data recovery tool. It copies data
298 from one file to another, working to rescue data in case of read errors. The
299 program also includes a tool for manipulating its log files, which are used
300 to recover data more efficiently by only reading the necessary blocks.")
301 (license license:gpl3+)))
303 (define-public dosfstools
310 (uri (string-append "https://github.com/" name "/" name
311 "/releases/download/v" version "/"
312 name "-" version ".tar.xz"))
315 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
316 (build-system gnu-build-system)
318 `(#:configure-flags (list "--enable-compat-symlinks")
319 #:make-flags (list (string-append "PREFIX=" %output)
322 `(("xxd" ,xxd))) ; for tests
323 (home-page "https://github.com/dosfstools/dosfstools")
324 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
326 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
327 which respectively make and check MS-DOS FAT file systems.")
328 (license license:gpl3+)))
330 (define dosfstools/static
332 (package (inherit dosfstools))))
334 (define-public fatfsck/static
336 (name "fatfsck-static")
337 (version (package-version dosfstools))
338 (build-system trivial-build-system)
341 `(#:modules ((guix build utils))
344 (use-modules (guix build utils))
345 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
348 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
350 (with-directory-excursion bin
351 (copy-file (string-append src "/" exe) exe)
352 (remove-store-references exe)
354 ;; Add fsck.vfat symlink to match the Linux driver name.
355 (symlink exe "fsck.vfat")
357 (inputs `(("dosfstools" ,dosfstools/static)))
358 (home-page (package-home-page dosfstools))
359 (synopsis "Statically linked fsck.fat from dosfstools")
360 (description "This package provides a statically-linked @command{fsck.fat}
361 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
362 (license (package-license dosfstools))))
364 (define-public sdparm
371 (uri (string-append "http://sg.danny.cz/sg/p/"
372 "sdparm-" version ".tar.xz"))
374 (base32 "1nqjc4w2w47zavcbf5xmm53x1zbwgljaw1lpajcdi537cgy32fa8"))))
375 (build-system gnu-build-system)
376 (home-page "http://sg.danny.cz/sg/sdparm.html")
377 (synopsis "Provide access to SCSI device parameters")
379 "Sdparm reads and modifies SCSI device parameters. These devices can be
380 SCSI disks, in which case the role of @command{sdparm} is similar to its
381 namesake: the @command{hdparm} utility originally designed for ATA disks.
382 However, @command{sdparm} can be used to access parameters on any device that
383 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
384 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
385 also send commands associated with starting and stopping the media, loading
386 and unloading removable media and some other housekeeping functions.")
387 (license license:bsd-3)))
389 (define-public idle3-tools
396 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
400 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
401 (build-system gnu-build-system)
403 `(#:tests? #f ;no test suite
405 (modify-phases %standard-phases
407 #:make-flags (list "CC=gcc"
408 (string-append "manprefix=")
409 (string-append "DESTDIR="
410 (assoc-ref %outputs "out")))))
411 (home-page "http://idle3-tools.sourceforge.net")
412 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
414 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
415 present in many Western Digital hard drives. This timer is part of the
416 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
417 the default timer setting is not well suited to Linux or other *nix systems,
418 and can dramatically shorten the lifespan of the drive if left unchecked.")
419 (license license:gpl3+)))
421 (define-public gparted
428 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
429 version "/gparted-" version ".tar.gz"))
431 (base32 "092rgwjh1825fal6v3yafq2wr0i61hh0a2n0j4296zn0zdx7pzp2"))))
432 (build-system gnu-build-system)
434 ;; Tests require access to paths outside the build container, such
435 ;; as '/dev/disk/by-id'
438 `(("util-linux" ,util-linux)
442 ("libxml2" ,libxml2)))
444 `(("intltool" ,intltool)
446 ("lvm2" ,lvm2) ; for tests
447 ("yelp-tools" ,yelp-tools)
448 ("pkg-config" ,pkg-config)))
449 (home-page "https://gparted.org/")
450 (synopsis "Partition editor to graphically manage disk partitions")
451 (description "GParted is a GNOME partition editor for creating,
452 reorganizing, and deleting disk partitions. It uses libparted from the parted
453 project to detect and manipulate partition tables. Optional file system tools
454 permit managing file systems not included in libparted.")
455 ;; The home page says GPLv2, but the source code says GPLv2+.
456 (license license:gpl2+)))
465 (uri (pypi-uri "pydf" version))
468 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
469 (build-system python-build-system)
470 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
471 (synopsis "Colourised @command{df} clone")
472 (description "All-singing, all-dancing, fully colourised @command{df} clone
473 written in Python. It displays the amount of disk space available on the
474 mounted file systems, using different colours for different types of file
475 systems. Output format is completely customizable.")
476 (license license:public-domain)))
486 (url "https://github.com/AltraMayor/f3.git")
487 (commit (string-append "v" version))))
488 (file-name (git-file-name name version))
490 (base32 "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy"))))
491 (build-system gnu-build-system)
493 '(#:tests? #f ; no check target
494 #:make-flags (list "CC=gcc"
495 (string-append "PREFIX=" %output))
497 (modify-phases %standard-phases
498 (delete 'configure) ; no configure script
499 (add-after 'build 'build-extra
500 (lambda* (#:key make-flags #:allow-other-keys)
501 (apply invoke "make" "extra" make-flags)))
502 (add-after 'build 'install-extra
503 (lambda* (#:key make-flags #:allow-other-keys)
504 (apply invoke "make" "install-extra" make-flags))))))
508 (home-page "http://oss.digirati.com.br/f3/")
509 (synopsis "Test real capacity of flash memory cards and such.")
510 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
511 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
512 the card and then checks if can read it. It will assure you haven't been sold
513 a card with a smaller capacity than stated.")
514 (license license:gpl3+)))
516 (define-public python-parted
518 (name "python-parted")
524 (url "https://github.com/dcantrell/pyparted.git")
525 (commit (string-append "v" version))))
526 (file-name (git-file-name name version))
528 (base32 "0r6916n3w4vldxrq30a3z2iagvxgly4vfmlidjm65vwqnyv17bvn"))))
529 (build-system python-build-system)
532 (modify-phases %standard-phases
534 (add-after 'install 'check
535 (lambda* (#:key outputs inputs #:allow-other-keys)
536 (add-installed-pythonpath inputs outputs)
537 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
538 (substitute* "tests/test__ped_ped.py"
539 (("\"/tmp/temp-device-\"") "self.path"))
540 (invoke "python" "-m" "unittest" "discover" "-v")
543 `(("e2fsprogs" ,e2fsprogs)
544 ("pkg-config" ,pkg-config)))
546 `(("python-six" ,python-six)))
548 `(("parted" ,parted)))
549 (home-page "https://github.com/dcantrell/pyparted")
550 (synopsis "Parted bindings for Python")
551 (description "This package provides @code{parted} bindings for Python.")
552 (license license:gpl2+)))
554 (define-public python2-parted
555 (package-with-python2 python-parted))
557 (define-public duperemove
565 (url "https://github.com/markfasheh/duperemove.git")
566 (commit (string-append "v" version))))
568 (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z"))
569 (file-name (git-file-name name version))))
570 (build-system gnu-build-system)
572 `(("pkg-config" ,pkg-config)))
577 `(#:tests? #f ; no test suite
579 (modify-phases %standard-phases
580 (delete 'configure)) ; no configure script
581 #:make-flags (list (string-append "PREFIX=" %output)
583 (home-page "https://github.com/markfasheh/duperemove")
584 (synopsis "Tools for de-duplicating file system data")
585 (description "Duperemove is a simple tool for finding duplicated extents
586 and submitting them for deduplication. When given a list of files it will
587 hash their contents on a block by block basis and compare those hashes to each
588 other, finding and categorizing blocks that match each other. When given the
589 @option{-d} option, duperemove will submit those extents for deduplication
590 using the Linux kernel extent-same @code{ioctl}.
592 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
593 existing hash file, duperemove will only compute hashes for those files which
594 have changed since the last run. Thus you can run duperemove repeatedly on
595 your data as it changes, without having to re-checksum unchanged data.
597 Duperemove can also take input from the @command{fdupes} program.")
598 (license license:gpl2)))
600 (define-public ranger
606 (uri (string-append "https://ranger.github.io/"
607 "ranger-" version ".tar.gz"))
610 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
611 (build-system python-build-system)
618 ("python-pytest" ,python-pytest)))
620 '( ;; The 'test' target runs developer tools like pylint, which fail.
621 #:test-target "test_pytest"
623 (modify-phases %standard-phases
624 (add-after 'configure 'wrap-program
625 ;; Tell 'ranger' where 'w3mimgdisplay' is.
626 (lambda* (#:key inputs outputs #:allow-other-keys)
627 (let* ((out (assoc-ref outputs "out"))
628 (ranger (string-append out "/bin/ranger"))
629 (w3m (assoc-ref inputs "w3m"))
630 (w3mimgdisplay (string-append w3m
631 "/libexec/w3m/w3mimgdisplay")))
633 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
636 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
637 (lambda* (#:key test-target #:allow-other-keys)
638 (invoke "make" test-target))))))
639 (home-page "https://ranger.github.io/")
640 (synopsis "Console file manager")
641 (description "ranger is a console file manager with Vi key bindings. It
642 provides a minimalistic and nice curses interface with a view on the directory
643 hierarchy. It ships with @code{rifle}, a file launcher that is good at
644 automatically finding out which program to use for what file type.")
645 (license license:gpl3)))
647 (define-public volume-key
653 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
657 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
658 (build-system gnu-build-system)
660 `(("pkg-config" ,pkg-config)
662 ("python" ,python-3))) ; used to generate the Python bindings
664 `(("cryptsetup" ,cryptsetup)
666 ("libblkid" ,util-linux)
667 ("lvm2" ,lvm2) ; for "-ldevmapper"
671 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
673 (modify-phases %standard-phases
674 (add-before 'configure 'patch-python.h-path
675 (lambda* (#:key inputs #:allow-other-keys)
676 (let ((python (assoc-ref inputs "python")))
677 (substitute* "Makefile.in"
678 (("/usr/include/python") (string-append python "/include/python")))
680 (home-page "https://pagure.io/volume_key")
681 (synopsis "Manipulate storage volume encryption keys")
683 "This package provides a library for manipulating storage volume
684 encryption keys and storing them separately from volumes to handle forgotten
686 (license license:gpl2)))
695 (url "https://github.com/pmem/ndctl.git")
696 (commit (string-append "v" version))))
697 (file-name (git-file-name name version))
700 "0xmim7z4qp6x2ggndnbwd940c73pa1qlf3hxyn3qh5pyr69nh9y8"))))
701 (build-system gnu-build-system)
703 `(("asciidoc" ,asciidoc)
704 ("automake" ,automake)
705 ("autoconf" ,autoconf)
706 ("bash-completion" ,bash-completion)
707 ("docbook-xsl" ,docbook-xsl)
710 ("pkg-config" ,pkg-config)
712 ;; Required for offline docbook generation.
717 ("keyutils" ,keyutils)
719 ("util-linux" ,util-linux)))
722 (list "--disable-asciidoctor" ; use docbook-xsl instead
725 (modify-phases %standard-phases
726 (add-after 'unpack 'patch-FHS-file-names
728 (substitute* "git-version-gen"
729 (("/bin/sh") (which "sh")))
730 (substitute* "git-version"
731 (("/bin/bash") (which "bash")))
734 (let ((out (assoc-ref %outputs "out")))
735 (list (string-append "BASH_COMPLETION_DIR=" out
736 "/share/bash-completion/completions")))))
737 (home-page "https://github.com/pmem/ndctl")
738 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
740 "This package provides a utility library for managing the
741 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
742 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
743 ;; the effective license. Note that some files under ccan/ are
744 ;; covered by BSD-3 or public domain, see the individual folders.
745 (license license:gpl2)))
747 (define-public dmraid
750 (version "1.0.0.rc16-3")
753 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
757 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
758 (build-system gnu-build-system)
759 (inputs `(("lvm2" ,lvm2)))
760 (native-inputs `(("which" ,which)))
762 `(#:tests? #f ; No tests.
763 ;; Prevent a race condition where some target would attempt to link
764 ;; libdmraid.so before it had been built as reported in
765 ;; <https://bugs.gnu.org/31999#187>.
767 #:phases (modify-phases %standard-phases
768 (add-before 'configure 'change-directory
770 (chdir (string-append ,version "/dmraid"))
771 (substitute* "make.tmpl.in"
772 (("/bin/sh") (which "sh")))
774 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
775 ;; find libdmraid.so.
776 (string-append "LDFLAGS=-Wl,-rpath="
777 (assoc-ref %outputs "out")
779 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
780 (synopsis "Device mapper RAID interface")
782 "This software supports RAID device discovery, RAID set activation, creation,
783 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
785 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
786 to create devices with respective mappings for the ATARAID sets discovered.")
787 (license license:gpl2+)))
789 (define-public libblockdev
795 (uri (string-append "https://github.com/storaged-project/"
796 "libblockdev/releases/download/"
797 version "-1/libblockdev-" version ".tar.gz"))
800 "15c7g2gbkahmy8c6677pvbvblan5h8jxcqqmn6nlvqwqynq2mkjm"))))
801 (build-system gnu-build-system)
803 `(("pkg-config" ,pkg-config)
804 ("python" ,python-wrapper)
805 ("util-linux" ,util-linux)))
807 `(("btrfs-progs" ,btrfs-progs)
808 ("cryptsetup" ,cryptsetup)
809 ("dosfstools" ,dosfstools)
813 ("gobject-introspection" ,gobject-introspection)
815 ("libbytesize" ,libbytesize)
822 ("volume-key" ,volume-key)
823 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
825 (home-page "https://github.com/storaged-project/libblockdev")
826 (synopsis "Library for manipulating block devices")
828 "libblockdev is a C library supporting GObject introspection for
829 manipulation of block devices. It has a plugin-based architecture where each
830 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
831 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
833 (license license:lgpl2.1+)))
835 (define-public rmlint
842 (url "https://github.com/sahib/rmlint")
843 (commit (string-append "v" version))))
844 (file-name (git-file-name name version))
847 "1b5cziam14h80xrfb285fmfrzz2rligxcpsq1xsig14xf4l2875i"))))
848 (build-system scons-build-system)
850 `(#:scons ,scons-python2
851 #:scons-flags (list (string-append "--prefix=" %output)
852 (string-append "--actual-prefix=" %output))
853 #:tests? #f ; No tests?
855 (modify-phases %standard-phases
856 (add-after 'unpack 'scons-propagate-environment
857 (lambda* (#:key inputs #:allow-other-keys)
858 ;; TODO: `rmlint --gui` fails with
859 ;; "Failed to load shredder: No module named 'shredder'".
860 ;; The GUI might also need extra dependencies, such as
861 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
862 (substitute* "lib/cmdline.c"
863 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
865 "const char *commands[] = {\""
866 (assoc-ref inputs "python") "/bin/python"
867 "\", \"python\", NULL};")))
868 ;; By design, SCons does not, by default, propagate
869 ;; environment variables to subprocesses. See:
870 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
871 ;; Here, we modify the SConstruct file to arrange for
872 ;; environment variables to be propagated.
873 (substitute* "SConstruct"
874 (("^env = Environment\\(.*\\)" all)
877 "\nenv['ENV']=os.environ"))))))))
879 `(("pkg-config" ,pkg-config)
880 ("glib:bin" ,glib "bin")
881 ("python-sphinx" ,python-sphinx)))
883 `(("python" ,python-wrapper)
886 ("elfutils" ,elfutils)
887 ("json-glib" ,json-glib)
888 ("libblkid" ,util-linux)))
889 (home-page "https://rmlint.rtfd.org")
890 (synopsis "Remove duplicates and other lint from the file system")
891 (description "@command{rmlint} finds space waste and other broken things
892 on your file system and offers to remove it. @command{rmlint} can find:
895 @item duplicate files and duplicate directories,
896 @item non-stripped binaries (i.e. binaries with debug symbols),
897 @item broken symbolic links,
898 @item empty files and directories,
899 @item files with broken user and/or group ID.
901 (license license:gpl3+)))
910 (url "https://github.com/gokcehan/lf.git")
911 (commit (string-append "r" version))))
912 (file-name (git-file-name name version))
915 "1ld3q75v8rvp169w5p85z1vznqs9bhck6bm2f6fykxx16hmpb6ga"))))
916 (build-system go-build-system)
918 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
919 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
921 `(#:import-path "github.com/gokcehan/lf"))
922 (home-page "https://github.com/gokcehan/lf")
923 (synopsis "Console file browser similar to Ranger")
924 (description "lf (as in \"list files\") is a terminal file manager
925 written in Go. It is heavily inspired by ranger with some missing and
926 extra features. Some of the missing features are deliberately omitted
927 since they are better handled by external tools.")
928 (license license:expat)))
938 (string-append "mirror://sourceforge/xfe/xfe/" version "/"
939 "xfe-" version ".tar.gz"))
941 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs"))))
942 (build-system gnu-build-system)
944 `(("intltool" ,intltool)
945 ("pkg-config" ,pkg-config)))
948 ("freetype" ,freetype)
951 ("xcb-util" ,xcb-util)
953 ("xrandr" ,libxrandr)))
956 (modify-phases %standard-phases
957 (add-after 'unpack 'patch-xfe-paths
958 (lambda* (#:key outputs #:allow-other-keys)
960 ((out (assoc-ref outputs "out"))
961 (share (string-append out "/share"))
962 (xferc (string-append out "/share/xfe/xferc"))
963 (xfe-theme (string-append out "/share/xfe/icons/xfe-theme")))
964 ;; Correct path for xfe registry.
965 (substitute* "src/foxhacks.cpp"
966 (("/etc:/usr/share:/usr/local/share") share))
967 ;; Correct path for xfe configuration.
968 (substitute* "src/XFileExplorer.cpp"
969 (("/usr/share/xfe/xferc") xferc)
970 (("/usr/local/share/xfe/xferc") xferc)
971 (("/opt/local/share/xfe/xferc") xferc))
972 ;; Correct path for xfe icons.
973 (substitute* "src/xfedefs.h"
975 "~/.config/xfe/icons/xfe-theme:"
976 "/usr/local/share/xfe/icons/xfe-theme:"
977 "/usr/share/xfe/icons/xfe-theme"))
980 (synopsis "File Manager for X-Based Graphical Systems")
981 (description"XFE (X File Explorer) is a file manager for X. It is based on
982 the popular but discontinued, X Win Commander. It aims to be the file manager
983 of choice for all light thinking Unix addicts!")
984 (home-page "http://roland65.free.fr/xfe/")
985 (license license:gpl2+)))