gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / disk.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016, 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2016, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
9 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
11 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
12 ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
15 ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
16 ;;; Copyright © 2019 Leo Famulari <leo@famulari.name>
17 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
18 ;;; Copyright © 2020 Pkill -9 <pkill9@runbox.com>
19 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
20 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
21 ;;; Copyright © 2021 Michael Rohleder <mike@rohleder.de>
22 ;;;
23 ;;; This file is part of GNU Guix.
24 ;;;
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
29 ;;;
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
34 ;;;
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38 (define-module (gnu packages disk)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages bash)
43 #:use-module (gnu packages c)
44 #:use-module (gnu packages check)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages crypto)
47 #:use-module (gnu packages cryptsetup)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages file-systems)
52 #:use-module (gnu packages file)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages gnupg)
58 #:use-module (gnu packages graphics)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages linux)
62 #:use-module (gnu packages ncurses)
63 #:use-module (gnu packages nss)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages popt)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages python-xyz)
69 #:use-module (gnu packages readline)
70 #:use-module (gnu packages samba)
71 #:use-module (gnu packages sphinx)
72 #:use-module (gnu packages sqlite)
73 #:use-module (gnu packages swig)
74 #:use-module (gnu packages terminals)
75 #:use-module (gnu packages textutils)
76 #:use-module (gnu packages vim)
77 #:use-module (gnu packages w3m)
78 #:use-module (gnu packages web)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
81 #:use-module (guix build-system gnu)
82 #:use-module (guix build-system glib-or-gtk)
83 #:use-module (guix build-system go)
84 #:use-module (guix build-system python)
85 #:use-module (guix build-system trivial)
86 #:use-module (guix build-system scons)
87 #:use-module (guix download)
88 #:use-module (guix git-download)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (guix packages)
91 #:use-module (guix utils))
92
93 (define-public bcache-tools
94 ;; The 1.1 release is a year old and missing new features & documentation.
95 (let ((commit "096d205a9f1be8540cbc5a468c0da8203023de70")
96 (revision "0"))
97 (package
98 (name "bcache-tools")
99 (version (git-version "1.1" revision commit))
100 (source
101 (origin
102 (method git-fetch)
103 (uri (git-reference
104 (url (string-append "https://git.kernel.org/pub/scm/"
105 "linux/kernel/git/colyli/bcache-tools.git"))
106 (commit commit)))
107 (file-name (git-file-name name version))
108 (sha256
109 (base32 "0r0vwg4vacz5zgsafk360xn7gi2scy01c79mkmjrdyxjfij5z3iy"))))
110 (build-system gnu-build-system)
111 (arguments
112 `(#:tests? #f ; no test suite
113 #:make-flags
114 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
115 (string-append "UDEVLIBDIR=" (assoc-ref %outputs "out")
116 "/lib/udev")
117 (string-append "DRACUTLIBDIR=" (assoc-ref %outputs "out")
118 "/lib/dracut")
119 (string-append "CC=" ,(cc-for-target)))
120 #:phases
121 (modify-phases %standard-phases
122 (delete 'configure) ; no configure script
123 (add-before 'install 'fix-hard-coded-file-names
124 (lambda _
125 ;; Some rules still hard-code /usr.
126 (substitute* "Makefile"
127 (("/usr") "${PREFIX}"))
128 #t))
129 (add-before 'install 'create-target-directories
130 (lambda* (#:key outputs #:allow-other-keys)
131 (let* ((out (assoc-ref outputs "out")))
132 (for-each (lambda (dir)
133 (mkdir-p (string-append out dir)))
134 (list "/lib/udev/rules.d"
135 "/sbin"
136 "/share/man/man8"))
137 #t))))))
138 (native-inputs
139 `(("pkg-config" ,pkg-config)))
140 (inputs
141 `(("util-linux:lib" ,util-linux "lib"))) ; libblkid
142 (home-page "https://bcache.evilpiepirate.org")
143 (synopsis "Tools for the Linux kernel block layer cache")
144 (description
145 "This package contains user-space utilities to create and inspect bcache
146 partitions. It's rather minimal as bcache is designed to work well without
147 configuration on any system.
148
149 Linux's @acronym{bcache, block layer cache} lets one or more fast block devices,
150 such as flash-based @acronym{SSDs, solid state drives}, to act as a cache for
151 one or more slower (and inexpensive) devices, such as hard disk drives or
152 redundant storage arrays. In fact, bcache intends to be a superior alternative
153 to battery-backed RAID controllers.
154
155 Bcache is designed around the performance characteristics of SSDs and tries to
156 minimize write inflation. It's file-system agnostic and does both write-through
157 and write-back caching.")
158 (license license:gpl2))))
159
160 (define-public udevil
161 (package
162 (name "udevil")
163 (version "0.4.4")
164 (source
165 (origin
166 (method git-fetch)
167 (uri
168 (git-reference
169 (url "https://github.com/IgnorantGuru/udevil")
170 (commit version)))
171 (file-name (git-file-name name version))
172 (sha256
173 (base32 "0x9mjr9abvbxzfa9mrip5264iz1qxvsl01k3ybz95q4a7xl4jcb3"))))
174 (build-system gnu-build-system)
175 (arguments
176 `(#:configure-flags
177 (list
178 "--disable-systemd"
179 (string-append "--sysconfdir="
180 (assoc-ref %outputs "out")
181 "/etc")
182 ;; udevil expects these programs to be run with uid set as root.
183 ;; user has to manually add these programs to setuid-programs.
184 ;; mount and umount are default setuid-programs in guix system.
185 "--with-mount-prog=/run/setuid-programs/mount"
186 "--with-umount-prog=/run/setuid-programs/umount"
187 "--with-losetup-prog=/run/setuid-programs/losetup"
188 "--with-setfacl-prog=/run/setuid-programs/setfacl")
189 #:phases
190 (modify-phases %standard-phases
191 (add-after 'unpack 'remove-root-reference
192 (lambda _
193 (substitute* "src/Makefile.in"
194 (("-o root -g root") ""))
195 #t))
196 (add-after 'unpack 'patch-udevil-reference
197 ;; udevil expects itself to be run with uid set as root.
198 ;; devmon also expects udevil to be run with uid set as root.
199 ;; user has to manually add udevil to setuid-programs.
200 (lambda _
201 (substitute* "src/udevil.c"
202 (("/usr/bin/udevil") "/run/setuid-programs/udevil"))
203 (substitute* "src/devmon"
204 (("`which udevil 2>/dev/null`") "/run/setuid-programs/udevil"))
205 #t)))))
206 (native-inputs
207 `(("intltool" ,intltool)
208 ("pkg-config" ,pkg-config)))
209 (inputs
210 `(("cifs-utils" ,cifs-utils)
211 ("curlftpfs" ,curlftpfs)
212 ("eudev" ,eudev)
213 ("fakeroot" ,fakeroot)
214 ("glib" ,glib)
215 ("sshfs" ,sshfs)))
216 (synopsis "Device and file system manager")
217 (description "udevil is a command line program that mounts and unmounts
218 removable devices without a password, shows device info, and monitors device
219 changes. It can also mount ISO files, NFS, SMB, FTP, SSH and WebDAV URLs, and
220 tmpfs/ramfs filesystems.")
221 (home-page "https://ignorantguru.github.io/udevil/")
222 (license license:gpl3+)))
223
224 (define-public parted
225 (package
226 (name "parted")
227 (version "3.4")
228 (source (origin
229 (method url-fetch)
230 (uri (string-append "mirror://gnu/parted/parted-"
231 version ".tar.xz"))
232 (sha256
233 (base32
234 "0hjkv84x1bs2qqyx1fnzjqyyqrhv7kpdbq9bgydmi99d8wi80ag1"))))
235 (build-system gnu-build-system)
236 (arguments
237 `(#:phases
238 (modify-phases %standard-phases
239 (add-after 'unpack 'fix-locales-and-python
240 (lambda* (#:key inputs #:allow-other-keys)
241 (substitute* "tests/t0251-gpt-unicode.sh"
242 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
243 (substitute* "tests/msdos-overlap"
244 (("/usr/bin/python") (which "python")))
245 #t)))))
246 (inputs
247 `(("lvm2" ,lvm2)
248 ("readline" ,readline)
249 ("util-linux" ,util-linux "lib")))
250 (native-inputs
251 `(("gettext" ,gettext-minimal)
252
253 ;; For the tests.
254 ("e2fsprogs" ,e2fsprogs)
255 ("perl" ,perl)
256 ("python-wrapper" ,python-wrapper)
257 ("util-linux" ,util-linux)))
258 (home-page "https://www.gnu.org/software/parted/")
259 (synopsis "Disk partition editor")
260 (description
261 "GNU Parted is a package for creating and manipulating disk partition
262 tables. It includes a library and command-line utility.")
263 (license license:gpl3+)))
264
265 (define-public fdisk
266 (package
267 (name "fdisk")
268 (version "2.0.0a1")
269 (source
270 (origin
271 (method url-fetch)
272 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
273 version ".tar.gz"))
274 (sha256
275 (base32
276 "1d8za79kw8ihnp2br084rgyjv9whkwp7957rzw815i0izx6xhqy9"))))
277 (build-system gnu-build-system)
278 (inputs
279 `(("gettext" ,gettext-minimal)
280 ("guile" ,guile-1.8)
281 ("util-linux" ,util-linux "lib")
282 ("parted" ,parted)))
283 ;; The build neglects to look for its own headers in its own tree. A next
284 ;; release should fix this, but may never come: GNU fdisk looks abandoned.
285 (arguments
286 `(#:phases
287 (modify-phases %standard-phases
288 (add-after 'unpack 'skip-broken-header-probes
289 (lambda _
290 (substitute* "backend/configure"
291 (("gnufdisk-common.h .*") "\n"))
292 #t)))
293 #:make-flags (list (string-append "CPPFLAGS="
294 " -I../common/include "
295 " -I../debug/include "
296 " -I../exception/include"))))
297 (home-page "https://www.gnu.org/software/fdisk/")
298 (synopsis "Low-level disk partitioning and formatting")
299 (description
300 "GNU fdisk provides a GNU version of the common disk partitioning tool
301 fdisk. fdisk is used for the creation and manipulation of disk partition
302 tables, and it understands a variety of different formats.")
303 (license license:gpl3+)))
304
305 (define-public gpart
306 ;; The latest (0.3) release is from 2015 and is missing a crash fix.
307 (let ((commit "ec03350a01ad69708b5a3e2d47b8e002b0eba6c9")
308 (revision "0"))
309 (package
310 (name "gpart")
311 (version (git-version "0.3" revision commit))
312 (source
313 (origin
314 (method git-fetch)
315 (uri (git-reference
316 (url "https://github.com/baruch/gpart")
317 (commit commit)))
318 (file-name (git-file-name name version))
319 (sha256
320 (base32 "1dassswliaiwhhmx7yz540yyxgk53fvg672dbvgc5q0v6cqrh5jx"))))
321 (build-system gnu-build-system)
322 (arguments
323 `(#:configure-flags
324 (list (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
325 ,name "-" ,version))
326 #:phases
327 (modify-phases %standard-phases
328 (add-after 'unpack 'skip-premature-configuration
329 (lambda _
330 (substitute* "autogen.sh"
331 (("\\./configure") "")))))))
332 (native-inputs
333 `(("autoconf" ,autoconf)
334 ("automake" ,automake)))
335 (home-page "https://github.com/baruch/gpart")
336 (synopsis "Guess and recover PC-style partition tables")
337 (description
338 "Gpart tries to guess the partitions on a PC-style, MBR-partitioned disk
339 after they have been inadvertently deleted or the primary partition table at
340 sector 0 damaged. In both cases, the contents of these partitions still exist
341 on the disk but the operating system cannot access them.
342
343 Gpart ignores the partition table and scans each sector of the device or image
344 file for several known file system and partition types. Only partitions which
345 have been formatted in some way can be recognized. Several file system guessing
346 modules are built in; more can be written and loaded at run time.
347
348 The guessed table can be restored manually, for example with @command{fdisk},
349 written to a file, or---if you firmly believe it's entirely correct---directly
350 to disk.
351
352 It should be stressed that gpart does a very heuristic job. It can easily be
353 right in its guesswork but it can also be terribly wrong. Never believe its
354 output without any plausibility checks.")
355 (license license:gpl2+))))
356
357 (define-public gptfdisk
358 (package
359 (name "gptfdisk")
360 (version "1.0.7")
361 (source
362 (origin
363 (method url-fetch)
364 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
365 version "/gptfdisk-" version ".tar.gz"))
366 (sha256
367 (base32 "1h1871gwlq05gdc2wym98ghfmq6pn5lh8g5cqy3r49svz2vh8h3m"))))
368 (build-system gnu-build-system)
369 (inputs
370 `(("gettext" ,gettext-minimal)
371 ("ncurses" ,ncurses)
372 ("popt" ,popt)
373 ("util-linux" ,util-linux "lib"))) ;libuuid
374 (arguments
375 `(#:test-target "test"
376 #:phases
377 (modify-phases %standard-phases
378 (add-after 'unpack 'fix-include-directory
379 (lambda _
380 (substitute* "gptcurses.cc"
381 (("ncursesw/ncurses.h") "ncurses.h"))
382 #t))
383 (delete 'configure) ; no configure script
384 (replace 'install
385 ;; There's no ‘make install’ target.
386 (lambda* (#:key outputs #:allow-other-keys)
387 (let* ((out (assoc-ref outputs "out"))
388 (bin (string-append out "/bin"))
389 (man (string-append out "/share/man/man8")))
390 (install-file "gdisk" bin)
391 (install-file "sgdisk" bin)
392 (install-file "cgdisk" bin)
393 (install-file "fixparts" bin)
394 (install-file "cgdisk.8" man)
395 (install-file "fixparts.8" man)
396 (install-file "gdisk.8" man)
397 (install-file "sgdisk.8" man)))))))
398 (home-page "https://www.rodsbooks.com/gdisk/")
399 (synopsis "Low-level GPT disk partitioning and formatting")
400 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
401 works on Globally Unique Identifier (@dfn{GUID}) Partition Table (@dfn{GPT})
402 disks, rather than on the older Master Boot Record (@dfn{MBR}) partition
403 scheme.")
404 (license license:gpl2)))
405
406 (define-public ddrescue
407 (package
408 (name "ddrescue")
409 (version "1.25")
410 (source
411 (origin
412 (method url-fetch)
413 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
414 version ".tar.lz"))
415 (sha256
416 (base32 "0qqh38izl5ppap9a5izf3hijh94k65s3zbfkczd4b7x04syqwlyf"))))
417 (build-system gnu-build-system)
418 (arguments
419 `(#:configure-flags (list (string-append "CXX=" ,(cxx-for-target)))))
420 (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
421 (synopsis "Data recovery utility")
422 (native-inputs `(("lzip" ,lzip)))
423 (description
424 "GNU ddrescue is a fully automated data recovery tool. It copies data
425 from one file to another, working to rescue data in case of read errors. The
426 program also includes a tool for manipulating its log files, which are used
427 to recover data more efficiently by only reading the necessary blocks.")
428 (license license:gpl3+)))
429
430 (define-public dosfstools
431 (package
432 (name "dosfstools")
433 (version "4.2")
434 (source
435 (origin
436 (method git-fetch)
437 (uri (git-reference
438 (url "https://github.com/dosfstools/dosfstools")
439 (commit (string-append "v" version))))
440 (file-name (git-file-name name version))
441 (sha256
442 (base32 "1xygsixmmc9l7drxylggnzkqqiks8zmlsbhg3z723ii2ak94236s"))))
443 (build-system gnu-build-system)
444 (arguments
445 `(#:configure-flags (list "--enable-compat-symlinks")
446 #:make-flags (list (string-append "PREFIX=" %output)
447 "CC=gcc")))
448 (native-inputs
449 `(("autoconf" ,autoconf)
450 ("automake" ,automake)
451 ;; For tests.
452 ("xxd" ,xxd)))
453 (home-page "https://github.com/dosfstools/dosfstools")
454 (synopsis "Utilities for making and checking MS-DOS FAT file systems")
455 (description
456 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
457 which respectively make and check MS-DOS FAT file systems.")
458 (license license:gpl3+)))
459
460 (define dosfstools/static
461 (static-package
462 (package (inherit dosfstools))))
463
464 (define-public fatfsck/static
465 (package
466 (name "fatfsck-static")
467 (version (package-version dosfstools))
468 (build-system trivial-build-system)
469 (source #f)
470 (arguments
471 `(#:modules ((guix build utils))
472 #:builder
473 (begin
474 (use-modules (guix build utils))
475 (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
476 "/sbin"))
477 (exe "fsck.fat")
478 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
479 (mkdir-p bin)
480 (with-directory-excursion bin
481 (copy-file (string-append src "/" exe) exe)
482 (remove-store-references exe)
483 (chmod exe #o555)
484 ;; Add fsck.vfat symlink to match the Linux driver name.
485 (symlink exe "fsck.vfat")
486 #t)))))
487 (inputs `(("dosfstools" ,dosfstools/static)))
488 (home-page (package-home-page dosfstools))
489 (synopsis "Statically linked fsck.fat from dosfstools")
490 (description "This package provides a statically-linked @command{fsck.fat}
491 and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
492 (license (package-license dosfstools))))
493
494 (define-public sdparm
495 (package
496 (name "sdparm")
497 (version "1.11")
498 (source
499 (origin
500 (method url-fetch)
501 (uri (string-append "http://sg.danny.cz/sg/p/"
502 "sdparm-" version ".tar.xz"))
503 (sha256
504 (base32 "1nqjc4w2w47zavcbf5xmm53x1zbwgljaw1lpajcdi537cgy32fa8"))))
505 (build-system gnu-build-system)
506 (home-page "http://sg.danny.cz/sg/sdparm.html")
507 (synopsis "Provide access to SCSI device parameters")
508 (description
509 "Sdparm reads and modifies SCSI device parameters. These devices can be
510 SCSI disks, in which case the role of @command{sdparm} is similar to its
511 namesake: the @command{hdparm} utility originally designed for ATA disks.
512 However, @command{sdparm} can be used to access parameters on any device that
513 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
514 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
515 also send commands associated with starting and stopping the media, loading
516 and unloading removable media and some other housekeeping functions.")
517 (license license:bsd-3)))
518
519 (define-public idle3-tools
520 (package
521 (name "idle3-tools")
522 (version "0.9.1")
523 (source
524 (origin
525 (method url-fetch)
526 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
527 version ".tgz"))
528 (sha256
529 (base32
530 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
531 (build-system gnu-build-system)
532 (arguments
533 `(#:tests? #f ;no test suite
534 #:phases
535 (modify-phases %standard-phases
536 (delete 'configure))
537 #:make-flags (list "CC=gcc"
538 (string-append "manprefix=")
539 (string-append "DESTDIR="
540 (assoc-ref %outputs "out")))))
541 (home-page "http://idle3-tools.sourceforge.net")
542 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
543 (description
544 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
545 present in many Western Digital hard drives. This timer is part of the
546 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
547 the default timer setting is not well suited to Linux or other *nix systems,
548 and can dramatically shorten the lifespan of the drive if left unchecked.")
549 (license license:gpl3+)))
550
551 (define-public gparted
552 (package
553 (name "gparted")
554 (version "1.2.0")
555 (source
556 (origin
557 (method url-fetch)
558 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
559 version "/gparted-" version ".tar.gz"))
560 (sha256
561 (base32 "06f72hqx5jf2irzsmi7lgpxxj38ncixh0acb4307wyjd4mfp343c"))))
562 (build-system glib-or-gtk-build-system)
563 (arguments
564 ;; Tests require access to paths outside the build container, such
565 ;; as '/dev/disk/by-id'
566 `(#:tests? #f))
567 (inputs
568 `(("util-linux" ,util-linux "lib")
569 ("parted" ,parted)
570 ("glib" ,glib)
571 ("gtkmm" ,gtkmm)
572 ("libxml2" ,libxml2)))
573 (native-inputs
574 `(("intltool" ,intltool)
575 ("itstool" ,itstool)
576 ("lvm2" ,lvm2) ; for tests
577 ("yelp-tools" ,yelp-tools)
578 ("pkg-config" ,pkg-config)))
579 (home-page "https://gparted.org/")
580 (synopsis "Partition editor to graphically manage disk partitions")
581 (description "GParted is a GNOME partition editor for creating,
582 reorganizing, and deleting disk partitions. It uses libparted from the parted
583 project to detect and manipulate partition tables. Optional file system tools
584 permit managing file systems not included in libparted.")
585 ;; The home page says GPLv2, but the source code says GPLv2+.
586 (license license:gpl2+)))
587
588 (define-public pydf
589 (package
590 (name "pydf")
591 (version "12")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (pypi-uri "pydf" version))
596 (sha256
597 (base32
598 "0f8ly8xyp93i2hm9c0qjqd4y86nz73axw2f09z01mszwmg1sfivz"))))
599 (build-system python-build-system)
600 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/pydf/")
601 (synopsis "Colourised @command{df} clone")
602 (description "All-singing, all-dancing, fully colourised @command{df} clone
603 written in Python. It displays the amount of disk space available on the
604 mounted file systems, using different colours for different types of file
605 systems. Output format is completely customizable.")
606 (license license:public-domain)))
607
608 (define-public f3
609 (package
610 (name "f3")
611 (version "8.0")
612 (source
613 (origin
614 (method git-fetch)
615 (uri (git-reference
616 (url "https://github.com/AltraMayor/f3")
617 (commit (string-append "v" version))))
618 (file-name (git-file-name name version))
619 (sha256
620 (base32 "17l5vspfcgfbkqg7bakp3gql29yb05gzawm8n3im30ilzdr53678"))))
621 (build-system gnu-build-system)
622 (arguments
623 `(#:tests? #f ; no check target
624 #:make-flags (list (string-append "CC=" ,(cc-for-target))
625 (string-append "PREFIX=" %output))
626 #:phases
627 (modify-phases %standard-phases
628 (delete 'configure) ; no configure script
629 (add-after 'build 'build-extra
630 (lambda* (#:key make-flags #:allow-other-keys)
631 (apply invoke "make" "extra" make-flags)))
632 (add-after 'build 'install-extra
633 (lambda* (#:key make-flags #:allow-other-keys)
634 (apply invoke "make" "install-extra" make-flags))))))
635 (inputs
636 `(("eudev" ,eudev)
637 ("parted" ,parted)))
638 (home-page "http://oss.digirati.com.br/f3/")
639 (synopsis "Test real capacity of flash memory cards and such.")
640 (description "F3 (Fight Flash Fraud or Fight Fake Flash) tests the full
641 capacity of a flash card (flash drive, flash disk, pendrive). F3 writes to
642 the card and then checks if can read it. It will assure you haven't been sold
643 a card with a smaller capacity than stated.")
644 (license license:gpl3+)))
645
646 (define-public python-parted
647 (package
648 (name "python-parted")
649 (version "3.11.7")
650 (source
651 (origin
652 (method git-fetch)
653 (uri (git-reference
654 (url "https://github.com/dcantrell/pyparted")
655 (commit (string-append "v" version))))
656 (file-name (git-file-name name version))
657 (sha256
658 (base32 "01193fmkss9icjvqpw85szpk8ld1pnha7p9kqm7mpwk6rc6gi2m3"))))
659 (build-system python-build-system)
660 (arguments
661 `(#:phases
662 (modify-phases %standard-phases
663 (delete 'check)
664 (add-after 'install 'check
665 (lambda* (#:key outputs inputs #:allow-other-keys)
666 (add-installed-pythonpath inputs outputs)
667 ;; See <https://github.com/dcantrell/pyparted/issues/47>.
668 (substitute* "tests/test__ped_ped.py"
669 (("\"/tmp/temp-device-\"") "self.path"))
670 (invoke "python" "-m" "unittest" "discover" "-v")
671 #t)))))
672 (native-inputs
673 `(("e2fsprogs" ,e2fsprogs)
674 ("pkg-config" ,pkg-config)))
675 (propagated-inputs
676 `(("python-six" ,python-six)))
677 (inputs
678 `(("parted" ,parted)))
679 (home-page "https://github.com/dcantrell/pyparted")
680 (synopsis "Parted bindings for Python")
681 (description "This package provides @code{parted} bindings for Python.")
682 (license license:gpl2+)))
683
684 (define-public duperemove
685 (package
686 (name "duperemove")
687 (version "0.11.2")
688 (source
689 (origin
690 (method git-fetch)
691 (uri (git-reference
692 (url "https://github.com/markfasheh/duperemove")
693 (commit (string-append "v" version))))
694 (sha256
695 (base32 "1a87mka2sfzhbch2jip6wlvvs0glxq9lqwmyrp359d1rmwwmqiw9"))
696 (file-name (git-file-name name version))))
697 (build-system gnu-build-system)
698 (native-inputs
699 `(("pkg-config" ,pkg-config)))
700 (inputs
701 `(("glib" ,glib)
702 ("sqlite" ,sqlite)))
703 (arguments
704 `(#:tests? #f ; no test suite
705 #:phases
706 (modify-phases %standard-phases
707 (delete 'configure)) ; no configure script
708 #:make-flags (list (string-append "PREFIX=" %output)
709 (string-append "CC=" ,(cc-for-target))
710 ;; Set to <next release>dev by default.
711 (string-append "VER=" ,version))))
712 (home-page "https://github.com/markfasheh/duperemove")
713 (synopsis "Tools for de-duplicating file system data")
714 (description "Duperemove is a simple tool for finding duplicated extents
715 and submitting them for deduplication. When given a list of files it will
716 hash their contents on a block by block basis and compare those hashes to each
717 other, finding and categorizing blocks that match each other. When given the
718 @option{-d} option, duperemove will submit those extents for deduplication
719 using the Linux kernel extent-same @code{ioctl}.
720
721 Duperemove can store the hashes it computes in a @dfn{hash file}. If given an
722 existing hash file, duperemove will only compute hashes for those files which
723 have changed since the last run. Thus you can run duperemove repeatedly on
724 your data as it changes, without having to re-checksum unchanged data.
725
726 Duperemove can also take input from the @command{fdupes} program.")
727 (license license:gpl2)))
728
729 (define-public ranger
730 (package
731 (name "ranger")
732 (version "1.9.3")
733 (source (origin
734 (method url-fetch)
735 (uri (string-append "https://ranger.github.io/"
736 "ranger-" version ".tar.gz"))
737 (sha256
738 (base32
739 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
740 (build-system python-build-system)
741 (inputs
742 `(("w3m" ,w3m)))
743 (native-inputs
744 `(("which" ,which)
745
746 ;; For tests.
747 ("python-pytest" ,python-pytest)))
748 (arguments
749 '( ;; The 'test' target runs developer tools like pylint, which fail.
750 #:test-target "test_pytest"
751 #:phases
752 (modify-phases %standard-phases
753 (add-after 'configure 'wrap-program
754 ;; Tell 'ranger' where 'w3mimgdisplay' is.
755 (lambda* (#:key inputs outputs #:allow-other-keys)
756 (let* ((out (assoc-ref outputs "out"))
757 (ranger (string-append out "/bin/ranger"))
758 (w3m (assoc-ref inputs "w3m"))
759 (w3mimgdisplay (string-append w3m
760 "/libexec/w3m/w3mimgdisplay")))
761 (wrap-program ranger
762 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
763 #t)))
764 (replace 'check
765 ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
766 (lambda* (#:key test-target #:allow-other-keys)
767 (invoke "make" test-target))))))
768 (home-page "https://ranger.github.io/")
769 (synopsis "Console file manager")
770 (description "ranger is a console file manager with Vi key bindings. It
771 provides a minimalistic and nice curses interface with a view on the directory
772 hierarchy. It ships with @code{rifle}, a file launcher that is good at
773 automatically finding out which program to use for what file type.")
774 (license license:gpl3)))
775
776 (define-public volume-key
777 (package
778 (name "volume-key")
779 (version "0.3.12")
780 (source (origin
781 (method url-fetch)
782 (uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
783 version ".tar.xz"))
784 (sha256
785 (base32
786 "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
787 (build-system gnu-build-system)
788 (native-inputs
789 `(("pkg-config" ,pkg-config)
790 ("swig" ,swig)
791 ("python" ,python-3))) ; used to generate the Python bindings
792 (inputs
793 `(("cryptsetup" ,cryptsetup)
794 ("nss" ,nss)
795 ("libblkid" ,util-linux "lib")
796 ("lvm2" ,lvm2) ; for "-ldevmapper"
797 ("glib" ,glib)
798 ("gpgme" ,gpgme)))
799 (arguments
800 `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
801 #:phases
802 (modify-phases %standard-phases
803 (add-before 'configure 'patch-python.h-path
804 (lambda* (#:key inputs #:allow-other-keys)
805 (let ((python (assoc-ref inputs "python")))
806 (substitute* "Makefile.in"
807 (("/usr/include/python") (string-append python "/include/python")))
808 #t))))))
809 (home-page "https://pagure.io/volume_key")
810 (synopsis "Manipulate storage volume encryption keys")
811 (description
812 "This package provides a library for manipulating storage volume
813 encryption keys and storing them separately from volumes to handle forgotten
814 passphrases.")
815 (license license:gpl2)))
816
817 (define-public ndctl
818 (package
819 (name "ndctl")
820 (version "71.1")
821 (source (origin
822 (method git-fetch)
823 (uri (git-reference
824 (url "https://github.com/pmem/ndctl")
825 (commit (string-append "v" version))))
826 (file-name (git-file-name name version))
827 (sha256
828 (base32
829 "1vi61bm9wyawklswh9mj9zdp28ar7r97qckwnhgiyila73fb3jx2"))))
830 (build-system gnu-build-system)
831 (native-inputs
832 `(("asciidoc" ,asciidoc)
833 ("automake" ,automake)
834 ("autoconf" ,autoconf)
835 ("bash-completion" ,bash-completion)
836 ("docbook-xsl" ,docbook-xsl)
837 ("libtool" ,libtool)
838 ("libxml2" ,libxml2)
839 ("pkg-config" ,pkg-config)
840 ("xmlto" ,xmlto)
841 ;; Required for offline docbook generation.
842 ("which" ,which)))
843 (inputs
844 `(("eudev" ,eudev)
845 ("json-c" ,json-c)
846 ("keyutils" ,keyutils)
847 ("kmod" ,kmod)
848 ("util-linux" ,util-linux "lib")))
849 (arguments
850 `(#:configure-flags
851 (list "--disable-asciidoctor" ; use docbook-xsl instead
852 "--without-systemd")
853 #:phases
854 (modify-phases %standard-phases
855 (add-after 'unpack 'patch-FHS-file-names
856 (lambda _
857 (substitute* "git-version-gen"
858 (("/bin/sh") (which "sh")))
859 (substitute* "git-version"
860 (("/bin/bash") (which "bash")))
861 #t)))
862 #:make-flags
863 (let ((out (assoc-ref %outputs "out")))
864 (list (string-append "BASH_COMPLETION_DIR=" out
865 "/share/bash-completion/completions")))))
866 (home-page "https://github.com/pmem/ndctl")
867 (synopsis "Manage the non-volatile memory device sub-system in the Linux kernel")
868 (description
869 "This package provides a utility library for managing the
870 libnvdimm (non-volatile memory device) sub-system in the Linux kernel.")
871 ;; COPYING says LGPL2.1, but many source files are GPL2 so that's
872 ;; the effective license. Note that some files under ccan/ are
873 ;; covered by BSD-3 or public domain, see the individual folders.
874 (license license:gpl2)))
875
876 (define-public dmraid
877 (package
878 (name "dmraid")
879 (version "1.0.0.rc16-3")
880 (source (origin
881 (method url-fetch)
882 (uri (string-append "https://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-"
883 version ".tar.bz2"))
884 (sha256
885 (base32
886 "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
887 (build-system gnu-build-system)
888 (inputs `(("lvm2" ,lvm2)))
889 (native-inputs `(("which" ,which)))
890 (arguments
891 `(#:tests? #f ; No tests.
892 ;; Prevent a race condition where some target would attempt to link
893 ;; libdmraid.so before it had been built as reported in
894 ;; <https://bugs.gnu.org/31999#187>.
895 #:parallel-build? #f
896 #:phases (modify-phases %standard-phases
897 (add-before 'configure 'change-directory
898 (lambda _
899 (chdir (string-append ,version "/dmraid"))
900 (substitute* "make.tmpl.in"
901 (("/bin/sh") (which "sh")))
902 #t)))
903 #:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
904 ;; find libdmraid.so.
905 (string-append "LDFLAGS=-Wl,-rpath="
906 (assoc-ref %outputs "out")
907 "/lib"))))
908 (home-page "https://people.redhat.com/~heinzm/sw/dmraid/")
909 (synopsis "Device mapper RAID interface")
910 (description
911 "This software supports RAID device discovery, RAID set activation, creation,
912 removal, rebuild and display of properties for ATARAID/DDF1 metadata.
913
914 @command{dmraid} uses @file{libdevmapper} and the device-mapper kernel runtime
915 to create devices with respective mappings for the ATARAID sets discovered.")
916 (license license:gpl2+)))
917
918 (define-public libblockdev
919 (package
920 (name "libblockdev")
921 (version "2.25")
922 (source (origin
923 (method url-fetch)
924 (uri (string-append "https://github.com/storaged-project/"
925 "libblockdev/releases/download/"
926 version "-1/libblockdev-" version ".tar.gz"))
927 (sha256
928 (base32
929 "0s0nazkpzpn4an00qghjkk9n7gdm5a8dqfr5hfnlk5mk5lma8njm"))))
930 (build-system gnu-build-system)
931 (arguments
932 `(#:phases
933 (modify-phases %standard-phases
934 (add-after 'unpack 'patch-configuration-directory
935 (lambda* (#:key outputs #:allow-other-keys)
936 (let ((out (assoc-ref outputs "out")))
937 (substitute* "src/lib/blockdev.c"
938 (("/etc/libblockdev/conf.d/" path) (string-append out path)))))))))
939 (native-inputs
940 `(("gobject-introspection" ,gobject-introspection)
941 ("pkg-config" ,pkg-config)
942 ("python" ,python-wrapper)
943 ("util-linux" ,util-linux)))
944 (inputs
945 `(("btrfs-progs" ,btrfs-progs)
946 ("cryptsetup" ,cryptsetup)
947 ("dosfstools" ,dosfstools)
948 ("dmraid" ,dmraid)
949 ("eudev" ,eudev)
950 ("glib" ,glib)
951 ("kmod" ,kmod)
952 ("libbytesize" ,libbytesize)
953 ("libyaml" ,libyaml)
954 ("lvm2" ,lvm2)
955 ("mdadm" ,mdadm)
956 ("ndctl" ,ndctl)
957 ("nss" ,nss)
958 ("parted" ,parted)
959 ("volume-key" ,volume-key)
960 ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
961 ))
962 (home-page "https://github.com/storaged-project/libblockdev")
963 (synopsis "Library for manipulating block devices")
964 (description
965 "libblockdev is a C library supporting GObject introspection for
966 manipulation of block devices. It has a plugin-based architecture where each
967 technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
968 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
969 LVM D-Bus API).")
970 (license license:lgpl2.1+)))
971
972 (define-public rmlint
973 (package
974 (name "rmlint")
975 (version "2.10.1")
976 (source (origin
977 (method git-fetch)
978 (uri (git-reference
979 (url "https://github.com/sahib/rmlint")
980 (commit (string-append "v" version))))
981 (file-name (git-file-name name version))
982 (sha256
983 (base32
984 "15xfkcw1bkfyf3z8kl23k3rlv702m0h7ghqxvhniynvlwbgh6j2x"))))
985 (build-system scons-build-system)
986 (arguments
987 `(#:scons ,scons-python2
988 #:scons-flags (list (string-append "--prefix=" %output)
989 (string-append "--actual-prefix=" %output))
990 #:tests? #f ; No tests?
991 #:phases
992 (modify-phases %standard-phases
993 (add-after 'unpack 'scons-propagate-environment
994 (lambda* (#:key inputs #:allow-other-keys)
995 ;; TODO: `rmlint --gui` fails with
996 ;; "Failed to load shredder: No module named 'shredder'".
997 ;; The GUI might also need extra dependencies, such as
998 ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
999 (substitute* "lib/cmdline.c"
1000 (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
1001 (string-append
1002 "const char *commands[] = {\""
1003 (assoc-ref inputs "python") "/bin/python"
1004 "\", \"python\", NULL};")))
1005 ;; By design, SCons does not, by default, propagate
1006 ;; environment variables to subprocesses. See:
1007 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
1008 ;; Here, we modify the SConstruct file to arrange for
1009 ;; environment variables to be propagated.
1010 (substitute* "SConstruct"
1011 (("^env = Environment\\(.*\\)" all)
1012 (string-append
1013 all
1014 "\nenv['ENV']=os.environ"))))))))
1015 (native-inputs
1016 `(("pkg-config" ,pkg-config)
1017 ("glib:bin" ,glib "bin")
1018 ("python-sphinx" ,python-sphinx)))
1019 (inputs
1020 `(("python" ,python-wrapper)
1021 ("glib" ,glib)
1022 ("libelf" ,libelf)
1023 ("elfutils" ,elfutils)
1024 ("json-glib" ,json-glib)
1025 ("libblkid" ,util-linux "lib")))
1026 (home-page "https://rmlint.rtfd.org")
1027 (synopsis "Remove duplicates and other lint from the file system")
1028 (description "@command{rmlint} finds space waste and other broken things
1029 on your file system and offers to remove it. @command{rmlint} can find:
1030
1031 @itemize
1032 @item duplicate files and duplicate directories,
1033 @item non-stripped binaries (i.e. binaries with debug symbols),
1034 @item broken symbolic links,
1035 @item empty files and directories,
1036 @item files with broken user and/or group ID.
1037 @end itemize\n")
1038 (license license:gpl3+)))
1039
1040 (define-public lf
1041 (package
1042 (name "lf")
1043 (version "13")
1044 (source (origin
1045 (method git-fetch)
1046 (uri (git-reference
1047 (url "https://github.com/gokcehan/lf")
1048 (commit (string-append "r" version))))
1049 (file-name (git-file-name name version))
1050 (sha256
1051 (base32
1052 "1ld3q75v8rvp169w5p85z1vznqs9bhck6bm2f6fykxx16hmpb6ga"))))
1053 (build-system go-build-system)
1054 (native-inputs
1055 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
1056 ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
1057 (arguments
1058 `(#:import-path "github.com/gokcehan/lf"))
1059 (home-page "https://github.com/gokcehan/lf")
1060 (synopsis "Console file browser similar to Ranger")
1061 (description "lf (as in \"list files\") is a terminal file manager
1062 written in Go. It is heavily inspired by ranger with some missing and
1063 extra features. Some of the missing features are deliberately omitted
1064 since they are better handled by external tools.")
1065 (license license:expat)))
1066
1067 (define-public xfe
1068 (package
1069 (name "xfe")
1070 (version "1.43.2")
1071 (source
1072 (origin
1073 (method url-fetch)
1074 (uri
1075 (string-append "mirror://sourceforge/xfe/xfe/" version "/"
1076 "xfe-" version ".tar.gz"))
1077 (sha256
1078 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs"))))
1079 (build-system gnu-build-system)
1080 (arguments
1081 `(#:phases
1082 (modify-phases %standard-phases
1083 (add-after 'unpack 'patch-bin-dirs
1084 (lambda* (#:key inputs #:allow-other-keys)
1085 (let* ((bash (assoc-ref inputs "bash"))
1086 (coreutils (assoc-ref inputs "coreutils"))
1087 (findutils (assoc-ref inputs "findutils"))
1088 (file-prog (assoc-ref inputs "file")))
1089 (with-directory-excursion "src"
1090 (substitute* '("FilePanel.cpp" "help.h" "SearchPanel.cpp"
1091 "startupnotification.cpp" "xfeutils.cpp"
1092 "../st/config.h")
1093 (("/bin/sh" file) (string-append bash file))
1094 (("/bin/ls" file) (string-append coreutils file))
1095 (("/usr(/bin/du)" _ file) (string-append coreutils file))
1096 (("/usr(/bin/sort)" _ file) (string-append coreutils file))
1097 (("/usr(/bin/cut)" _ file) (string-append coreutils file))
1098 (("/usr(/bin/xargs)" _ file) (string-append findutils file))
1099 (("/usr(/bin/file)" _ file) (string-append file-prog file))))
1100 #t)))
1101 (add-after 'unpack 'patch-share-dirs
1102 (lambda* (#:key outputs #:allow-other-keys)
1103 (let* ((out (assoc-ref outputs "out"))
1104 (share (string-append out "/share"))
1105 (xfe (string-append share "/xfe")))
1106 (with-directory-excursion "src"
1107 (substitute* '("foxhacks.cpp" "help.h" "xfedefs.h"
1108 "XFileExplorer.cpp")
1109 (("/(usr|opt)(/local)?/share") share)
1110 (("~/.config/xfe") xfe)))
1111 #t))))))
1112 (native-inputs
1113 `(("intltool" ,intltool)
1114 ("pkg-config" ,pkg-config)))
1115 (inputs
1116 `(("bash" ,bash)
1117 ("coreutils" ,coreutils)
1118 ("file" ,file)
1119 ("findutils" ,findutils)
1120 ("fox" ,fox)
1121 ("freetype" ,freetype)
1122 ("x11" ,libx11)
1123 ("xcb" ,libxcb)
1124 ("xcb-util" ,xcb-util)
1125 ("xft" ,libxft)
1126 ("xrandr" ,libxrandr)))
1127 (synopsis "File Manager for X-Based Graphical Systems")
1128 (description "XFE (X File Explorer) is a file manager for X. It is based on
1129 the popular but discontinued, X Win Commander. It aims to be the file manager
1130 of choice for all light thinking Unix addicts!")
1131 (home-page "http://roland65.free.fr/xfe/")
1132 (license license:gpl2+)))
1133
1134 (define-public hddtemp
1135 (package
1136 (name "hddtemp")
1137 (version "0.3-beta15")
1138 (source (origin
1139 (method url-fetch)
1140 (uri (string-append "mirror://savannah/hddtemp/hddtemp-"
1141 version
1142 ".tar.bz2"))
1143 (sha256
1144 (base32
1145 "0nzgg4nl8zm9023wp4dg007z6x3ir60rwbcapr9ks2al81c431b1"))))
1146 (build-system gnu-build-system)
1147 (arguments
1148 `(#:configure-flags (list (string-append
1149 "--with-db-path="
1150 (assoc-ref %outputs "out")
1151 "/share/hddtemp/hddtemp.db"))
1152 #:phases
1153 (modify-phases %standard-phases
1154 (add-after 'install 'install-db
1155 (lambda* (#:key inputs outputs #:allow-other-keys)
1156 (let ((target (string-append (assoc-ref outputs "out")
1157 "/share/hddtemp/hddtemp.db")))
1158 (mkdir-p (dirname target))
1159 (copy-file (assoc-ref inputs "db") target)))))))
1160 (inputs
1161 `(("db" ,(origin
1162 (method url-fetch)
1163 (uri "mirror://savannah/hddtemp/hddtemp.db")
1164 (sha256
1165 (base32 "1fr6qgns6qv7cr40lic5yqwkkc7yjmmgx8j0z6d93csg3smzhhya"))))))
1166 (home-page "https://savannah.nongnu.org/projects/hddtemp/")
1167 (synopsis "Report the temperature of hard drives from S.M.A.R.T. information")
1168 (description "@command{hddtemp} is a small utility that gives you the
1169 temperature of your hard drive by reading S.M.A.R.T. information (for drives
1170 that support this feature).")
1171 (license license:gpl2+)))
1172
1173 (define-public memkind
1174 (package
1175 (name "memkind")
1176 (version "1.11.0")
1177 (source (origin
1178 (method git-fetch)
1179 (uri (git-reference
1180 (url "https://github.com/memkind/memkind")
1181 (commit (string-append "v" version))))
1182 (file-name (git-file-name name version))
1183 (sha256
1184 (base32
1185 "0w5hws12l167mbr4n6a6fl0mhf8mci61fsn55lh2cxz33f7q8n2x"))))
1186 (build-system gnu-build-system)
1187 (inputs
1188 `(;; memkind patched jemalloc to add je_arenalookupx,
1189 ;; je_check_reallocatex--i.e. they forked jemalloc.
1190 ;("jemalloc" ,jemalloc)
1191 ("ndctl" ,ndctl)
1192 ("numactl" ,numactl)))
1193 (native-inputs
1194 `(("autoconf" ,autoconf)
1195 ("automake" ,automake)
1196 ("libtool" ,libtool)))
1197 (arguments
1198 `(#:configure-flags
1199 (list (string-append "--docdir=" (assoc-ref %outputs "out")
1200 "/share/doc/" ,name "-" ,version))
1201 #:tests? #f ; Tests require a NUMA-enabled system.
1202 #:phases
1203 (modify-phases %standard-phases
1204 (add-before 'build 'autogen-jemalloc
1205 (lambda _
1206 (with-directory-excursion "jemalloc"
1207 (substitute* "Makefile.in"
1208 (("/bin/sh") (which "sh")))
1209 (invoke "autoconf")
1210 (substitute* "configure"
1211 (("/bin/sh") (which "sh"))))
1212 #t)))))
1213 (home-page "https://github.com/memkind/memkind")
1214 (synopsis "Heap manager with memory kinds (for NUMA)")
1215 (description "This package provides a user-extensible heap manager
1216 built on top of jemalloc which enables control of memory characteristics
1217 and a partitioning of the heap between kinds of memory (for NUMA).")
1218 (license license:bsd-3)))