gnu: OpenSSH: Update to 7.9p1.
[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)
abba1d08 33 #:use-module (gnu packages)
3820d51b 34 #:use-module (gnu packages autotools)
c20e552b 35 #:use-module (gnu packages base)
3820d51b
TGR
36 #:use-module (gnu packages bash)
37 #:use-module (gnu packages c)
834b0b9a 38 #:use-module (gnu packages check)
3820d51b
TGR
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages cryptsetup)
d232e02e 41 #:use-module (gnu packages databases)
c20e552b 42 #:use-module (gnu packages docbook)
3820d51b 43 #:use-module (gnu packages documentation)
1dba6407 44 #:use-module (gnu packages gettext)
c20e552b 45 #:use-module (gnu packages glib)
c20e552b 46 #:use-module (gnu packages gnome)
3820d51b
TGR
47 #:use-module (gnu packages gnupg)
48 #:use-module (gnu packages gnuzilla)
49 #:use-module (gnu packages gtk)
50 #:use-module (gnu packages guile)
e04f30e0 51 #:use-module (gnu packages linux)
abba1d08 52 #:use-module (gnu packages ncurses)
1b933e62 53 #:use-module (gnu packages perl)
c20e552b 54 #:use-module (gnu packages pkg-config)
abba1d08 55 #:use-module (gnu packages popt)
1b933e62 56 #:use-module (gnu packages python)
cc4a2aeb 57 #:use-module (gnu packages readline)
3820d51b 58 #:use-module (gnu packages swig)
5f0f3686 59 #:use-module (gnu packages vim)
19b662ea 60 #:use-module (gnu packages w3m)
f7a4f7c0 61 #:use-module (gnu packages web)
3820d51b
TGR
62 #:use-module (gnu packages xml)
63 #:use-module (guix build-system gnu)
64 #:use-module (guix build-system python)
65 #:use-module (guix build-system trivial)
66 #:use-module (guix download)
67 #:use-module (guix git-download)
68 #:use-module ((guix licenses) #:prefix license:)
69 #:use-module (guix packages))
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")
3d0fdb34 520 (version "1.9.2")
834b0b9a
EB
521 (source (origin
522 (method url-fetch)
523 (uri (string-append "https://ranger.github.io/"
524 "ranger-" version ".tar.gz"))
525 (sha256
526 (base32
3d0fdb34 527 "12kbsqakbxs09y0x8hy66mmaf72rk0p850x7ryk2ghkq7wfin78f"))))
834b0b9a 528 (build-system python-build-system)
19b662ea
RH
529 (inputs
530 `(("w3m" ,w3m)))
43c97cce
TGR
531 (native-inputs
532 `(("which" ,which)
533
534 ;; For tests.
535 ("python-pytest" ,python-pytest)))
19b662ea 536 (arguments
43c97cce
TGR
537 '( ;; The 'test' target runs developer tools like pylint, which fail.
538 #:test-target "test_pytest"
539 #:phases
19b662ea
RH
540 (modify-phases %standard-phases
541 (add-after 'configure 'wrap-program
542 ;; Tell 'ranger' where 'w3mimgdisplay' is.
543 (lambda* (#:key inputs outputs #:allow-other-keys)
544 (let* ((out (assoc-ref outputs "out"))
545 (ranger (string-append out "/bin/ranger"))
546 (w3m (assoc-ref inputs "w3m"))
547 (w3mimgdisplay (string-append w3m
548 "/libexec/w3m/w3mimgdisplay")))
549 (wrap-program ranger
550 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
3d0fdb34
TGR
551 #t)))
552 (replace 'check
43c97cce
TGR
553 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
554 (lambda* (#:key test-target #:allow-other-keys)
555 (invoke "make" test-target))))))
834b0b9a
EB
556 (home-page "https://ranger.github.io/")
557 (synopsis "Console file manager")
adfc742c
EB
558 (description "ranger is a console file manager with Vi key bindings. It
559provides a minimalistic and nice curses interface with a view on the directory
560hierarchy. It ships with @code{rifle}, a file launcher that is good at
561automatically finding out which program to use for what file type.")
834b0b9a 562 (license license:gpl3)))
dedc0d0b
PN
563
564(define-public volume-key
565 (package
566 (name "volume-key")
8984dbd0 567 (version "0.3.12")
dedc0d0b
PN
568 (source (origin
569 (method url-fetch)
570 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
571 version ".tar.xz"))
572 (sha256
573 (base32
8984dbd0 574 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
dedc0d0b
PN
575 (build-system gnu-build-system)
576 (native-inputs
577 `(("pkg-config" ,pkg-config)
578 ("util-linux" ,util-linux)
579 ("swig" ,swig)
8984dbd0 580 ("python" ,python-3))) ; used to generate the Python bindings
dedc0d0b
PN
581 (inputs
582 `(("cryptsetup" ,cryptsetup)
583 ("nss" ,nss)
8984dbd0 584 ("lvm2" ,lvm2) ; for "-ldevmapper"
dedc0d0b
PN
585 ("glib" ,glib)
586 ("gpgme" ,gpgme)))
587 (arguments
8984dbd0 588 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
dedc0d0b
PN
589 #:phases
590 (modify-phases %standard-phases
591 (add-before 'configure 'patch-python.h-path
592 (lambda* (#:key inputs #:allow-other-keys)
593 (let ((python (assoc-ref inputs "python")))
594 (substitute* "Makefile.in"
595 (("/usr/include/python") (string-append python "/include/python")))
596 #t))))))
597 (home-page "https://pagure.io/volume_key")
598 (synopsis "Manipulate storage volume encryption keys")
599 (description
600 "This package provides a library for manipulating storage volume
601encryption keys and storing them separately from volumes to handle forgotten
602passphrases.")
603 (license license:gpl2)))
f7a4f7c0
PN
604
605(define-public ndctl
606 (package
607 (name "ndctl")
1f033795 608 (version "63")
f7a4f7c0
PN
609 (source (origin
610 (method git-fetch)
611 (uri (git-reference
1f033795 612 (url "https://github.com/pmem/ndctl.git")
f7a4f7c0 613 (commit (string-append "v" version))))
1f033795 614 (file-name (git-file-name name version))
f7a4f7c0
PN
615 (sha256
616 (base32
1f033795 617 "060nsza8xic769bxj3pvl70a9885bwrc0myw16l095i3z6w7yzwq"))))
f7a4f7c0
PN
618 (build-system gnu-build-system)
619 (native-inputs
620 `(("asciidoc" ,asciidoc)
621 ("automake" ,automake)
622 ("autoconf" ,autoconf)
1f033795 623 ("bash-completion" ,bash-completion)
f7a4f7c0
PN
624 ("docbook-xsl" ,docbook-xsl)
625 ("libtool" ,libtool)
626 ("libxml2" ,libxml2)
627 ("pkg-config" ,pkg-config)
628 ("xmlto" ,xmlto)
1f033795 629 ;; Required for offline docbook generation.
f7a4f7c0
PN
630 ("which" ,which)))
631 (inputs
632 `(("eudev" ,eudev)
633 ("json-c" ,json-c)
634 ("kmod" ,kmod)
635 ("util-linux" ,util-linux)))
636 (arguments
1f033795
TGR
637 `(#:configure-flags
638 (list "--disable-asciidoctor" ; use docbook-xsl instead
639 "--without-systemd")
640 #:phases
f7a4f7c0 641 (modify-phases %standard-phases
a926109d 642 (add-after 'unpack 'patch-FHS-file-names
f7a4f7c0 643 (lambda _
f7a4f7c0
PN
644 (substitute* "git-version-gen"
645 (("/bin/sh") (which "sh")))
646 (substitute* "git-version"
a926109d
TGR
647 (("/bin/bash") (which "bash")))
648 #t)))
f7a4f7c0
PN
649 #:make-flags
650 (let ((out (assoc-ref %outputs "out")))
651 (list (string-append "BASH_COMPLETION_DIR=" out
652 "/share/bash-completion/completions")))))
653 (home-page "https://github.com/pmem/ndctl")
654 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
655 (description
656 "This package provides a utility library for managing the
657libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
658 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
659 ;; the effective license. Note that some files under ccan/ are
660 ;; covered by BSD-3 or public domain, see the individual folders.
661 (license license:gpl2)))
82aac7c1
PN
662
663(define-public dmraid
664 (package
665 (name "dmraid")
666 (version "1.0.0.rc16-3")
667 (source (origin
668 (method url-fetch)
669 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
670 version ".tar.bz2"))
671 (sha256
672 (base32
673 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
674 (build-system gnu-build-system)
675 (inputs `(("lvm2" ,lvm2)))
676 (native-inputs `(("which" ,which)))
677 (arguments
678 `(#:tests? #f ; No tests.
22070535
MB
679 ;; Prevent a race condition where some target would attempt to link
680 ;; libdmraid.so before it had been built as reported in
681 ;; <https://bugs.gnu.org/31999#187>.
682 #:parallel-build? #f
82aac7c1
PN
683 #:phases (modify-phases %standard-phases
684 (add-before 'configure 'change-directory
685 (lambda _
686 (chdir (string-append ,version "/dmraid"))
687 (substitute* "make.tmpl.in"
688 (("/bin/sh") (which "sh")))
689 #t)))
690 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
691 ;; find libdmraid.so.
692 (string-append "LDFLAGS=-Wl,-rpath="
693 (assoc-ref %outputs "out")
694 "/lib"))))
695 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
696 (synopsis "Device mapper RAID interface")
697 (description
698 "This software supports RAID device discovery, RAID set activation, creation,
699removal, rebuild and display of properties for ATARAID/DDF1 metadata.
700
701@command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
702to create devices with respective mappings for the ATARAID sets discovered.")
703 (license license:gpl2+)))
fac91b39
PN
704
705(define-public libblockdev
706 (package
707 (name "libblockdev")
4273a7ef 708 (version "2.20")
fac91b39
PN
709 (source (origin
710 (method url-fetch)
4273a7ef
TGR
711 (uri (string-append "https://github.com/storaged-project/"
712 "libblockdev/releases/download/"
fac91b39
PN
713 version "-1/libblockdev-" version ".tar.gz"))
714 (sha256
715 (base32
4273a7ef 716 "092snk5jyv48na4d46v1ckiy859zwpb3r0ivnxv3km5vzsp76y7q"))))
fac91b39
PN
717 (build-system gnu-build-system)
718 (native-inputs
719 `(("pkg-config" ,pkg-config)
720 ("python" ,python-wrapper)
721 ("util-linux" ,util-linux)))
722 (inputs
723 `(("btrfs-progs" ,btrfs-progs)
724 ("cryptsetup" ,cryptsetup)
725 ("dosfstools" ,dosfstools)
726 ("dmraid" ,dmraid)
727 ("eudev" ,eudev)
728 ("glib" ,glib)
729 ("gobject-introspection" ,gobject-introspection)
730 ("kmod" ,kmod)
731 ("libbytesize" ,libbytesize)
732 ("libyaml" ,libyaml)
733 ("lvm2" ,lvm2)
734 ("mdadm" ,mdadm)
735 ("ndctl" ,ndctl)
736 ("nss" ,nss)
737 ("parted" ,parted)
738 ("volume-key" ,volume-key)
739 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
740 ))
741 (home-page "https://github.com/storaged-project/libblockdev")
742 (synopsis "Library for manipulating block devices")
743 (description
744 "libblockdev is a C library supporting GObject introspection for
745manipulation of block devices. It has a plugin-based architecture where each
746technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
747plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
748LVM D-Bus API).")
4273a7ef 749 (license license:lgpl2.1+)))