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