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 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 "lib")))
105 `(("gettext" ,gettext-minimal)
108 ("e2fsprogs" ,e2fsprogs)
111 ("util-linux" ,util-linux)))
112 (home-page "https://www.gnu.org/software/parted/")
113 (synopsis "Disk partition editor")
115 "GNU Parted is a package for creating and manipulating disk partition
116 tables. It includes a library and command-line utility.")
117 (license license:gpl3+)))
126 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
130 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
131 (build-system gnu-build-system)
133 `(("gettext" ,gettext-minimal)
135 ("util-linux" ,util-linux "lib")
137 ;; The build neglects to look for its own headers in its own tree. A next
138 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
141 (modify-phases %standard-phases
142 (add-after 'unpack 'skip-broken-header-probes
144 (substitute* "backend/configure"
145 (("gnufdisk-common.h .*") "\n"))
147 #:make-flags (list (string-append "CPPFLAGS="
148 " -I../common/include "
149 " -I../debug/include "
150 " -I../exception/include"))))
151 (home-page "https://www.gnu.org/software/fdisk/")
152 (synopsis "Low-level disk partitioning and formatting")
154 "GNU fdisk provides a GNU version of the common disk partitioning tool
155 fdisk. fdisk is used for the creation and manipulation of disk partition
156 tables, and it understands a variety of different formats.")
157 (license license:gpl3+)))
159 (define-public gptfdisk
166 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
167 version "/" name "-" version ".tar.gz"))
170 "13d7gff4prl1nsdknjigmb7bbqhn79165n01v4y9mwbnd0d3jqxn"))))
171 (build-system gnu-build-system)
173 `(("gettext" ,gettext-minimal)
176 ("util-linux" ,util-linux "lib"))) ;libuuid
178 `(#:test-target "test"
180 (modify-phases %standard-phases
181 ;; no configure script
185 (lambda* (#:key outputs #:allow-other-keys)
186 (let* ((out (assoc-ref outputs "out"))
187 (bin (string-append out "/bin"))
188 (man (string-append out "/share/man/man8")))
189 (install-file "gdisk" bin)
190 (install-file "sgdisk" bin)
191 (install-file "cgdisk" bin)
192 (install-file "fixparts" bin)
193 (install-file "cgdisk.8" man)
194 (install-file "fixparts.8" man)
195 (install-file "gdisk.8" man)
196 (install-file "sgdisk.8" man)))))))
197 (home-page "http://www.rodsbooks.com/gdisk/")
198 (synopsis "Low-level GPT disk partitioning and formatting")
199 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
200 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
201 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
203 (license license:gpl2)))
205 (define-public ddrescue
212 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
215 (base32 "11qh0bbzf00mfb4yq35gnv5m260k4d7q9ixklry6bqvhvvp3ypab"))))
216 (build-system gnu-build-system)
217 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
218 (synopsis "Data recovery utility")
219 (native-inputs `(("lzip" ,lzip)))
221 "GNU ddrescue is a fully automated data recovery tool. It copies data
222 from one file to another, working to rescue data in case of read errors. The
223 program also includes a tool for manipulating its log files, which are used
224 to recover data more efficiently by only reading the necessary blocks.")
225 (license license:gpl3+)))
227 (define-public dosfstools
234 (uri (string-append "https://github.com/" name "/" name
235 "/releases/download/v" version "/"
236 name "-" version ".tar.xz"))
239 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
240 (build-system gnu-build-system)
242 `(#:configure-flags (list "--enable-compat-symlinks")
243 #:make-flags (list (string-append "PREFIX=" %output)
246 `(("xxd" ,xxd))) ; for tests
247 (home-page "https://github.com/dosfstools/dosfstools")
248 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
250 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
251 which respectively make and check MS-DOS FAT file systems.")
252 (license license:gpl3+)))
254 (define dosfstools/static
256 (package (inherit dosfstools))))
258 (define-public fatfsck/static
260 (name "fatfsck-static")
261 (version (package-version dosfstools))
262 (build-system trivial-build-system)
265 `(#:modules ((guix build utils))
268 (use-modules (guix build utils))
269 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
272 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
274 (with-directory-excursion bin
275 (copy-file (string-append src "/" exe) exe)
276 (remove-store-references exe)
278 ;; Add fsck.vfat symlink to match the Linux driver name.
279 (symlink exe "fsck.vfat")
281 (inputs `(("dosfstools" ,dosfstools/static)))
282 (home-page (package-home-page dosfstools))
283 (synopsis "Statically linked fsck.fat from dosfstools")
284 (description "This package provides a statically-linked @command{fsck.fat}
285 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
286 (license (package-license dosfstools))))
288 (define-public sdparm
295 (uri (string-append "http://sg.danny.cz/sg/p/"
296 name "-" version ".tar.xz"))
299 "1jjq3lzgfy4r76rc26q02lv4wm5cb4dx5nh913h489zjrr4f3jbx"))))
300 (build-system gnu-build-system)
301 (home-page "http://sg.danny.cz/sg/sdparm.html")
302 (synopsis "Provide access to SCSI device parameters")
304 "Sdparm reads and modifies SCSI device parameters. These devices can be
305 SCSI disks, in which case the role of @command{sdparm} is similar to its
306 namesake: the @command{hdparm} utility originally designed for ATA disks.
307 However, @command{sdparm} can be used to access parameters on any device that
308 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
309 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
310 also send commands associated with starting and stopping the media, loading
311 and unloading removable media and some other housekeeping functions.")
312 (license license:bsd-3)))
314 (define-public idle3-tools
321 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
325 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
326 (build-system gnu-build-system)
328 `(#:tests? #f ;no test suite
330 (modify-phases %standard-phases
332 #:make-flags (list "CC=gcc"
333 (string-append "manprefix=")
334 (string-append "DESTDIR="
335 (assoc-ref %outputs "out")))))
336 (home-page "http://idle3-tools.sourceforge.net")
337 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
339 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
340 present in many Western Digital hard drives. This timer is part of the
341 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
342 the default timer setting is not well suited to Linux or other *nix systems,
343 and can dramatically shorten the lifespan of the drive if left unchecked.")
344 (license license:gpl3+)))
346 (define-public gparted
353 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
354 version "/gparted-" version ".tar.gz"))
357 "0mdvn85jvy72ff7nds3dakx9kzknh8gx1z8i0w2sf970q03qp2z4"))))
358 (build-system gnu-build-system)
360 ;; Tests require access to paths outside the build container, such
361 ;; as '/dev/disk/by-id'
364 `(("util-linux" ,util-linux "lib")
369 ("yelp-tools" ,yelp-tools)))
371 `(("intltool" ,intltool)
373 ("lvm2" ,lvm2) ; for tests
374 ("pkg-config" ,pkg-config)))
375 (home-page "https://gparted.org/")
376 (synopsis "Partition editor to graphically manage disk partitions")
377 (description "GParted is a GNOME partition editor for creating,
378 reorganizing, and deleting disk partitions. It uses libparted from the parted
379 project to detect and manipulate partition tables. Optional file system tools
380 permit managing file systems not included in libparted.")
381 ;; The home page says GPLv2, but the source code says GPLv2+.
382 (license license:gpl2+)))
391 (uri (pypi-uri "pydf" version))
394 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
395 (build-system python-build-system)
396 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
397 (synopsis "Colourised @command{df} clone")
398 (description "All-singing, all-dancing, fully colourised @command{df} clone
399 written in Python. It displays the amount of disk space available on the
400 mounted file systems, using different colours for different types of file
401 systems. Output format is completely customizable.")
402 (license license:public-domain)))
412 (url "https://github.com/AltraMayor/f3.git")
413 (commit (string-append "v" version))))
414 (file-name (git-file-name name version))
416 (base32 "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy"))))
417 (build-system gnu-build-system)
419 '(#:tests? #f ; no check target
420 #:make-flags (list "CC=gcc"
421 (string-append "PREFIX=" %output))
423 (modify-phases %standard-phases
424 (delete 'configure) ; no configure script
425 (add-after 'build 'build-extra
426 (lambda* (#:key make-flags #:allow-other-keys)
427 (apply invoke "make" "extra" make-flags)))
428 (add-after 'build 'install-extra
429 (lambda* (#:key make-flags #:allow-other-keys)
430 (apply invoke "make" "install-extra" make-flags))))))
434 (home-page "http://oss.digirati.com.br/f3/")
435 (synopsis "Test real capacity of flash memory cards and such.")
436 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
437 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
438 the card and then checks if can read it. It will assure you haven't been sold
439 a card with a smaller capacity than stated.")
440 (license license:gpl3+)))
442 (define-public python-parted
444 (name "python-parted")
450 (url "https://github.com/dcantrell/pyparted.git")
451 (commit (string-append "v" version))))
452 (file-name (git-file-name name version))
454 (base32 "0r6916n3w4vldxrq30a3z2iagvxgly4vfmlidjm65vwqnyv17bvn"))))
455 (build-system python-build-system)
458 (modify-phases %standard-phases
460 (add-after 'install 'check
461 (lambda* (#:key outputs inputs #:allow-other-keys)
462 (add-installed-pythonpath inputs outputs)
463 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
464 (substitute* "tests/test__ped_ped.py"
465 (("\"/tmp/temp-device-\"") "self.path"))
466 (invoke "python" "-m" "unittest" "discover" "-v")
469 `(("e2fsprogs" ,e2fsprogs)
470 ("pkg-config" ,pkg-config)))
472 `(("python-six" ,python-six)))
474 `(("parted" ,parted)))
475 (home-page "https://github.com/dcantrell/pyparted")
476 (synopsis "Parted bindings for Python")
477 (description "This package provides @code{parted} bindings for Python.")
478 (license license:gpl2+)))
480 (define-public python2-parted
481 (package-with-python2 python-parted))
483 (define-public duperemove
491 (url "https://github.com/markfasheh/duperemove.git")
492 (commit (string-append "v" version))))
494 (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z"))
495 (file-name (git-file-name name version))))
496 (build-system gnu-build-system)
498 `(("pkg-config" ,pkg-config)))
503 `(#:tests? #f ; no test suite
505 (modify-phases %standard-phases
506 (delete 'configure)) ; no configure script
507 #:make-flags (list (string-append "PREFIX=" %output)
509 (home-page "https://github.com/markfasheh/duperemove")
510 (synopsis "Tools for de-duplicating file system data")
511 (description "Duperemove is a simple tool for finding duplicated extents
512 and submitting them for deduplication. When given a list of files it will
513 hash their contents on a block by block basis and compare those hashes to each
514 other, finding and categorizing blocks that match each other. When given the
515 @option{-d} option, duperemove will submit those extents for deduplication
516 using the Linux kernel extent-same @code{ioctl}.
518 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
519 existing hash file, duperemove will only compute hashes for those files which
520 have changed since the last run. Thus you can run duperemove repeatedly on
521 your data as it changes, without having to re-checksum unchanged data.
523 Duperemove can also take input from the @command{fdupes} program.")
524 (license license:gpl2)))
526 (define-public ranger
532 (uri (string-append "https://ranger.github.io/"
533 "ranger-" version ".tar.gz"))
536 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
537 (build-system python-build-system)
544 ("python-pytest" ,python-pytest)))
546 '( ;; The 'test' target runs developer tools like pylint, which fail.
547 #:test-target "test_pytest"
549 (modify-phases %standard-phases
550 (add-after 'configure 'wrap-program
551 ;; Tell 'ranger' where 'w3mimgdisplay' is.
552 (lambda* (#:key inputs outputs #:allow-other-keys)
553 (let* ((out (assoc-ref outputs "out"))
554 (ranger (string-append out "/bin/ranger"))
555 (w3m (assoc-ref inputs "w3m"))
556 (w3mimgdisplay (string-append w3m
557 "/libexec/w3m/w3mimgdisplay")))
559 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
562 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
563 (lambda* (#:key test-target #:allow-other-keys)
564 (invoke "make" test-target))))))
565 (home-page "https://ranger.github.io/")
566 (synopsis "Console file manager")
567 (description "ranger is a console file manager with Vi key bindings. It
568 provides a minimalistic and nice curses interface with a view on the directory
569 hierarchy. It ships with @code{rifle}, a file launcher that is good at
570 automatically finding out which program to use for what file type.")
571 (license license:gpl3)))
573 (define-public volume-key
579 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
583 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
584 (build-system gnu-build-system)
586 `(("pkg-config" ,pkg-config)
588 ("python" ,python-3))) ; used to generate the Python bindings
590 `(("cryptsetup" ,cryptsetup)
592 ("libblkid" ,util-linux "lib")
593 ("lvm2" ,lvm2) ; for "-ldevmapper"
597 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
599 (modify-phases %standard-phases
600 (add-before 'configure 'patch-python.h-path
601 (lambda* (#:key inputs #:allow-other-keys)
602 (let ((python (assoc-ref inputs "python")))
603 (substitute* "Makefile.in"
604 (("/usr/include/python") (string-append python "/include/python")))
606 (home-page "https://pagure.io/volume_key")
607 (synopsis "Manipulate storage volume encryption keys")
609 "This package provides a library for manipulating storage volume
610 encryption keys and storing them separately from volumes to handle forgotten
612 (license license:gpl2)))
621 (url "https://github.com/pmem/ndctl.git")
622 (commit (string-append "v" version))))
623 (file-name (git-file-name name version))
626 "076jgw1g2aafqgnq705in0wnabysqk46dq5yxdv1qzgjmyhka39n"))))
627 (build-system gnu-build-system)
629 `(("asciidoc" ,asciidoc)
630 ("automake" ,automake)
631 ("autoconf" ,autoconf)
632 ("bash-completion" ,bash-completion)
633 ("docbook-xsl" ,docbook-xsl)
636 ("pkg-config" ,pkg-config)
638 ;; Required for offline docbook generation.
643 ("keyutils" ,keyutils)
645 ("util-linux" ,util-linux "lib")))
648 (list "--disable-asciidoctor" ; use docbook-xsl instead
651 (modify-phases %standard-phases
652 (add-after 'unpack 'patch-FHS-file-names
654 (substitute* "git-version-gen"
655 (("/bin/sh") (which "sh")))
656 (substitute* "git-version"
657 (("/bin/bash") (which "bash")))
660 (let ((out (assoc-ref %outputs "out")))
661 (list (string-append "BASH_COMPLETION_DIR=" out
662 "/share/bash-completion/completions")))))
663 (home-page "https://github.com/pmem/ndctl")
664 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
666 "This package provides a utility library for managing the
667 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
668 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
669 ;; the effective license. Note that some files under ccan/ are
670 ;; covered by BSD-3 or public domain, see the individual folders.
671 (license license:gpl2)))
673 (define-public dmraid
676 (version "1.0.0.rc16-3")
679 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
683 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
684 (build-system gnu-build-system)
685 (inputs `(("lvm2" ,lvm2)))
686 (native-inputs `(("which" ,which)))
688 `(#:tests? #f ; No tests.
689 ;; Prevent a race condition where some target would attempt to link
690 ;; libdmraid.so before it had been built as reported in
691 ;; <https://bugs.gnu.org/31999#187>.
693 #:phases (modify-phases %standard-phases
694 (add-before 'configure 'change-directory
696 (chdir (string-append ,version "/dmraid"))
697 (substitute* "make.tmpl.in"
698 (("/bin/sh") (which "sh")))
700 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
701 ;; find libdmraid.so.
702 (string-append "LDFLAGS=-Wl,-rpath="
703 (assoc-ref %outputs "out")
705 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
706 (synopsis "Device mapper RAID interface")
708 "This software supports RAID device discovery, RAID set activation, creation,
709 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
711 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
712 to create devices with respective mappings for the ATARAID sets discovered.")
713 (license license:gpl2+)))
715 (define-public libblockdev
721 (uri (string-append "https://github.com/storaged-project/"
722 "libblockdev/releases/download/"
723 version "-1/libblockdev-" version ".tar.gz"))
726 "15c7g2gbkahmy8c6677pvbvblan5h8jxcqqmn6nlvqwqynq2mkjm"))))
727 (build-system gnu-build-system)
729 `(("pkg-config" ,pkg-config)
730 ("python" ,python-wrapper)
731 ("util-linux" ,util-linux)))
733 `(("btrfs-progs" ,btrfs-progs)
734 ("cryptsetup" ,cryptsetup)
735 ("dosfstools" ,dosfstools)
739 ("gobject-introspection" ,gobject-introspection)
741 ("libbytesize" ,libbytesize)
748 ("volume-key" ,volume-key)
749 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
751 (home-page "https://github.com/storaged-project/libblockdev")
752 (synopsis "Library for manipulating block devices")
754 "libblockdev is a C library supporting GObject introspection for
755 manipulation of block devices. It has a plugin-based architecture where each
756 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
757 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
759 (license license:lgpl2.1+)))
761 (define-public rmlint
768 (url "https://github.com/sahib/rmlint")
769 (commit (string-append "v" version))))
770 (file-name (git-file-name name version))
773 "1b5cziam14h80xrfb285fmfrzz2rligxcpsq1xsig14xf4l2875i"))))
774 (build-system scons-build-system)
776 `(#:scons ,scons-python2
777 #:scons-flags (list (string-append "--prefix=" %output)
778 (string-append "--actual-prefix=" %output))
779 #:tests? #f ; No tests?
781 (modify-phases %standard-phases
782 (add-after 'unpack 'scons-propagate-environment
783 (lambda* (#:key inputs #:allow-other-keys)
784 ;; TODO: `rmlint --gui` fails with
785 ;; "Failed to load shredder: No module named 'shredder'".
786 ;; The GUI might also need extra dependencies, such as
787 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
788 (substitute* "lib/cmdline.c"
789 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
791 "const char *commands[] = {\""
792 (assoc-ref inputs "python") "/bin/python"
793 "\", \"python\", NULL};")))
794 ;; By design, SCons does not, by default, propagate
795 ;; environment variables to subprocesses. See:
796 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
797 ;; Here, we modify the SConstruct file to arrange for
798 ;; environment variables to be propagated.
799 (substitute* "SConstruct"
800 (("^env = Environment\\(.*\\)" all)
803 "\nenv['ENV']=os.environ"))))))))
805 `(("pkg-config" ,pkg-config)
806 ("glib:bin" ,glib "bin")
807 ("python-sphinx" ,python-sphinx)))
809 `(("python" ,python-wrapper)
812 ("elfutils" ,elfutils)
813 ("json-glib" ,json-glib)
814 ("libblkid" ,util-linux "lib")))
815 (home-page "https://rmlint.rtfd.org")
816 (synopsis "Remove duplicates and other lint from the file system")
817 (description "@command{rmlint} finds space waste and other broken things
818 on your file system and offers to remove it. @command{rmlint} can find:
821 @item duplicate files and duplicate directories,
822 @item non-stripped binaries (i.e. binaries with debug symbols),
823 @item broken symbolic links,
824 @item empty files and directories,
825 @item files with broken user and/or group ID.
827 (license license:gpl3+)))