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