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 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2016, 2019 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>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages disk)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages bash)
39 #:use-module (gnu packages c)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages cryptsetup)
44 #:use-module (gnu packages docbook)
45 #:use-module (gnu packages documentation)
46 #:use-module (gnu packages elf)
47 #:use-module (gnu packages gettext)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages gnome)
50 #:use-module (gnu packages gnupg)
51 #:use-module (gnu packages gtk)
52 #:use-module (gnu packages guile)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages nss)
56 #:use-module (gnu packages perl)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages popt)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages readline)
62 #:use-module (gnu packages sphinx)
63 #:use-module (gnu packages sqlite)
64 #:use-module (gnu packages swig)
65 #:use-module (gnu packages vim)
66 #:use-module (gnu packages w3m)
67 #:use-module (gnu packages web)
68 #:use-module (gnu packages xml)
69 #:use-module (guix build-system gnu)
70 #:use-module (guix build-system python)
71 #:use-module (guix build-system trivial)
72 #:use-module (guix build-system scons)
73 #:use-module (guix download)
74 #:use-module (guix git-download)
75 #:use-module ((guix licenses) #:prefix license:)
76 #:use-module (guix packages))
84 (uri (string-append "mirror://gnu/parted/parted-"
88 "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"))))
89 (build-system gnu-build-system)
92 (modify-phases %standard-phases
93 (add-after 'unpack 'fix-locales-and-python
94 (lambda* (#:key inputs #:allow-other-keys)
95 (substitute* "tests/t0251-gpt-unicode.sh"
96 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
97 (substitute* "tests/msdos-overlap"
98 (("/usr/bin/python") (which "python")))
102 ("readline" ,readline)
103 ("util-linux" ,util-linux)))
105 `(("gettext" ,gettext-minimal)
107 ("e2fsprogs" ,e2fsprogs)
109 ("python" ,python-2)))
110 (home-page "https://www.gnu.org/software/parted/")
111 (synopsis "Disk partition editor")
113 "GNU Parted is a package for creating and manipulating disk partition
114 tables. It includes a library and command-line utility.")
115 (license license:gpl3+)))
124 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
128 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
129 (build-system gnu-build-system)
131 `(("gettext" ,gettext-minimal)
133 ("util-linux" ,util-linux)
135 ;; The build neglects to look for its own headers in its own tree. A next
136 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
139 (modify-phases %standard-phases
140 (add-after 'unpack 'skip-broken-header-probes
142 (substitute* "backend/configure"
143 (("gnufdisk-common.h .*") "\n"))
145 #:make-flags (list (string-append "CPPFLAGS="
146 " -I../common/include "
147 " -I../debug/include "
148 " -I../exception/include"))))
149 (home-page "https://www.gnu.org/software/fdisk/")
150 (synopsis "Low-level disk partitioning and formatting")
152 "GNU fdisk provides a GNU version of the common disk partitioning tool
153 fdisk. fdisk is used for the creation and manipulation of disk partition
154 tables, and it understands a variety of different formats.")
155 (license license:gpl3+)))
157 (define-public gptfdisk
164 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
165 version "/" name "-" version ".tar.gz"))
168 "13d7gff4prl1nsdknjigmb7bbqhn79165n01v4y9mwbnd0d3jqxn"))))
169 (build-system gnu-build-system)
171 `(("gettext" ,gettext-minimal)
174 ("util-linux" ,util-linux))) ; libuuid
176 `(#:test-target "test"
178 (modify-phases %standard-phases
179 ;; no configure script
183 (lambda* (#:key outputs #:allow-other-keys)
184 (let* ((out (assoc-ref outputs "out"))
185 (bin (string-append out "/bin"))
186 (man (string-append out "/share/man/man8")))
187 (install-file "gdisk" bin)
188 (install-file "sgdisk" bin)
189 (install-file "cgdisk" bin)
190 (install-file "fixparts" bin)
191 (install-file "cgdisk.8" man)
192 (install-file "fixparts.8" man)
193 (install-file "gdisk.8" man)
194 (install-file "sgdisk.8" man)))))))
195 (home-page "http://www.rodsbooks.com/gdisk/")
196 (synopsis "Low-level GPT disk partitioning and formatting")
197 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
198 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
199 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
201 (license license:gpl2)))
203 (define-public ddrescue
210 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
213 (base32 "11qh0bbzf00mfb4yq35gnv5m260k4d7q9ixklry6bqvhvvp3ypab"))))
214 (build-system gnu-build-system)
215 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
216 (synopsis "Data recovery utility")
217 (native-inputs `(("lzip" ,lzip)))
219 "GNU ddrescue is a fully automated data recovery tool. It copies data
220 from one file to another, working to rescue data in case of read errors. The
221 program also includes a tool for manipulating its log files, which are used
222 to recover data more efficiently by only reading the necessary blocks.")
223 (license license:gpl3+)))
225 (define-public dosfstools
232 (uri (string-append "https://github.com/" name "/" name
233 "/releases/download/v" version "/"
234 name "-" version ".tar.xz"))
237 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
238 (build-system gnu-build-system)
240 `(#:configure-flags (list "--enable-compat-symlinks")
241 #:make-flags (list (string-append "PREFIX=" %output)
244 `(("xxd" ,xxd))) ; for tests
245 (home-page "https://github.com/dosfstools/dosfstools")
246 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
248 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
249 which respectively make and check MS-DOS FAT file systems.")
250 (license license:gpl3+)))
252 (define dosfstools/static
254 (package (inherit dosfstools))))
256 (define-public fatfsck/static
258 (name "fatfsck-static")
259 (version (package-version dosfstools))
260 (build-system trivial-build-system)
263 `(#:modules ((guix build utils))
266 (use-modules (guix build utils))
267 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
270 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
272 (with-directory-excursion bin
273 (copy-file (string-append src "/" exe) exe)
274 (remove-store-references exe)
276 ;; Add fsck.vfat symlink to match the Linux driver name.
277 (symlink exe "fsck.vfat")
279 (inputs `(("dosfstools" ,dosfstools/static)))
280 (home-page (package-home-page dosfstools))
281 (synopsis "Statically linked fsck.fat from dosfstools")
282 (description "This package provides a statically-linked @command{fsck.fat}
283 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
284 (license (package-license dosfstools))))
286 (define-public sdparm
293 (uri (string-append "http://sg.danny.cz/sg/p/"
294 name "-" version ".tar.xz"))
297 "1jjq3lzgfy4r76rc26q02lv4wm5cb4dx5nh913h489zjrr4f3jbx"))))
298 (build-system gnu-build-system)
299 (home-page "http://sg.danny.cz/sg/sdparm.html")
300 (synopsis "Provide access to SCSI device parameters")
302 "Sdparm reads and modifies SCSI device parameters. These devices can be
303 SCSI disks, in which case the role of @command{sdparm} is similar to its
304 namesake: the @command{hdparm} utility originally designed for ATA disks.
305 However, @command{sdparm} can be used to access parameters on any device that
306 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
307 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
308 also send commands associated with starting and stopping the media, loading
309 and unloading removable media and some other housekeeping functions.")
310 (license license:bsd-3)))
312 (define-public idle3-tools
319 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
323 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
324 (build-system gnu-build-system)
326 `(#:tests? #f ;no test suite
328 (modify-phases %standard-phases
330 #:make-flags (list "CC=gcc"
331 (string-append "manprefix=")
332 (string-append "DESTDIR="
333 (assoc-ref %outputs "out")))))
334 (home-page "http://idle3-tools.sourceforge.net")
335 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
337 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
338 present in many Western Digital hard drives. This timer is part of the
339 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
340 the default timer setting is not well suited to Linux or other *nix systems,
341 and can dramatically shorten the lifespan of the drive if left unchecked.")
342 (license license:gpl3+)))
344 (define-public gparted
351 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
352 version "/gparted-" version ".tar.gz"))
355 "0mdvn85jvy72ff7nds3dakx9kzknh8gx1z8i0w2sf970q03qp2z4"))))
356 (build-system gnu-build-system)
358 ;; Tests require access to paths outside the build container, such
359 ;; as '/dev/disk/by-id'
362 `(("util-linux" ,util-linux)
367 ("yelp-tools" ,yelp-tools)))
369 `(("intltool" ,intltool)
371 ("lvm2" ,lvm2) ; for tests
372 ("pkg-config" ,pkg-config)))
373 (home-page "https://gparted.org/")
374 (synopsis "Partition editor to graphically manage disk partitions")
375 (description "GParted is a GNOME partition editor for creating,
376 reorganizing, and deleting disk partitions. It uses libparted from the parted
377 project to detect and manipulate partition tables. Optional file system tools
378 permit managing file systems not included in libparted.")
379 ;; The home page says GPLv2, but the source code says GPLv2+.
380 (license license:gpl2+)))
389 (uri (pypi-uri "pydf" version))
392 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
393 (build-system python-build-system)
394 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
395 (synopsis "Colourised @command{df} clone")
396 (description "All-singing, all-dancing, fully colourised @command{df} clone
397 written in Python. It displays the amount of disk space available on the
398 mounted file systems, using different colours for different types of file
399 systems. Output format is completely customizable.")
400 (license license:public-domain)))
410 (url "https://github.com/AltraMayor/f3.git")
411 (commit (string-append "v" version))))
412 (file-name (git-file-name name version))
414 (base32 "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy"))))
415 (build-system gnu-build-system)
417 '(#:tests? #f ; no check target
418 #:make-flags (list "CC=gcc"
419 (string-append "PREFIX=" %output))
421 (modify-phases %standard-phases
422 (delete 'configure) ; no configure script
423 (add-after 'build 'build-extra
424 (lambda* (#:key make-flags #:allow-other-keys)
425 (apply invoke "make" "extra" make-flags)))
426 (add-after 'build 'install-extra
427 (lambda* (#:key make-flags #:allow-other-keys)
428 (apply invoke "make" "install-extra" make-flags))))))
432 (home-page "http://oss.digirati.com.br/f3/")
433 (synopsis "Test real capacity of flash memory cards and such.")
434 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
435 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
436 the card and then checks if can read it. It will assure you haven't been sold
437 a card with a smaller capacity than stated.")
438 (license license:gpl3+)))
440 (define-public python-parted
442 (name "python-parted")
448 (url "https://github.com/dcantrell/pyparted.git")
449 (commit (string-append "v" version))))
450 (file-name (git-file-name name version))
452 (base32 "0r6916n3w4vldxrq30a3z2iagvxgly4vfmlidjm65vwqnyv17bvn"))))
453 (build-system python-build-system)
456 (modify-phases %standard-phases
458 (add-after 'install 'check
459 (lambda* (#:key outputs inputs #:allow-other-keys)
460 (add-installed-pythonpath inputs outputs)
461 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
462 (substitute* "tests/test__ped_ped.py"
463 (("\"/tmp/temp-device-\"") "self.path"))
464 (invoke "python" "-m" "unittest" "discover" "-v")
467 `(("e2fsprogs" ,e2fsprogs)
468 ("pkg-config" ,pkg-config)))
470 `(("python-six" ,python-six)))
472 `(("parted" ,parted)))
473 (home-page "https://github.com/dcantrell/pyparted")
474 (synopsis "Parted bindings for Python")
475 (description "This package provides @code{parted} bindings for Python.")
476 (license license:gpl2+)))
478 (define-public python2-parted
479 (package-with-python2 python-parted))
481 (define-public duperemove
489 (url "https://github.com/markfasheh/duperemove.git")
490 (commit (string-append "v" version))))
492 (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z"))
493 (file-name (git-file-name name version))))
494 (build-system gnu-build-system)
496 `(("pkg-config" ,pkg-config)))
501 `(#:tests? #f ; no test suite
503 (modify-phases %standard-phases
504 (delete 'configure)) ; no configure script
505 #:make-flags (list (string-append "PREFIX=" %output)
507 (home-page "https://github.com/markfasheh/duperemove")
508 (synopsis "Tools for de-duplicating file system data")
509 (description "Duperemove is a simple tool for finding duplicated extents
510 and submitting them for deduplication. When given a list of files it will
511 hash their contents on a block by block basis and compare those hashes to each
512 other, finding and categorizing blocks that match each other. When given the
513 @option{-d} option, duperemove will submit those extents for deduplication
514 using the Linux kernel extent-same @code{ioctl}.
516 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
517 existing hash file, duperemove will only compute hashes for those files which
518 have changed since the last run. Thus you can run duperemove repeatedly on
519 your data as it changes, without having to re-checksum unchanged data.
521 Duperemove can also take input from the @command{fdupes} program.")
522 (license license:gpl2)))
524 (define-public ranger
530 (uri (string-append "https://ranger.github.io/"
531 "ranger-" version ".tar.gz"))
534 "12kbsqakbxs09y0x8hy66mmaf72rk0p850x7ryk2ghkq7wfin78f"))))
535 (build-system python-build-system)
542 ("python-pytest" ,python-pytest)))
544 '( ;; The 'test' target runs developer tools like pylint, which fail.
545 #:test-target "test_pytest"
547 (modify-phases %standard-phases
548 (add-after 'configure 'wrap-program
549 ;; Tell 'ranger' where 'w3mimgdisplay' is.
550 (lambda* (#:key inputs outputs #:allow-other-keys)
551 (let* ((out (assoc-ref outputs "out"))
552 (ranger (string-append out "/bin/ranger"))
553 (w3m (assoc-ref inputs "w3m"))
554 (w3mimgdisplay (string-append w3m
555 "/libexec/w3m/w3mimgdisplay")))
557 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
560 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
561 (lambda* (#:key test-target #:allow-other-keys)
562 (invoke "make" test-target))))))
563 (home-page "https://ranger.github.io/")
564 (synopsis "Console file manager")
565 (description "ranger is a console file manager with Vi key bindings. It
566 provides a minimalistic and nice curses interface with a view on the directory
567 hierarchy. It ships with @code{rifle}, a file launcher that is good at
568 automatically finding out which program to use for what file type.")
569 (license license:gpl3)))
571 (define-public volume-key
577 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
581 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
582 (build-system gnu-build-system)
584 `(("pkg-config" ,pkg-config)
585 ("util-linux" ,util-linux)
587 ("python" ,python-3))) ; used to generate the Python bindings
589 `(("cryptsetup" ,cryptsetup)
591 ("lvm2" ,lvm2) ; for "-ldevmapper"
595 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
597 (modify-phases %standard-phases
598 (add-before 'configure 'patch-python.h-path
599 (lambda* (#:key inputs #:allow-other-keys)
600 (let ((python (assoc-ref inputs "python")))
601 (substitute* "Makefile.in"
602 (("/usr/include/python") (string-append python "/include/python")))
604 (home-page "https://pagure.io/volume_key")
605 (synopsis "Manipulate storage volume encryption keys")
607 "This package provides a library for manipulating storage volume
608 encryption keys and storing them separately from volumes to handle forgotten
610 (license license:gpl2)))
619 (url "https://github.com/pmem/ndctl.git")
620 (commit (string-append "v" version))))
621 (file-name (git-file-name name version))
624 "076jgw1g2aafqgnq705in0wnabysqk46dq5yxdv1qzgjmyhka39n"))))
625 (build-system gnu-build-system)
627 `(("asciidoc" ,asciidoc)
628 ("automake" ,automake)
629 ("autoconf" ,autoconf)
630 ("bash-completion" ,bash-completion)
631 ("docbook-xsl" ,docbook-xsl)
634 ("pkg-config" ,pkg-config)
636 ;; Required for offline docbook generation.
641 ("keyutils" ,keyutils)
643 ("util-linux" ,util-linux)))
646 (list "--disable-asciidoctor" ; use docbook-xsl instead
649 (modify-phases %standard-phases
650 (add-after 'unpack 'patch-FHS-file-names
652 (substitute* "git-version-gen"
653 (("/bin/sh") (which "sh")))
654 (substitute* "git-version"
655 (("/bin/bash") (which "bash")))
658 (let ((out (assoc-ref %outputs "out")))
659 (list (string-append "BASH_COMPLETION_DIR=" out
660 "/share/bash-completion/completions")))))
661 (home-page "https://github.com/pmem/ndctl")
662 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
664 "This package provides a utility library for managing the
665 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
666 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
667 ;; the effective license. Note that some files under ccan/ are
668 ;; covered by BSD-3 or public domain, see the individual folders.
669 (license license:gpl2)))
671 (define-public dmraid
674 (version "1.0.0.rc16-3")
677 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
681 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
682 (build-system gnu-build-system)
683 (inputs `(("lvm2" ,lvm2)))
684 (native-inputs `(("which" ,which)))
686 `(#:tests? #f ; No tests.
687 ;; Prevent a race condition where some target would attempt to link
688 ;; libdmraid.so before it had been built as reported in
689 ;; <https://bugs.gnu.org/31999#187>.
691 #:phases (modify-phases %standard-phases
692 (add-before 'configure 'change-directory
694 (chdir (string-append ,version "/dmraid"))
695 (substitute* "make.tmpl.in"
696 (("/bin/sh") (which "sh")))
698 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
699 ;; find libdmraid.so.
700 (string-append "LDFLAGS=-Wl,-rpath="
701 (assoc-ref %outputs "out")
703 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
704 (synopsis "Device mapper RAID interface")
706 "This software supports RAID device discovery, RAID set activation, creation,
707 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
709 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
710 to create devices with respective mappings for the ATARAID sets discovered.")
711 (license license:gpl2+)))
713 (define-public libblockdev
719 (uri (string-append "https://github.com/storaged-project/"
720 "libblockdev/releases/download/"
721 version "-1/libblockdev-" version ".tar.gz"))
724 "15c7g2gbkahmy8c6677pvbvblan5h8jxcqqmn6nlvqwqynq2mkjm"))))
725 (build-system gnu-build-system)
727 `(("pkg-config" ,pkg-config)
728 ("python" ,python-wrapper)
729 ("util-linux" ,util-linux)))
731 `(("btrfs-progs" ,btrfs-progs)
732 ("cryptsetup" ,cryptsetup)
733 ("dosfstools" ,dosfstools)
737 ("gobject-introspection" ,gobject-introspection)
739 ("libbytesize" ,libbytesize)
746 ("volume-key" ,volume-key)
747 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
749 (home-page "https://github.com/storaged-project/libblockdev")
750 (synopsis "Library for manipulating block devices")
752 "libblockdev is a C library supporting GObject introspection for
753 manipulation of block devices. It has a plugin-based architecture where each
754 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
755 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
757 (license license:lgpl2.1+)))
759 (define-public rmlint
766 (url "https://github.com/sahib/rmlint")
767 (commit (string-append "v" version))))
768 (file-name (git-file-name name version))
771 "1b5cziam14h80xrfb285fmfrzz2rligxcpsq1xsig14xf4l2875i"))))
772 (build-system scons-build-system)
774 `(#:scons ,scons-python2
775 #:scons-flags (list (string-append "--prefix=" %output)
776 (string-append "--actual-prefix=" %output))
777 #:tests? #f ; No tests?
779 (modify-phases %standard-phases
780 (add-after 'unpack 'scons-propagate-environment
781 (lambda* (#:key inputs #:allow-other-keys)
782 ;; TODO: `rmlint --gui` fails with
783 ;; "Failed to load shredder: No module named 'shredder'".
784 ;; The GUI might also need extra dependencies, such as
785 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
786 (substitute* "lib/cmdline.c"
787 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
789 "const char *commands[] = {\""
790 (assoc-ref inputs "python") "/bin/python"
791 "\", \"python\", NULL};")))
792 ;; By design, SCons does not, by default, propagate
793 ;; environment variables to subprocesses. See:
794 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
795 ;; Here, we modify the SConstruct file to arrange for
796 ;; environment variables to be propagated.
797 (substitute* "SConstruct"
798 (("^env = Environment\\(.*\\)" all)
801 "\nenv['ENV']=os.environ"))))))))
803 `(("pkg-config" ,pkg-config)
804 ("glib:bin" ,glib "bin")
805 ("python-sphinx" ,python-sphinx)))
807 `(("python" ,python-wrapper)
810 ("elfutils" ,elfutils)
811 ("json-glib" ,json-glib)
812 ("libblkid" ,util-linux)))
813 (home-page "https://rmlint.rtfd.org")
814 (synopsis "Remove duplicates and other lint from the file system")
815 (description "@command{rmlint} finds space waste and other broken things
816 on your file system and offers to remove it. @command{rmlint} can find:
819 @item duplicate files and duplicate directories,
820 @item non-stripped binaries (i.e. binaries with debug symbols),
821 @item broken symbolic links,
822 @item empty files and directories,
823 @item files with broken user and/or group ID.
825 (license license:gpl3+)))