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> |
3d238656 | 5 | ;;; Copyright © 2016, 2018, 2019 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 | 39 | #:use-module (gnu packages compression) |
f95114e5 | 40 | #:use-module (gnu packages crypto) |
3820d51b | 41 | #:use-module (gnu packages cryptsetup) |
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 | 48 | #:use-module (gnu packages gnupg) |
3820d51b TGR |
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) |
aff0cce9 | 53 | #:use-module (gnu packages nss) |
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) |
cd0322a3 | 60 | #:use-module (gnu packages sqlite) |
3820d51b | 61 | #:use-module (gnu packages swig) |
5f0f3686 | 62 | #:use-module (gnu packages vim) |
19b662ea | 63 | #:use-module (gnu packages w3m) |
f7a4f7c0 | 64 | #:use-module (gnu packages web) |
3820d51b TGR |
65 | #:use-module (gnu packages xml) |
66 | #:use-module (guix build-system gnu) | |
67 | #:use-module (guix build-system python) | |
68 | #:use-module (guix build-system trivial) | |
3b451546 | 69 | #:use-module (guix build-system scons) |
3820d51b TGR |
70 | #:use-module (guix download) |
71 | #:use-module (guix git-download) | |
72 | #:use-module ((guix licenses) #:prefix license:) | |
73 | #:use-module (guix packages)) | |
e04f30e0 NK |
74 | |
75 | (define-public parted | |
76 | (package | |
77 | (name "parted") | |
1b933e62 ML |
78 | (version "3.2") |
79 | (source (origin | |
80 | (method url-fetch) | |
81 | (uri (string-append "mirror://gnu/parted/parted-" | |
82 | version ".tar.xz")) | |
8d48f358 | 83 | (patches (search-patches "parted-glibc-compat.patch")) |
1b933e62 ML |
84 | (sha256 |
85 | (base32 | |
86 | "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5")))) | |
e04f30e0 | 87 | (build-system gnu-build-system) |
1b933e62 ML |
88 | (arguments |
89 | `(#:phases | |
90 | (modify-phases %standard-phases | |
91 | (add-after | |
92 | 'unpack 'fix-locales-and-python | |
93 | (lambda* (#:key inputs #:allow-other-keys) | |
94 | (substitute* "tests/t0251-gpt-unicode.sh" | |
95 | (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales | |
96 | (substitute* "tests/msdos-overlap" | |
97 | (("/usr/bin/python") (which "python")))))))) | |
e04f30e0 | 98 | (inputs |
1b933e62 ML |
99 | `(("lvm2" ,lvm2) |
100 | ("readline" ,readline) | |
e04f30e0 | 101 | ("util-linux" ,util-linux))) |
c4c4cc05 | 102 | (native-inputs |
b94a6ca0 | 103 | `(("gettext" ,gettext-minimal) |
1b933e62 ML |
104 | ;; For the tests. |
105 | ("perl" ,perl) | |
106 | ("python" ,python-2))) | |
107 | (home-page "https://www.gnu.org/software/parted/") | |
f50d2669 | 108 | (synopsis "Disk partition editor") |
e04f30e0 | 109 | (description |
79c311b8 LC |
110 | "GNU Parted is a package for creating and manipulating disk partition |
111 | tables. It includes a library and command-line utility.") | |
fd297f4a | 112 | (license license:gpl3+))) |
cc4a2aeb LC |
113 | |
114 | (define-public fdisk | |
115 | (package | |
116 | (name "fdisk") | |
ae03ee42 | 117 | (version "2.0.0a1") |
cc4a2aeb LC |
118 | (source |
119 | (origin | |
120 | (method url-fetch) | |
121 | (uri (string-append "mirror://gnu/fdisk/gnufdisk-" | |
122 | version ".tar.gz")) | |
123 | (sha256 | |
124 | (base32 | |
ae03ee42 | 125 | "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9")))) |
cc4a2aeb LC |
126 | (build-system gnu-build-system) |
127 | (inputs | |
b94a6ca0 | 128 | `(("gettext" ,gettext-minimal) |
cc4a2aeb LC |
129 | ("guile" ,guile-1.8) |
130 | ("util-linux" ,util-linux) | |
131 | ("parted" ,parted))) | |
ae03ee42 TGR |
132 | ;; The build neglects to look for its own headers in its own tree. A next |
133 | ;; release should fix this, but may never come: GNU fdisk looks abandoned. | |
134 | (arguments | |
135 | `(#:phases | |
136 | (modify-phases %standard-phases | |
137 | (add-after 'unpack 'skip-broken-header-probes | |
138 | (lambda _ | |
139 | (substitute* "backend/configure" | |
140 | (("gnufdisk-common.h .*") "\n")) | |
141 | #t))) | |
142 | #:make-flags (list (string-append "CPPFLAGS=" | |
143 | " -I../common/include " | |
144 | " -I../debug/include " | |
145 | " -I../exception/include")))) | |
cc4a2aeb LC |
146 | (home-page "https://www.gnu.org/software/fdisk/") |
147 | (synopsis "Low-level disk partitioning and formatting") | |
148 | (description | |
149 | "GNU fdisk provides a GNU version of the common disk partitioning tool | |
150 | fdisk. fdisk is used for the creation and manipulation of disk partition | |
151 | tables, and it understands a variety of different formats.") | |
fd297f4a | 152 | (license license:gpl3+))) |
cc4a2aeb | 153 | |
abba1d08 JN |
154 | (define-public gptfdisk |
155 | (package | |
156 | (name "gptfdisk") | |
871d8199 | 157 | (version "1.0.4") |
abba1d08 JN |
158 | (source |
159 | (origin | |
160 | (method url-fetch) | |
161 | (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/" | |
162 | version "/" name "-" version ".tar.gz")) | |
163 | (sha256 | |
164 | (base32 | |
871d8199 | 165 | "13d7gff4prl1nsdknjigmb7bbqhn79165n01v4y9mwbnd0d3jqxn")))) |
abba1d08 JN |
166 | (build-system gnu-build-system) |
167 | (inputs | |
b94a6ca0 | 168 | `(("gettext" ,gettext-minimal) |
abba1d08 JN |
169 | ("ncurses" ,ncurses) |
170 | ("popt" ,popt) | |
171 | ("util-linux" ,util-linux))) ; libuuid | |
172 | (arguments | |
173 | `(#:test-target "test" | |
174 | #:phases | |
175 | (modify-phases %standard-phases | |
176 | ;; no configure script | |
177 | (delete 'configure) | |
178 | ;; no install target | |
179 | (replace 'install | |
180 | (lambda* (#:key outputs #:allow-other-keys) | |
6fb9e069 LF |
181 | (let* ((out (assoc-ref outputs "out")) |
182 | (bin (string-append out "/bin")) | |
183 | (man (string-append out "/share/man/man8"))) | |
abba1d08 JN |
184 | (install-file "gdisk" bin) |
185 | (install-file "sgdisk" bin) | |
186 | (install-file "cgdisk" bin) | |
6fb9e069 LF |
187 | (install-file "fixparts" bin) |
188 | (install-file "cgdisk.8" man) | |
189 | (install-file "fixparts.8" man) | |
190 | (install-file "gdisk.8" man) | |
191 | (install-file "sgdisk.8" man))))))) | |
abba1d08 JN |
192 | (home-page "http://www.rodsbooks.com/gdisk/") |
193 | (synopsis "Low-level GPT disk partitioning and formatting") | |
194 | (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that | |
73fe4552 TGR |
195 | works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT}) |
196 | disks, rather than on the older Master Boot Record (@dfn{MBR}) partition | |
197 | scheme.") | |
fd297f4a | 198 | (license license:gpl2))) |
abba1d08 | 199 | |
cc4a2aeb LC |
200 | (define-public ddrescue |
201 | (package | |
202 | (name "ddrescue") | |
a4776d09 | 203 | (version "1.24") |
cc4a2aeb LC |
204 | (source |
205 | (origin | |
206 | (method url-fetch) | |
207 | (uri (string-append "mirror://gnu/ddrescue/ddrescue-" | |
208 | version ".tar.lz")) | |
209 | (sha256 | |
a4776d09 | 210 | (base32 "11qh0bbzf00mfb4yq35gnv5m260k4d7q9ixklry6bqvhvvp3ypab")))) |
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") | |
4b768681 | 343 | (version "0.33.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 | |
4b768681 | 350 | (base32 "1ml1ky3s75lbxr91p608q3prsdh9x899mw7nbgk252pqhg4vh8sh")))) |
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") | |
3d238656 | 481 | (version "0.11.1") |
acc6eb89 TGR |
482 | (source |
483 | (origin | |
484 | (method git-fetch) | |
485 | (uri (git-reference | |
486 | (url "https://github.com/markfasheh/duperemove.git") | |
487 | (commit (string-append "v" version)))) | |
488 | (sha256 | |
489 | (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z")) | |
490 | (file-name (git-file-name name version)))) | |
d232e02e VD |
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") | |
f95114e5 | 612 | (version "64.1") |
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 | |
f95114e5 | 621 | "1la82fqbdwjkw6il498nkdfgqc4aszv481xf2p9p07jfvankx24v")))) |
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) | |
f95114e5 | 638 | ("keyutils" ,keyutils) |
f7a4f7c0 PN |
639 | ("kmod" ,kmod) |
640 | ("util-linux" ,util-linux))) | |
641 | (arguments | |
1f033795 TGR |
642 | `(#:configure-flags |
643 | (list "--disable-asciidoctor" ; use docbook-xsl instead | |
644 | "--without-systemd") | |
645 | #:phases | |
f7a4f7c0 | 646 | (modify-phases %standard-phases |
a926109d | 647 | (add-after 'unpack 'patch-FHS-file-names |
f7a4f7c0 | 648 | (lambda _ |
f7a4f7c0 PN |
649 | (substitute* "git-version-gen" |
650 | (("/bin/sh") (which "sh"))) | |
651 | (substitute* "git-version" | |
a926109d TGR |
652 | (("/bin/bash") (which "bash"))) |
653 | #t))) | |
f7a4f7c0 PN |
654 | #:make-flags |
655 | (let ((out (assoc-ref %outputs "out"))) | |
656 | (list (string-append "BASH_COMPLETION_DIR=" out | |
657 | "/share/bash-completion/completions"))))) | |
658 | (home-page "https://github.com/pmem/ndctl") | |
659 | (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel") | |
660 | (description | |
661 | "This package provides a utility library for managing the | |
662 | libnvdimm (non-volatile memory device) sub-system in the Linux kernel.") | |
663 | ;; COPYING says LGPL2.1, but many source files are GPL2 so that's | |
664 | ;; the effective license. Note that some files under ccan/ are | |
665 | ;; covered by BSD-3 or public domain, see the individual folders. | |
666 | (license license:gpl2))) | |
82aac7c1 PN |
667 | |
668 | (define-public dmraid | |
669 | (package | |
670 | (name "dmraid") | |
671 | (version "1.0.0.rc16-3") | |
672 | (source (origin | |
673 | (method url-fetch) | |
674 | (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-" | |
675 | version ".tar.bz2")) | |
676 | (sha256 | |
677 | (base32 | |
678 | "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk")))) | |
679 | (build-system gnu-build-system) | |
680 | (inputs `(("lvm2" ,lvm2))) | |
681 | (native-inputs `(("which" ,which))) | |
682 | (arguments | |
683 | `(#:tests? #f ; No tests. | |
22070535 MB |
684 | ;; Prevent a race condition where some target would attempt to link |
685 | ;; libdmraid.so before it had been built as reported in | |
686 | ;; <https://bugs.gnu.org/31999#187>. | |
687 | #:parallel-build? #f | |
82aac7c1 PN |
688 | #:phases (modify-phases %standard-phases |
689 | (add-before 'configure 'change-directory | |
690 | (lambda _ | |
691 | (chdir (string-append ,version "/dmraid")) | |
692 | (substitute* "make.tmpl.in" | |
693 | (("/bin/sh") (which "sh"))) | |
694 | #t))) | |
695 | #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can | |
696 | ;; find libdmraid.so. | |
697 | (string-append "LDFLAGS=-Wl,-rpath=" | |
698 | (assoc-ref %outputs "out") | |
699 | "/lib")))) | |
700 | (home-page "https://people.redhat.com/~heinzm/sw/dmraid/") | |
701 | (synopsis "Device mapper RAID interface") | |
702 | (description | |
703 | "This software supports RAID device discovery, RAID set activation, creation, | |
704 | removal, rebuild and display of properties for ATARAID/DDF1 metadata. | |
705 | ||
706 | @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime | |
707 | to create devices with respective mappings for the ATARAID sets discovered.") | |
708 | (license license:gpl2+))) | |
fac91b39 PN |
709 | |
710 | (define-public libblockdev | |
711 | (package | |
712 | (name "libblockdev") | |
e17a0bad | 713 | (version "2.21") |
fac91b39 PN |
714 | (source (origin |
715 | (method url-fetch) | |
4273a7ef TGR |
716 | (uri (string-append "https://github.com/storaged-project/" |
717 | "libblockdev/releases/download/" | |
fac91b39 PN |
718 | version "-1/libblockdev-" version ".tar.gz")) |
719 | (sha256 | |
720 | (base32 | |
e17a0bad | 721 | "02p13l4194j0vyd2zs7bb9dmyclcpqq8l3qv9289vjfbsvq2awii")))) |
fac91b39 PN |
722 | (build-system gnu-build-system) |
723 | (native-inputs | |
724 | `(("pkg-config" ,pkg-config) | |
725 | ("python" ,python-wrapper) | |
726 | ("util-linux" ,util-linux))) | |
727 | (inputs | |
728 | `(("btrfs-progs" ,btrfs-progs) | |
729 | ("cryptsetup" ,cryptsetup) | |
730 | ("dosfstools" ,dosfstools) | |
731 | ("dmraid" ,dmraid) | |
732 | ("eudev" ,eudev) | |
733 | ("glib" ,glib) | |
734 | ("gobject-introspection" ,gobject-introspection) | |
735 | ("kmod" ,kmod) | |
736 | ("libbytesize" ,libbytesize) | |
737 | ("libyaml" ,libyaml) | |
738 | ("lvm2" ,lvm2) | |
739 | ("mdadm" ,mdadm) | |
740 | ("ndctl" ,ndctl) | |
741 | ("nss" ,nss) | |
742 | ("parted" ,parted) | |
743 | ("volume-key" ,volume-key) | |
744 | ;; ("xfsprogs" ,xfsprogs) ; TODO: Package? | |
745 | )) | |
746 | (home-page "https://github.com/storaged-project/libblockdev") | |
747 | (synopsis "Library for manipulating block devices") | |
748 | (description | |
749 | "libblockdev is a C library supporting GObject introspection for | |
750 | manipulation of block devices. It has a plugin-based architecture where each | |
751 | technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate | |
752 | plugin, possibly with multiple implementations (e.g. using LVM CLI or the new | |
753 | LVM D-Bus API).") | |
4273a7ef | 754 | (license license:lgpl2.1+))) |
3b451546 PN |
755 | |
756 | (define-public rmlint | |
757 | (package | |
758 | (name "rmlint") | |
759 | (version "2.8.0") | |
760 | (source (origin | |
761 | (method git-fetch) | |
762 | (uri (git-reference | |
763 | (url "https://github.com/sahib/rmlint") | |
764 | (commit (string-append "v" version)))) | |
765 | (file-name (git-file-name name version)) | |
766 | (sha256 | |
767 | (base32 | |
768 | "1gc7gbnh0qg1kl151cv1ld87vhpm1v3pnkn7prhscdcc21jrg8nz")))) | |
769 | (build-system scons-build-system) | |
770 | (arguments | |
771 | `(#:scons ,scons-python2 | |
772 | #:scons-flags (list (string-append "--prefix=" %output) | |
773 | (string-append "--actual-prefix=" %output)) | |
774 | #:tests? #f ; No tests? | |
775 | #:phases | |
776 | (modify-phases %standard-phases | |
777 | (add-after 'unpack 'scons-propagate-environment | |
778 | (lambda* (#:key inputs #:allow-other-keys) | |
779 | ;; TODO: `rmlint --gui` fails with | |
780 | ;; "Failed to load shredder: No module named 'shredder'". | |
781 | ;; The GUI might also need extra dependencies, such as | |
782 | ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3. | |
783 | (substitute* "lib/cmdline.c" | |
784 | (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};") | |
785 | (string-append | |
786 | "const char *commands[] = {\"" | |
787 | (assoc-ref inputs "python") "/bin/python" | |
788 | "\", \"python\", NULL};"))) | |
789 | ;; By design, SCons does not, by default, propagate | |
790 | ;; environment variables to subprocesses. See: | |
791 | ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969> | |
792 | ;; Here, we modify the SConstruct file to arrange for | |
793 | ;; environment variables to be propagated. | |
794 | (substitute* "SConstruct" | |
795 | (("^env = Environment\\(.*\\)" all) | |
796 | (string-append | |
797 | all | |
798 | "\nenv['ENV']=os.environ")))))))) | |
799 | (native-inputs | |
800 | `(("pkg-config" ,pkg-config) | |
801 | ("glib:bin" ,glib "bin") | |
802 | ("python-sphinx" ,python-sphinx))) | |
803 | (inputs | |
804 | `(("python" ,python-wrapper) | |
805 | ("glib" ,glib) | |
806 | ("libelf" ,libelf) | |
807 | ("elfutils" ,elfutils) | |
808 | ("json-glib" ,json-glib) | |
809 | ("libblkid" ,util-linux))) | |
810 | (home-page "https://rmlint.rtfd.org") | |
811 | (synopsis "Remove duplicates and other lint from the filesystem") | |
812 | (description "@command{rmlint} finds space waste and other broken things | |
813 | on your filesystem and offers to remove it. @command{rmlint} can find: | |
814 | ||
815 | @itemize | |
816 | @item duplicate files and duplicate directories, | |
817 | @item non-stripped binaries (i.e. binaries with debug symbols), | |
818 | @item broken symbolic links, | |
819 | @item empty files and directories, | |
820 | @item files with broken user and/or group ID. | |
821 | @end itemize\n") | |
822 | (license license:gpl3+))) |