gnu: gparted: Update to 0.32.0.
[jackhill/guix/guix.git] / gnu / packages / disk.scm
CommitLineData
e04f30e0 1;;; GNU Guix --- Functional package management for GNU
cc4a2aeb 2;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
1b933e62 3;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org>
dd4a8620 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
8023f0fd 5;;; Copyright © 2016, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
ce16d1dc 6;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
abba1d08 7;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
c20e552b 8;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
5f0f3686 9;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
49393691 10;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
893f9d24 11;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
d232e02e 12;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
834b0b9a 13;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
19b662ea 14;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
4715f92e 15;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
e04f30e0
NK
16;;;
17;;; This file is part of GNU Guix.
18;;;
19;;; GNU Guix is free software; you can redistribute it and/or modify it
20;;; under the terms of the GNU General Public License as published by
21;;; the Free Software Foundation; either version 3 of the License, or (at
22;;; your option) any later version.
23;;;
24;;; GNU Guix is distributed in the hope that it will be useful, but
25;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27;;; GNU General Public License for more details.
28;;;
29;;; You should have received a copy of the GNU General Public License
30;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
cc4a2aeb 32(define-module (gnu packages disk)
fd297f4a 33 #:use-module ((guix licenses) #:prefix license:)
e04f30e0
NK
34 #:use-module (guix packages)
35 #:use-module (guix download)
f7a4f7c0 36 #:use-module (guix git-download)
e04f30e0 37 #:use-module (guix build-system gnu)
51ad11ad 38 #:use-module (guix build-system trivial)
893f9d24 39 #:use-module (guix build-system python)
abba1d08 40 #:use-module (gnu packages)
c20e552b 41 #:use-module (gnu packages base)
834b0b9a 42 #:use-module (gnu packages check)
d232e02e 43 #:use-module (gnu packages databases)
c20e552b 44 #:use-module (gnu packages docbook)
1dba6407 45 #:use-module (gnu packages gettext)
c20e552b
RJ
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages gnome)
e04f30e0 49 #:use-module (gnu packages linux)
abba1d08 50 #:use-module (gnu packages ncurses)
1b933e62 51 #:use-module (gnu packages perl)
c20e552b 52 #:use-module (gnu packages pkg-config)
abba1d08 53 #:use-module (gnu packages popt)
1b933e62 54 #:use-module (gnu packages python)
cc4a2aeb
LC
55 #:use-module (gnu packages readline)
56 #:use-module (gnu packages guile)
c20e552b 57 #:use-module (gnu packages compression)
5f0f3686 58 #:use-module (gnu packages vim)
19b662ea 59 #:use-module (gnu packages w3m)
dedc0d0b
PN
60 #:use-module (gnu packages xml)
61 #:use-module (gnu packages cryptsetup)
62 #:use-module (gnu packages gnuzilla)
63 #:use-module (gnu packages gnupg)
f7a4f7c0
PN
64 #:use-module (gnu packages swig)
65 #:use-module (gnu packages autotools)
66 #:use-module (gnu packages web)
67 #:use-module (gnu packages documentation)
fac91b39
PN
68 #:use-module (gnu packages bash)
69 #:use-module (gnu packages c))
e04f30e0
NK
70
71(define-public parted
72 (package
73 (name "parted")
1b933e62
ML
74 (version "3.2")
75 (source (origin
76 (method url-fetch)
77 (uri (string-append "mirror://gnu/parted/parted-"
78 version ".tar.xz"))
79 (sha256
80 (base32
81 "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"))))
e04f30e0 82 (build-system gnu-build-system)
1b933e62
ML
83 (arguments
84 `(#:phases
85 (modify-phases %standard-phases
86 (add-after
87 'unpack 'fix-locales-and-python
88 (lambda* (#:key inputs #:allow-other-keys)
89 (substitute* "tests/t0251-gpt-unicode.sh"
90 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
91 (substitute* "tests/msdos-overlap"
92 (("/usr/bin/python") (which "python"))))))))
e04f30e0 93 (inputs
1b933e62
ML
94 `(("lvm2" ,lvm2)
95 ("readline" ,readline)
e04f30e0 96 ("util-linux" ,util-linux)))
c4c4cc05 97 (native-inputs
b94a6ca0 98 `(("gettext" ,gettext-minimal)
1b933e62
ML
99 ;; For the tests.
100 ("perl" ,perl)
101 ("python" ,python-2)))
102 (home-page "https://www.gnu.org/software/parted/")
f50d2669 103 (synopsis "Disk partition editor")
e04f30e0 104 (description
79c311b8
LC
105 "GNU Parted is a package for creating and manipulating disk partition
106tables. It includes a library and command-line utility.")
fd297f4a 107 (license license:gpl3+)))
cc4a2aeb
LC
108
109(define-public fdisk
110 (package
111 (name "fdisk")
ae03ee42 112 (version "2.0.0a1")
cc4a2aeb
LC
113 (source
114 (origin
115 (method url-fetch)
116 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
117 version ".tar.gz"))
118 (sha256
119 (base32
ae03ee42 120 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
cc4a2aeb
LC
121 (build-system gnu-build-system)
122 (inputs
b94a6ca0 123 `(("gettext" ,gettext-minimal)
cc4a2aeb
LC
124 ("guile" ,guile-1.8)
125 ("util-linux" ,util-linux)
126 ("parted" ,parted)))
ae03ee42
TGR
127 ;; The build neglects to look for its own headers in its own tree. A next
128 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
129 (arguments
130 `(#:phases
131 (modify-phases %standard-phases
132 (add-after 'unpack 'skip-broken-header-probes
133 (lambda _
134 (substitute* "backend/configure"
135 (("gnufdisk-common.h .*") "\n"))
136 #t)))
137 #:make-flags (list (string-append "CPPFLAGS="
138 " -I../common/include "
139 " -I../debug/include "
140 " -I../exception/include"))))
cc4a2aeb
LC
141 (home-page "https://www.gnu.org/software/fdisk/")
142 (synopsis "Low-level disk partitioning and formatting")
143 (description
144 "GNU fdisk provides a GNU version of the common disk partitioning tool
145fdisk. fdisk is used for the creation and manipulation of disk partition
146tables, and it understands a variety of different formats.")
fd297f4a 147 (license license:gpl3+)))
cc4a2aeb 148
abba1d08
JN
149(define-public gptfdisk
150 (package
151 (name "gptfdisk")
871d8199 152 (version "1.0.4")
abba1d08
JN
153 (source
154 (origin
155 (method url-fetch)
156 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
157 version "/" name "-" version ".tar.gz"))
158 (sha256
159 (base32
871d8199 160 "13d7gff4prl1nsdknjigmb7bbqhn79165n01v4y9mwbnd0d3jqxn"))))
abba1d08
JN
161 (build-system gnu-build-system)
162 (inputs
b94a6ca0 163 `(("gettext" ,gettext-minimal)
abba1d08
JN
164 ("ncurses" ,ncurses)
165 ("popt" ,popt)
166 ("util-linux" ,util-linux))) ; libuuid
167 (arguments
168 `(#:test-target "test"
169 #:phases
170 (modify-phases %standard-phases
171 ;; no configure script
172 (delete 'configure)
173 ;; no install target
174 (replace 'install
175 (lambda* (#:key outputs #:allow-other-keys)
6fb9e069
LF
176 (let* ((out (assoc-ref outputs "out"))
177 (bin (string-append out "/bin"))
178 (man (string-append out "/share/man/man8")))
abba1d08
JN
179 (install-file "gdisk" bin)
180 (install-file "sgdisk" bin)
181 (install-file "cgdisk" bin)
6fb9e069
LF
182 (install-file "fixparts" bin)
183 (install-file "cgdisk.8" man)
184 (install-file "fixparts.8" man)
185 (install-file "gdisk.8" man)
186 (install-file "sgdisk.8" man)))))))
abba1d08
JN
187 (home-page "http://www.rodsbooks.com/gdisk/")
188 (synopsis "Low-level GPT disk partitioning and formatting")
189 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
73fe4552
TGR
190works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
191disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
192scheme.")
fd297f4a 193 (license license:gpl2)))
abba1d08 194
cc4a2aeb
LC
195(define-public ddrescue
196 (package
197 (name "ddrescue")
5f3155ee 198 (version "1.23")
cc4a2aeb
LC
199 (source
200 (origin
201 (method url-fetch)
202 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
203 version ".tar.lz"))
204 (sha256
205 (base32
5f3155ee 206 "13cd6c0x91zq10vdlyl6r5rib47bmsn5sshmkin3igwj8pa2vbm9"))))
cc4a2aeb 207 (build-system gnu-build-system)
416c57f0 208 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
cc4a2aeb
LC
209 (synopsis "Data recovery utility")
210 (native-inputs `(("lzip" ,lzip)))
211 (description
212 "GNU ddrescue is a fully automated data recovery tool. It copies data
213from one file to another, working to rescue data in case of read errors. The
214program also includes a tool for manipulating its log files, which are used
215to recover data more efficiently by only reading the necessary blocks.")
fd297f4a 216 (license license:gpl3+)))
dd4a8620
MW
217
218(define-public dosfstools
219 (package
220 (name "dosfstools")
5f0f3686 221 (version "4.1")
dd4a8620
MW
222 (source
223 (origin
224 (method url-fetch)
225 (uri (string-append "https://github.com/" name "/" name
226 "/releases/download/v" version "/"
227 name "-" version ".tar.xz"))
228 (sha256
229 (base32
5f0f3686 230 "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
dd4a8620
MW
231 (build-system gnu-build-system)
232 (arguments
233 `(#:make-flags (list (string-append "PREFIX=" %output)
5f0f3686
MB
234 "CC=gcc")))
235 (native-inputs
9fc513ad 236 `(("xxd" ,xxd))) ; for tests
dd4a8620 237 (home-page "https://github.com/dosfstools/dosfstools")
8f65585b 238 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
dd4a8620
MW
239 (description
240 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
8f65585b 241which respectively make and check MS-DOS FAT file systems.")
fd297f4a 242 (license license:gpl3+)))
0f860464 243
51ad11ad
MB
244(define dosfstools/static
245 (static-package
246 (package (inherit dosfstools))))
247
248(define-public fatfsck/static
249 (package
250 (name "fatfsck-static")
251 (version (package-version dosfstools))
252 (build-system trivial-build-system)
253 (source #f)
254 (arguments
255 `(#:modules ((guix build utils))
256 #:builder
257 (begin
258 (use-modules (guix build utils))
259 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
260 "/sbin"))
261 (exe "fsck.fat")
262 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
263 (mkdir-p bin)
264 (with-directory-excursion bin
265 (copy-file (string-append src "/" exe) exe)
266 (remove-store-references exe)
267 (chmod exe #o555)
268 ;; Add fsck.vfat symlink to match the Linux driver name.
269 (symlink exe "fsck.vfat")
270 #t)))))
271 (inputs `(("dosfstools" ,dosfstools/static)))
272 (home-page (package-home-page dosfstools))
273 (synopsis "Statically linked fsck.fat from dosfstools")
274 (description "This package provides a statically-linked @command{fsck.fat}
275and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
276 (license (package-license dosfstools))))
277
0f860464
TGR
278(define-public sdparm
279 (package
280 (name "sdparm")
aa588d8a 281 (version "1.10")
0f860464
TGR
282 (source
283 (origin
284 (method url-fetch)
285 (uri (string-append "http://sg.danny.cz/sg/p/"
286 name "-" version ".tar.xz"))
287 (sha256
288 (base32
aa588d8a 289 "1jjq3lzgfy4r76rc26q02lv4wm5cb4dx5nh913h489zjrr4f3jbx"))))
0f860464
TGR
290 (build-system gnu-build-system)
291 (home-page "http://sg.danny.cz/sg/sdparm.html")
292 (synopsis "Provide access to SCSI device parameters")
293 (description
294 "Sdparm reads and modifies SCSI device parameters. These devices can be
295SCSI disks, in which case the role of @command{sdparm} is similar to its
296namesake: the @command{hdparm} utility originally designed for ATA disks.
297However, @command{sdparm} can be used to access parameters on any device that
298uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
299transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
300also send commands associated with starting and stopping the media, loading
301and unloading removable media and some other housekeeping functions.")
fd297f4a 302 (license license:bsd-3)))
8e14e059
TGR
303
304(define-public idle3-tools
305 (package
306 (name "idle3-tools")
307 (version "0.9.1")
308 (source
309 (origin
310 (method url-fetch)
311 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
312 version ".tgz"))
313 (sha256
314 (base32
315 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
316 (build-system gnu-build-system)
317 (arguments
318 `(#:tests? #f ;no test suite
319 #:phases
320 (modify-phases %standard-phases
321 (delete 'configure))
322 #:make-flags (list "CC=gcc"
323 (string-append "manprefix=")
324 (string-append "DESTDIR="
325 (assoc-ref %outputs "out")))))
326 (home-page "http://idle3-tools.sourceforge.net")
327 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
328 (description
329 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
330present in many Western Digital hard drives. This timer is part of the
331\"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
332the default timer setting is not well suited to Linux or other *nix systems,
333and can dramatically shorten the lifespan of the drive if left unchecked.")
fd297f4a 334 (license license:gpl3+)))
c20e552b
RJ
335
336(define-public gparted
337 (package
338 (name "gparted")
1f0f9514 339 (version "0.32.0")
c20e552b
RJ
340 (source
341 (origin
342 (method url-fetch)
343 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
344 version "/gparted-" version ".tar.gz"))
345 (sha256
1f0f9514 346 (base32 "1fjp4c8jc0kjbbih1x1vs9v40d9lncma642kflnmy0bixxnvh7df"))))
c20e552b
RJ
347 (build-system gnu-build-system)
348 (arguments
8023f0fd 349 `(#:tests? #f ; tests require a network connection
c20e552b
RJ
350 #:configure-flags '("--disable-scrollkeeper")))
351 (inputs
352 `(("util-linux" ,util-linux)
353 ("parted" ,parted)
354 ("glib" ,glib)
355 ("gtkmm" ,gtkmm-2)
356 ("libxml2" ,libxml2)
357 ("libxslt" ,libxslt)
358 ("gnome-doc-utils" ,gnome-doc-utils)
359 ("docbook-xml" ,docbook-xml-4.2)
360 ("python" ,python-2)
361 ("python-libxml2" ,python2-libxml2)
362 ("which" ,which)))
363 (native-inputs
364 `(("intltool" ,intltool)
365 ("pkg-config" ,pkg-config)))
d5909be9 366 (home-page "https://gparted.org/")
c20e552b
RJ
367 (synopsis "Partition editor to graphically manage disk partitions")
368 (description "GParted is a GNOME partition editor for creating,
369reorganizing, and deleting disk partitions. It uses libparted from the parted
370project to detect and manipulate partition tables. Optional file system tools
371permit managing file systems not included in libparted.")
372 ;; The home page says GPLv2, but the source code says GPLv2+.
373 (license license:gpl2+)))
49393691 374
893f9d24
SR
375(define-public pydf
376 (package
377 (name "pydf")
378 (version "12")
379 (source
380 (origin
381 (method url-fetch)
382 (uri (pypi-uri "pydf" version))
383 (sha256
384 (base32
385 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
386 (build-system python-build-system)
387 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
388 (synopsis "Colourised @command{df} clone")
389 (description "All-singing, all-dancing, fully colourised @command{df} clone
390written in Python. It displays the amount of disk space available on the
162a1374 391mounted file systems, using different colours for different types of file
893f9d24
SR
392systems. Output format is completely customizable.")
393 (license license:public-domain)))
49393691
HG
394
395(define-public f3
396 (package
397 (name "f3")
af514ead 398 (version "7.1")
49393691
HG
399 (source
400 (origin
b3307bfd
TGR
401 (method git-fetch)
402 (uri (git-reference
403 (url "https://github.com/AltraMayor/f3.git")
404 (commit (string-append "v" version))))
405 (file-name (git-file-name name version))
49393691
HG
406 (sha256
407 (base32
af514ead 408 "0zglsmz683jg7f9wc6vmgljyg9w87pbnjw5x4w6x02w8233zvjqf"))))
49393691
HG
409 (build-system gnu-build-system)
410 (arguments
af514ead 411 '(#:tests? #f ; no check target
49393691
HG
412 #:make-flags (list "CC=gcc"
413 (string-append "PREFIX=" %output))
414 #:phases
415 (modify-phases %standard-phases
af514ead
TGR
416 (delete 'configure) ; no configure script
417 (add-after 'build 'build-extra
418 (lambda* (#:key make-flags #:allow-other-keys)
419 (apply invoke "make" "extra" make-flags)))
420 (add-after 'build 'install-extra
421 (lambda* (#:key make-flags #:allow-other-keys)
422 (apply invoke "make" "install-extra" make-flags))))))
49393691
HG
423 (inputs
424 `(("eudev" ,eudev)
425 ("parted" ,parted)))
426 (home-page "http://oss.digirati.com.br/f3/")
427 (synopsis "Test real capacity of flash memory cards and such.")
428 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
429capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
430the card and then checks if can read it. It will assure you haven't been sold
431a card with a smaller capacity than stated.")
432 (license license:gpl3+)))
9b36e3bf
DM
433
434(define-public python-parted
435 (package
436 (name "python-parted")
437 (version "3.11.1")
438 (source
439 (origin
440 (method url-fetch)
441 (uri (string-append "https://github.com/dcantrell/pyparted/archive/v"
442 version ".tar.gz"))
443 (sha256
444 (base32
445 "0r1nyjj40nacnfnv17x2mnsj6ga1qplyxyza82v2809dfhim2fwq"))))
446 (build-system python-build-system)
447 (arguments
448 `(#:phases
449 (modify-phases %standard-phases
450 (delete 'check)
451 (add-after 'install 'check
452 (lambda* (#:key outputs inputs #:allow-other-keys)
453 (add-installed-pythonpath inputs outputs)
454 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
455 (substitute* "tests/test__ped_ped.py"
456 (("\"/tmp/temp-device-\"") "self.path"))
457 (invoke "python" "-m" "unittest" "discover" "-v")
458 #t)))))
459 (native-inputs
460 `(("e2fsprogs" ,e2fsprogs)
461 ("pkg-config" ,pkg-config)))
462 (propagated-inputs
463 `(("python-six" ,python-six)))
464 (inputs
465 `(("parted" ,parted)))
466 (home-page "https://github.com/dcantrell/pyparted")
467 (synopsis "Parted bindings for Python")
468 (description "This package provides @code{parted} bindings for Python.")
469 (license license:gpl2+)))
470
471(define-public python2-parted
472 (package-with-python2 python-parted))
d232e02e
VD
473
474(define-public duperemove
475 (package
476 (name "duperemove")
51c4fb00 477 (version "0.11")
d232e02e
VD
478 (source (origin
479 (method url-fetch)
480 (uri (string-append
51c4fb00 481 "https://github.com/markfasheh/duperemove/archive/v"
d232e02e
VD
482 version ".tar.gz"))
483 (sha256
484 (base32
51c4fb00 485 "0rjmmh42yqw9a5j6sp31cqwxk3s97dsi4xz0wpxpllj7bsp3aiw5"))
d232e02e
VD
486 (file-name (string-append name "-" version ".tar.gz"))))
487 (build-system gnu-build-system)
488 (native-inputs
489 `(("pkg-config" ,pkg-config)))
490 (inputs
491 `(("glib" ,glib)
492 ("sqlite" ,sqlite)))
493 (arguments
51c4fb00 494 `(#:tests? #f ; no test suite
d232e02e
VD
495 #:phases
496 (modify-phases %standard-phases
51c4fb00 497 (delete 'configure)) ; no configure script
d232e02e
VD
498 #:make-flags (list (string-append "PREFIX=" %output)
499 "CC=gcc")))
500 (home-page "https://github.com/markfasheh/duperemove")
501 (synopsis "Tools for de-duplicating file system data")
502 (description "Duperemove is a simple tool for finding duplicated extents
503and submitting them for deduplication. When given a list of files it will
504hash their contents on a block by block basis and compare those hashes to each
505other, finding and categorizing blocks that match each other. When given the
506@option{-d} option, duperemove will submit those extents for deduplication
507using the Linux kernel extent-same @code{ioctl}.
508
509Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
510existing hash file, duperemove will only compute hashes for those files which
511have changed since the last run. Thus you can run duperemove repeatedly on
512your data as it changes, without having to re-checksum unchanged data.
513
514Duperemove can also take input from the @command{fdupes} program.")
515 (license license:gpl2)))
834b0b9a
EB
516
517(define-public ranger
518 (package
519 (name "ranger")
520 (version "1.9.1")
521 (source (origin
522 (method url-fetch)
523 (uri (string-append "https://ranger.github.io/"
524 "ranger-" version ".tar.gz"))
525 (sha256
526 (base32
527 "1lnzkrxcnlwnyi3z0v8ybyp8d5rm26qm35rr68kbs2lbs06inha0"))))
528 (build-system python-build-system)
19b662ea
RH
529 (inputs
530 `(("w3m" ,w3m)))
834b0b9a
EB
531 (native-inputs ;for tests
532 `(("python-pytest" ,python-pytest)
533 ("python-pylint" ,python-pylint)
534 ("python-flake8" ,python-flake8)
535 ("which" ,which)))
19b662ea
RH
536 (arguments
537 '(#:test-target "test"
538 #:phases
539 (modify-phases %standard-phases
540 (add-after 'configure 'wrap-program
541 ;; Tell 'ranger' where 'w3mimgdisplay' is.
542 (lambda* (#:key inputs outputs #:allow-other-keys)
543 (let* ((out (assoc-ref outputs "out"))
544 (ranger (string-append out "/bin/ranger"))
545 (w3m (assoc-ref inputs "w3m"))
546 (w3mimgdisplay (string-append w3m
547 "/libexec/w3m/w3mimgdisplay")))
548 (wrap-program ranger
549 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
550 #t))))))
834b0b9a
EB
551 (home-page "https://ranger.github.io/")
552 (synopsis "Console file manager")
adfc742c
EB
553 (description "ranger is a console file manager with Vi key bindings. It
554provides a minimalistic and nice curses interface with a view on the directory
555hierarchy. It ships with @code{rifle}, a file launcher that is good at
556automatically finding out which program to use for what file type.")
834b0b9a 557 (license license:gpl3)))
dedc0d0b
PN
558
559(define-public volume-key
560 (package
561 (name "volume-key")
562 (version "0.3.11")
563 (source (origin
564 (method url-fetch)
565 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
566 version ".tar.xz"))
567 (sha256
568 (base32
569 "0vaz15rcgdkh5z4yxc22x76wi44gh50jxnrqz5avaxz4bb17kcp6"))))
570 (build-system gnu-build-system)
571 (native-inputs
572 `(("pkg-config" ,pkg-config)
573 ("util-linux" ,util-linux)
574 ("swig" ,swig)
575 ("python" ,python-3))) ; Used to generate the Python bindings.
576 (inputs
577 `(("cryptsetup" ,cryptsetup)
578 ("nss" ,nss)
579 ("lvm2" ,lvm2) ; For "-ldevmapper".
580 ("glib" ,glib)
581 ("gpgme" ,gpgme)))
582 (arguments
583 `(#:tests? #f ; Not sure how tests are supposed to pass, even when run manually.
584 #:phases
585 (modify-phases %standard-phases
586 (add-before 'configure 'patch-python.h-path
587 (lambda* (#:key inputs #:allow-other-keys)
588 (let ((python (assoc-ref inputs "python")))
589 (substitute* "Makefile.in"
590 (("/usr/include/python") (string-append python "/include/python")))
591 #t))))))
592 (home-page "https://pagure.io/volume_key")
593 (synopsis "Manipulate storage volume encryption keys")
594 (description
595 "This package provides a library for manipulating storage volume
596encryption keys and storing them separately from volumes to handle forgotten
597passphrases.")
598 (license license:gpl2)))
f7a4f7c0
PN
599
600(define-public ndctl
601 (package
602 (name "ndctl")
603 (version "61.2")
604 (source (origin
605 (method git-fetch)
606 (uri (git-reference
607 (url "https://github.com/pmem/ndctl")
608 (commit (string-append "v" version))))
609 (file-name (string-append name "-" version "-checkout"))
610 (sha256
611 (base32
612 "0vid78jzhmzh505bpwn8mvlamfhcvl6rlfjc29y4yn7zslpydxl7"))))
613 (build-system gnu-build-system)
614 (native-inputs
615 `(("asciidoc" ,asciidoc)
616 ("automake" ,automake)
617 ("autoconf" ,autoconf)
618 ("docbook-xsl" ,docbook-xsl)
619 ("libtool" ,libtool)
620 ("libxml2" ,libxml2)
621 ("pkg-config" ,pkg-config)
622 ("xmlto" ,xmlto)
623 ;; Required for offline docbook generation:
624 ("which" ,which)))
625 (inputs
626 `(("eudev" ,eudev)
627 ("json-c" ,json-c)
628 ("kmod" ,kmod)
629 ("util-linux" ,util-linux)))
630 (arguments
631 `(#:phases
632 (modify-phases %standard-phases
633 (add-after 'unpack 'autogen
634 (lambda _
635 (substitute* "autogen.sh"
636 (("/bin/sh") (which "sh")))
637 (substitute* "git-version-gen"
638 (("/bin/sh") (which "sh")))
639 (substitute* "git-version"
640 (("/bin/bash") (which "bash"))))))
641 #:make-flags
642 (let ((out (assoc-ref %outputs "out")))
643 (list (string-append "BASH_COMPLETION_DIR=" out
644 "/share/bash-completion/completions")))))
645 (home-page "https://github.com/pmem/ndctl")
646 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
647 (description
648 "This package provides a utility library for managing the
649libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
650 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
651 ;; the effective license. Note that some files under ccan/ are
652 ;; covered by BSD-3 or public domain, see the individual folders.
653 (license license:gpl2)))
82aac7c1
PN
654
655(define-public dmraid
656 (package
657 (name "dmraid")
658 (version "1.0.0.rc16-3")
659 (source (origin
660 (method url-fetch)
661 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
662 version ".tar.bz2"))
663 (sha256
664 (base32
665 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
666 (build-system gnu-build-system)
667 (inputs `(("lvm2" ,lvm2)))
668 (native-inputs `(("which" ,which)))
669 (arguments
670 `(#:tests? #f ; No tests.
22070535
MB
671 ;; Prevent a race condition where some target would attempt to link
672 ;; libdmraid.so before it had been built as reported in
673 ;; <https://bugs.gnu.org/31999#187>.
674 #:parallel-build? #f
82aac7c1
PN
675 #:phases (modify-phases %standard-phases
676 (add-before 'configure 'change-directory
677 (lambda _
678 (chdir (string-append ,version "/dmraid"))
679 (substitute* "make.tmpl.in"
680 (("/bin/sh") (which "sh")))
681 #t)))
682 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
683 ;; find libdmraid.so.
684 (string-append "LDFLAGS=-Wl,-rpath="
685 (assoc-ref %outputs "out")
686 "/lib"))))
687 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
688 (synopsis "Device mapper RAID interface")
689 (description
690 "This software supports RAID device discovery, RAID set activation, creation,
691removal, rebuild and display of properties for ATARAID/DDF1 metadata.
692
693@command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
694to create devices with respective mappings for the ATARAID sets discovered.")
695 (license license:gpl2+)))
fac91b39
PN
696
697(define-public libblockdev
698 (package
699 (name "libblockdev")
700 (version "2.18")
701 (source (origin
702 (method url-fetch)
703 (uri (string-append "https://github.com/storaged-project/libblockdev/releases/download/"
704 version "-1/libblockdev-" version ".tar.gz"))
705 (sha256
706 (base32
707 "1a3kpdr9s6g7nfibazi92i27wbv692b5gm2r24gimis6l6jq4pbh"))))
708 (build-system gnu-build-system)
709 (native-inputs
710 `(("pkg-config" ,pkg-config)
711 ("python" ,python-wrapper)
712 ("util-linux" ,util-linux)))
713 (inputs
714 `(("btrfs-progs" ,btrfs-progs)
715 ("cryptsetup" ,cryptsetup)
716 ("dosfstools" ,dosfstools)
717 ("dmraid" ,dmraid)
718 ("eudev" ,eudev)
719 ("glib" ,glib)
720 ("gobject-introspection" ,gobject-introspection)
721 ("kmod" ,kmod)
722 ("libbytesize" ,libbytesize)
723 ("libyaml" ,libyaml)
724 ("lvm2" ,lvm2)
725 ("mdadm" ,mdadm)
726 ("ndctl" ,ndctl)
727 ("nss" ,nss)
728 ("parted" ,parted)
729 ("volume-key" ,volume-key)
730 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
731 ))
732 (home-page "https://github.com/storaged-project/libblockdev")
733 (synopsis "Library for manipulating block devices")
734 (description
735 "libblockdev is a C library supporting GObject introspection for
736manipulation of block devices. It has a plugin-based architecture where each
737technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
738plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
739LVM D-Bus API).")
740 ;; XXX: Copying says LGPL2.1, but the source files with license
741 ;; information are GPL2+.
742 (license license:gpl2+)))