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)
106 (list "--disable-systemd"
107 (string-append "--sysconfdir="
108 (assoc-ref %outputs "out")
111 (modify-phases %standard-phases
112 (add-after 'unpack 'remove-root-reference
114 (substitute* "src/Makefile.in"
115 (("-o root -g root") ""))
118 `(("intltool" ,intltool)
119 ("pkg-config" ,pkg-config)))
121 `(("cifs-utils" ,cifs-utils)
122 ("curlftpfs" ,curlftpfs)
124 ("fakeroot" ,fakeroot)
127 (synopsis "Device and file system manager")
128 (description "udevil is a command line program that mounts and unmounts
129 removable devices without a password, shows device info, and monitors device
130 changes. It can also mount ISO files, NFS, SMB, FTP, SSH and WebDAV URLs, and
131 tmpfs/ramfs filesystems.")
132 (home-page "https://ignorantguru.github.io/udevil/")
133 (license license:gpl3+)))
135 (define-public parted
141 (uri (string-append "mirror://gnu/parted/parted-"
145 "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"))))
146 (build-system gnu-build-system)
149 (modify-phases %standard-phases
150 (add-after 'unpack 'fix-locales-and-python
151 (lambda* (#:key inputs #:allow-other-keys)
152 (substitute* "tests/t0251-gpt-unicode.sh"
153 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
154 (substitute* "tests/msdos-overlap"
155 (("/usr/bin/python") (which "python")))
159 ("readline" ,readline)
160 ("util-linux" ,util-linux)))
162 `(("gettext" ,gettext-minimal)
164 ("e2fsprogs" ,e2fsprogs)
166 ("python" ,python-2)))
167 (home-page "https://www.gnu.org/software/parted/")
168 (synopsis "Disk partition editor")
170 "GNU Parted is a package for creating and manipulating disk partition
171 tables. It includes a library and command-line utility.")
172 (license license:gpl3+)))
181 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
185 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
186 (build-system gnu-build-system)
188 `(("gettext" ,gettext-minimal)
190 ("util-linux" ,util-linux)
192 ;; The build neglects to look for its own headers in its own tree. A next
193 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
196 (modify-phases %standard-phases
197 (add-after 'unpack 'skip-broken-header-probes
199 (substitute* "backend/configure"
200 (("gnufdisk-common.h .*") "\n"))
202 #:make-flags (list (string-append "CPPFLAGS="
203 " -I../common/include "
204 " -I../debug/include "
205 " -I../exception/include"))))
206 (home-page "https://www.gnu.org/software/fdisk/")
207 (synopsis "Low-level disk partitioning and formatting")
209 "GNU fdisk provides a GNU version of the common disk partitioning tool
210 fdisk. fdisk is used for the creation and manipulation of disk partition
211 tables, and it understands a variety of different formats.")
212 (license license:gpl3+)))
214 (define-public gptfdisk
221 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
222 version "/gptfdisk-" version ".tar.gz"))
224 (base32 "0bybgp30pqxb6x5krxazkq4drca0gz4inxj89fpyr204rn3kjz8f"))))
225 (build-system gnu-build-system)
227 `(("gettext" ,gettext-minimal)
230 ("util-linux" ,util-linux))) ; libuuid
232 `(#:test-target "test"
234 (modify-phases %standard-phases
235 (add-after 'unpack 'fix-include-directory
237 (substitute* "gptcurses.cc"
238 (("ncursesw/ncurses.h") "ncurses.h"))
240 (delete 'configure) ; no configure script
242 ;; There's no ‘make install’ target.
243 (lambda* (#:key outputs #:allow-other-keys)
244 (let* ((out (assoc-ref outputs "out"))
245 (bin (string-append out "/bin"))
246 (man (string-append out "/share/man/man8")))
247 (install-file "gdisk" bin)
248 (install-file "sgdisk" bin)
249 (install-file "cgdisk" bin)
250 (install-file "fixparts" bin)
251 (install-file "cgdisk.8" man)
252 (install-file "fixparts.8" man)
253 (install-file "gdisk.8" man)
254 (install-file "sgdisk.8" man)))))))
255 (home-page "https://www.rodsbooks.com/gdisk/")
256 (synopsis "Low-level GPT disk partitioning and formatting")
257 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
258 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
259 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
261 (license license:gpl2)))
263 (define-public ddrescue
270 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
273 (base32 "0qqh38izl5ppap9a5izf3hijh94k65s3zbfkczd4b7x04syqwlyf"))))
274 (build-system gnu-build-system)
275 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
276 (synopsis "Data recovery utility")
277 (native-inputs `(("lzip" ,lzip)))
279 "GNU ddrescue is a fully automated data recovery tool. It copies data
280 from one file to another, working to rescue data in case of read errors. The
281 program also includes a tool for manipulating its log files, which are used
282 to recover data more efficiently by only reading the necessary blocks.")
283 (license license:gpl3+)))
285 (define-public dosfstools
292 (uri (string-append "https://github.com/" name "/" name
293 "/releases/download/v" version "/"
294 name "-" version ".tar.xz"))
297 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
298 (build-system gnu-build-system)
300 `(#:configure-flags (list "--enable-compat-symlinks")
301 #:make-flags (list (string-append "PREFIX=" %output)
304 `(("xxd" ,xxd))) ; for tests
305 (home-page "https://github.com/dosfstools/dosfstools")
306 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
308 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
309 which respectively make and check MS-DOS FAT file systems.")
310 (license license:gpl3+)))
312 (define dosfstools/static
314 (package (inherit dosfstools))))
316 (define-public fatfsck/static
318 (name "fatfsck-static")
319 (version (package-version dosfstools))
320 (build-system trivial-build-system)
323 `(#:modules ((guix build utils))
326 (use-modules (guix build utils))
327 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
330 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
332 (with-directory-excursion bin
333 (copy-file (string-append src "/" exe) exe)
334 (remove-store-references exe)
336 ;; Add fsck.vfat symlink to match the Linux driver name.
337 (symlink exe "fsck.vfat")
339 (inputs `(("dosfstools" ,dosfstools/static)))
340 (home-page (package-home-page dosfstools))
341 (synopsis "Statically linked fsck.fat from dosfstools")
342 (description "This package provides a statically-linked @command{fsck.fat}
343 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
344 (license (package-license dosfstools))))
346 (define-public sdparm
353 (uri (string-append "http://sg.danny.cz/sg/p/"
354 "sdparm-" version ".tar.xz"))
356 (base32 "1nqjc4w2w47zavcbf5xmm53x1zbwgljaw1lpajcdi537cgy32fa8"))))
357 (build-system gnu-build-system)
358 (home-page "http://sg.danny.cz/sg/sdparm.html")
359 (synopsis "Provide access to SCSI device parameters")
361 "Sdparm reads and modifies SCSI device parameters. These devices can be
362 SCSI disks, in which case the role of @command{sdparm} is similar to its
363 namesake: the @command{hdparm} utility originally designed for ATA disks.
364 However, @command{sdparm} can be used to access parameters on any device that
365 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
366 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
367 also send commands associated with starting and stopping the media, loading
368 and unloading removable media and some other housekeeping functions.")
369 (license license:bsd-3)))
371 (define-public idle3-tools
378 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
382 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
383 (build-system gnu-build-system)
385 `(#:tests? #f ;no test suite
387 (modify-phases %standard-phases
389 #:make-flags (list "CC=gcc"
390 (string-append "manprefix=")
391 (string-append "DESTDIR="
392 (assoc-ref %outputs "out")))))
393 (home-page "http://idle3-tools.sourceforge.net")
394 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
396 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
397 present in many Western Digital hard drives. This timer is part of the
398 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
399 the default timer setting is not well suited to Linux or other *nix systems,
400 and can dramatically shorten the lifespan of the drive if left unchecked.")
401 (license license:gpl3+)))
403 (define-public gparted
410 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
411 version "/gparted-" version ".tar.gz"))
413 (base32 "092rgwjh1825fal6v3yafq2wr0i61hh0a2n0j4296zn0zdx7pzp2"))))
414 (build-system gnu-build-system)
416 ;; Tests require access to paths outside the build container, such
417 ;; as '/dev/disk/by-id'
420 `(("util-linux" ,util-linux)
424 ("libxml2" ,libxml2)))
426 `(("intltool" ,intltool)
428 ("lvm2" ,lvm2) ; for tests
429 ("yelp-tools" ,yelp-tools)
430 ("pkg-config" ,pkg-config)))
431 (home-page "https://gparted.org/")
432 (synopsis "Partition editor to graphically manage disk partitions")
433 (description "GParted is a GNOME partition editor for creating,
434 reorganizing, and deleting disk partitions. It uses libparted from the parted
435 project to detect and manipulate partition tables. Optional file system tools
436 permit managing file systems not included in libparted.")
437 ;; The home page says GPLv2, but the source code says GPLv2+.
438 (license license:gpl2+)))
447 (uri (pypi-uri "pydf" version))
450 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
451 (build-system python-build-system)
452 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
453 (synopsis "Colourised @command{df} clone")
454 (description "All-singing, all-dancing, fully colourised @command{df} clone
455 written in Python. It displays the amount of disk space available on the
456 mounted file systems, using different colours for different types of file
457 systems. Output format is completely customizable.")
458 (license license:public-domain)))
468 (url "https://github.com/AltraMayor/f3.git")
469 (commit (string-append "v" version))))
470 (file-name (git-file-name name version))
472 (base32 "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy"))))
473 (build-system gnu-build-system)
475 '(#:tests? #f ; no check target
476 #:make-flags (list "CC=gcc"
477 (string-append "PREFIX=" %output))
479 (modify-phases %standard-phases
480 (delete 'configure) ; no configure script
481 (add-after 'build 'build-extra
482 (lambda* (#:key make-flags #:allow-other-keys)
483 (apply invoke "make" "extra" make-flags)))
484 (add-after 'build 'install-extra
485 (lambda* (#:key make-flags #:allow-other-keys)
486 (apply invoke "make" "install-extra" make-flags))))))
490 (home-page "http://oss.digirati.com.br/f3/")
491 (synopsis "Test real capacity of flash memory cards and such.")
492 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
493 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
494 the card and then checks if can read it. It will assure you haven't been sold
495 a card with a smaller capacity than stated.")
496 (license license:gpl3+)))
498 (define-public python-parted
500 (name "python-parted")
506 (url "https://github.com/dcantrell/pyparted.git")
507 (commit (string-append "v" version))))
508 (file-name (git-file-name name version))
510 (base32 "0r6916n3w4vldxrq30a3z2iagvxgly4vfmlidjm65vwqnyv17bvn"))))
511 (build-system python-build-system)
514 (modify-phases %standard-phases
516 (add-after 'install 'check
517 (lambda* (#:key outputs inputs #:allow-other-keys)
518 (add-installed-pythonpath inputs outputs)
519 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
520 (substitute* "tests/test__ped_ped.py"
521 (("\"/tmp/temp-device-\"") "self.path"))
522 (invoke "python" "-m" "unittest" "discover" "-v")
525 `(("e2fsprogs" ,e2fsprogs)
526 ("pkg-config" ,pkg-config)))
528 `(("python-six" ,python-six)))
530 `(("parted" ,parted)))
531 (home-page "https://github.com/dcantrell/pyparted")
532 (synopsis "Parted bindings for Python")
533 (description "This package provides @code{parted} bindings for Python.")
534 (license license:gpl2+)))
536 (define-public python2-parted
537 (package-with-python2 python-parted))
539 (define-public duperemove
547 (url "https://github.com/markfasheh/duperemove.git")
548 (commit (string-append "v" version))))
550 (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z"))
551 (file-name (git-file-name name version))))
552 (build-system gnu-build-system)
554 `(("pkg-config" ,pkg-config)))
559 `(#:tests? #f ; no test suite
561 (modify-phases %standard-phases
562 (delete 'configure)) ; no configure script
563 #:make-flags (list (string-append "PREFIX=" %output)
565 (home-page "https://github.com/markfasheh/duperemove")
566 (synopsis "Tools for de-duplicating file system data")
567 (description "Duperemove is a simple tool for finding duplicated extents
568 and submitting them for deduplication. When given a list of files it will
569 hash their contents on a block by block basis and compare those hashes to each
570 other, finding and categorizing blocks that match each other. When given the
571 @option{-d} option, duperemove will submit those extents for deduplication
572 using the Linux kernel extent-same @code{ioctl}.
574 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
575 existing hash file, duperemove will only compute hashes for those files which
576 have changed since the last run. Thus you can run duperemove repeatedly on
577 your data as it changes, without having to re-checksum unchanged data.
579 Duperemove can also take input from the @command{fdupes} program.")
580 (license license:gpl2)))
582 (define-public ranger
588 (uri (string-append "https://ranger.github.io/"
589 "ranger-" version ".tar.gz"))
592 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
593 (build-system python-build-system)
600 ("python-pytest" ,python-pytest)))
602 '( ;; The 'test' target runs developer tools like pylint, which fail.
603 #:test-target "test_pytest"
605 (modify-phases %standard-phases
606 (add-after 'configure 'wrap-program
607 ;; Tell 'ranger' where 'w3mimgdisplay' is.
608 (lambda* (#:key inputs outputs #:allow-other-keys)
609 (let* ((out (assoc-ref outputs "out"))
610 (ranger (string-append out "/bin/ranger"))
611 (w3m (assoc-ref inputs "w3m"))
612 (w3mimgdisplay (string-append w3m
613 "/libexec/w3m/w3mimgdisplay")))
615 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
618 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
619 (lambda* (#:key test-target #:allow-other-keys)
620 (invoke "make" test-target))))))
621 (home-page "https://ranger.github.io/")
622 (synopsis "Console file manager")
623 (description "ranger is a console file manager with Vi key bindings. It
624 provides a minimalistic and nice curses interface with a view on the directory
625 hierarchy. It ships with @code{rifle}, a file launcher that is good at
626 automatically finding out which program to use for what file type.")
627 (license license:gpl3)))
629 (define-public volume-key
635 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
639 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
640 (build-system gnu-build-system)
642 `(("pkg-config" ,pkg-config)
644 ("python" ,python-3))) ; used to generate the Python bindings
646 `(("cryptsetup" ,cryptsetup)
648 ("libblkid" ,util-linux)
649 ("lvm2" ,lvm2) ; for "-ldevmapper"
653 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
655 (modify-phases %standard-phases
656 (add-before 'configure 'patch-python.h-path
657 (lambda* (#:key inputs #:allow-other-keys)
658 (let ((python (assoc-ref inputs "python")))
659 (substitute* "Makefile.in"
660 (("/usr/include/python") (string-append python "/include/python")))
662 (home-page "https://pagure.io/volume_key")
663 (synopsis "Manipulate storage volume encryption keys")
665 "This package provides a library for manipulating storage volume
666 encryption keys and storing them separately from volumes to handle forgotten
668 (license license:gpl2)))
677 (url "https://github.com/pmem/ndctl.git")
678 (commit (string-append "v" version))))
679 (file-name (git-file-name name version))
682 "0xmim7z4qp6x2ggndnbwd940c73pa1qlf3hxyn3qh5pyr69nh9y8"))))
683 (build-system gnu-build-system)
685 `(("asciidoc" ,asciidoc)
686 ("automake" ,automake)
687 ("autoconf" ,autoconf)
688 ("bash-completion" ,bash-completion)
689 ("docbook-xsl" ,docbook-xsl)
692 ("pkg-config" ,pkg-config)
694 ;; Required for offline docbook generation.
699 ("keyutils" ,keyutils)
701 ("util-linux" ,util-linux)))
704 (list "--disable-asciidoctor" ; use docbook-xsl instead
707 (modify-phases %standard-phases
708 (add-after 'unpack 'patch-FHS-file-names
710 (substitute* "git-version-gen"
711 (("/bin/sh") (which "sh")))
712 (substitute* "git-version"
713 (("/bin/bash") (which "bash")))
716 (let ((out (assoc-ref %outputs "out")))
717 (list (string-append "BASH_COMPLETION_DIR=" out
718 "/share/bash-completion/completions")))))
719 (home-page "https://github.com/pmem/ndctl")
720 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
722 "This package provides a utility library for managing the
723 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
724 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
725 ;; the effective license. Note that some files under ccan/ are
726 ;; covered by BSD-3 or public domain, see the individual folders.
727 (license license:gpl2)))
729 (define-public dmraid
732 (version "1.0.0.rc16-3")
735 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
739 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
740 (build-system gnu-build-system)
741 (inputs `(("lvm2" ,lvm2)))
742 (native-inputs `(("which" ,which)))
744 `(#:tests? #f ; No tests.
745 ;; Prevent a race condition where some target would attempt to link
746 ;; libdmraid.so before it had been built as reported in
747 ;; <https://bugs.gnu.org/31999#187>.
749 #:phases (modify-phases %standard-phases
750 (add-before 'configure 'change-directory
752 (chdir (string-append ,version "/dmraid"))
753 (substitute* "make.tmpl.in"
754 (("/bin/sh") (which "sh")))
756 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
757 ;; find libdmraid.so.
758 (string-append "LDFLAGS=-Wl,-rpath="
759 (assoc-ref %outputs "out")
761 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
762 (synopsis "Device mapper RAID interface")
764 "This software supports RAID device discovery, RAID set activation, creation,
765 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
767 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
768 to create devices with respective mappings for the ATARAID sets discovered.")
769 (license license:gpl2+)))
771 (define-public libblockdev
777 (uri (string-append "https://github.com/storaged-project/"
778 "libblockdev/releases/download/"
779 version "-1/libblockdev-" version ".tar.gz"))
782 "15c7g2gbkahmy8c6677pvbvblan5h8jxcqqmn6nlvqwqynq2mkjm"))))
783 (build-system gnu-build-system)
785 `(("pkg-config" ,pkg-config)
786 ("python" ,python-wrapper)
787 ("util-linux" ,util-linux)))
789 `(("btrfs-progs" ,btrfs-progs)
790 ("cryptsetup" ,cryptsetup)
791 ("dosfstools" ,dosfstools)
795 ("gobject-introspection" ,gobject-introspection)
797 ("libbytesize" ,libbytesize)
804 ("volume-key" ,volume-key)
805 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
807 (home-page "https://github.com/storaged-project/libblockdev")
808 (synopsis "Library for manipulating block devices")
810 "libblockdev is a C library supporting GObject introspection for
811 manipulation of block devices. It has a plugin-based architecture where each
812 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
813 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
815 (license license:lgpl2.1+)))
817 (define-public rmlint
824 (url "https://github.com/sahib/rmlint")
825 (commit (string-append "v" version))))
826 (file-name (git-file-name name version))
829 "1b5cziam14h80xrfb285fmfrzz2rligxcpsq1xsig14xf4l2875i"))))
830 (build-system scons-build-system)
832 `(#:scons ,scons-python2
833 #:scons-flags (list (string-append "--prefix=" %output)
834 (string-append "--actual-prefix=" %output))
835 #:tests? #f ; No tests?
837 (modify-phases %standard-phases
838 (add-after 'unpack 'scons-propagate-environment
839 (lambda* (#:key inputs #:allow-other-keys)
840 ;; TODO: `rmlint --gui` fails with
841 ;; "Failed to load shredder: No module named 'shredder'".
842 ;; The GUI might also need extra dependencies, such as
843 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
844 (substitute* "lib/cmdline.c"
845 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
847 "const char *commands[] = {\""
848 (assoc-ref inputs "python") "/bin/python"
849 "\", \"python\", NULL};")))
850 ;; By design, SCons does not, by default, propagate
851 ;; environment variables to subprocesses. See:
852 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
853 ;; Here, we modify the SConstruct file to arrange for
854 ;; environment variables to be propagated.
855 (substitute* "SConstruct"
856 (("^env = Environment\\(.*\\)" all)
859 "\nenv['ENV']=os.environ"))))))))
861 `(("pkg-config" ,pkg-config)
862 ("glib:bin" ,glib "bin")
863 ("python-sphinx" ,python-sphinx)))
865 `(("python" ,python-wrapper)
868 ("elfutils" ,elfutils)
869 ("json-glib" ,json-glib)
870 ("libblkid" ,util-linux)))
871 (home-page "https://rmlint.rtfd.org")
872 (synopsis "Remove duplicates and other lint from the file system")
873 (description "@command{rmlint} finds space waste and other broken things
874 on your file system and offers to remove it. @command{rmlint} can find:
877 @item duplicate files and duplicate directories,
878 @item non-stripped binaries (i.e. binaries with debug symbols),
879 @item broken symbolic links,
880 @item empty files and directories,
881 @item files with broken user and/or group ID.
883 (license license:gpl3+)))
892 (url "https://github.com/gokcehan/lf.git")
893 (commit (string-append "r" version))))
894 (file-name (git-file-name name version))
897 "1ld3q75v8rvp169w5p85z1vznqs9bhck6bm2f6fykxx16hmpb6ga"))))
898 (build-system go-build-system)
900 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
901 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
903 `(#:import-path "github.com/gokcehan/lf"))
904 (home-page "https://github.com/gokcehan/lf")
905 (synopsis "Console file browser similar to Ranger")
906 (description "lf (as in \"list files\") is a terminal file manager
907 written in Go. It is heavily inspired by ranger with some missing and
908 extra features. Some of the missing features are deliberately omitted
909 since they are better handled by external tools.")
910 (license license:expat)))
920 (string-append "https://sourceforge.net/projects/xfe/files/xfe/"
922 "/xfe-" version ".tar.gz"))
924 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs"))))
925 (build-system gnu-build-system)
927 `(("intltool" ,intltool)
928 ("pkg-config" ,pkg-config)))
931 ("freetype" ,freetype)
934 ("xcb-util" ,xcb-util)
936 ("xrandr" ,libxrandr)))
939 (modify-phases %standard-phases
940 (add-after 'unpack 'patch-xferc-path
941 (lambda* (#:key outputs #:allow-other-keys)
942 (let* ((out (assoc-ref outputs "out"))
943 (xferc (string-append out "/share/xfe/xferc")))
944 (substitute* "src/XFileExplorer.cpp"
945 (("/usr/share/xfe/xferc") xferc))
948 (let ((out (assoc-ref %outputs "out")))
949 (list (string-append "BASH_COMPLETION_DIR=" out
950 "/share/bash-completion/completions")))))
951 (synopsis "File Manager for X-Based Graphical Systems")
952 (description"XFE (X File Explorer) is a file manager for X. It is based on
953 the popular but discontinued, X Win Commander. It aims to be the file manager
954 of choice for all light thinking Unix addicts!")
955 (home-page "http://roland65.free.fr/xfe/")
956 (license license:gpl2+)))