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