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 Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>
6 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages disk)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages gettext)
29 #:use-module (gnu packages linux)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages python)
32 #:use-module (gnu packages readline)
33 #:use-module (gnu packages guile)
34 #:use-module (gnu packages compression))
42 (uri (string-append "mirror://gnu/parted/parted-"
46 "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"))))
47 (build-system gnu-build-system)
50 (modify-phases %standard-phases
52 'unpack 'fix-locales-and-python
53 (lambda* (#:key inputs #:allow-other-keys)
54 (substitute* "tests/t0251-gpt-unicode.sh"
55 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
56 (substitute* "tests/msdos-overlap"
57 (("/usr/bin/python") (which "python"))))))))
60 ("readline" ,readline)
61 ("util-linux" ,util-linux)))
63 `(("gettext" ,gnu-gettext)
66 ("python" ,python-2)))
67 (home-page "https://www.gnu.org/software/parted/")
68 (synopsis "Disk partition editor")
70 "GNU Parted is a package for creating and manipulating disk partition
71 tables. It includes a library and command-line utility.")
81 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
85 "04nd7civ561x2lwcmxhsqbprml3178jfc58fy1v7hzqg5k4nbhy3"))))
86 (build-system gnu-build-system)
88 `(("gettext" ,gnu-gettext)
90 ("util-linux" ,util-linux)
92 (home-page "https://www.gnu.org/software/fdisk/")
93 (synopsis "Low-level disk partitioning and formatting")
95 "GNU fdisk provides a GNU version of the common disk partitioning tool
96 fdisk. fdisk is used for the creation and manipulation of disk partition
97 tables, and it understands a variety of different formats.")
100 (define-public ddrescue
107 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
111 "1b71hb42lh33y9843nd1mxlwkk9qh9ajvnz6ivzd1jq9lav4x7ph"))))
112 (build-system gnu-build-system)
113 (home-page "http://www.gnu.org/software/ddrescue/ddrescue.html")
114 (synopsis "Data recovery utility")
115 (native-inputs `(("lzip" ,lzip)))
117 "GNU ddrescue is a fully automated data recovery tool. It copies data
118 from one file to another, working to rescue data in case of read errors. The
119 program also includes a tool for manipulating its log files, which are used
120 to recover data more efficiently by only reading the necessary blocks.")
123 (define-public dosfstools
130 (uri (string-append "https://github.com/" name "/" name
131 "/releases/download/v" version "/"
132 name "-" version ".tar.xz"))
135 "1qkya6lald91c8nsf29jwnk0k5v42wlj24gacfdp3wpc8hq935gf"))))
136 (build-system gnu-build-system)
138 `(#:make-flags (list (string-append "PREFIX=" %output)
140 #:tests? #f ;no tests
141 #:phases (modify-phases %standard-phases
142 (delete 'configure))))
143 (home-page "https://github.com/dosfstools/dosfstools")
144 (synopsis "Utilities for making and checking MS-DOS FAT filesystems")
146 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
147 which respectively make and check MS-DOS FAT filesystems.")
150 (define-public sdparm
157 (uri (string-append "http://sg.danny.cz/sg/p/"
158 name "-" version ".tar.xz"))
161 "0jakqyjwi72zqjzss04bally0xl0lc4710mx8da08vpmir1hfphg"))))
162 (build-system gnu-build-system)
163 (home-page "http://sg.danny.cz/sg/sdparm.html")
164 (synopsis "Provide access to SCSI device parameters")
166 "Sdparm reads and modifies SCSI device parameters. These devices can be
167 SCSI disks, in which case the role of @command{sdparm} is similar to its
168 namesake: the @command{hdparm} utility originally designed for ATA disks.
169 However, @command{sdparm} can be used to access parameters on any device that
170 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
171 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
172 also send commands associated with starting and stopping the media, loading
173 and unloading removable media and some other housekeeping functions.")
176 (define-public idle3-tools
183 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
187 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
188 (build-system gnu-build-system)
190 `(#:tests? #f ;no test suite
192 (modify-phases %standard-phases
194 #:make-flags (list "CC=gcc"
195 (string-append "manprefix=")
196 (string-append "DESTDIR="
197 (assoc-ref %outputs "out")))))
198 (home-page "http://idle3-tools.sourceforge.net")
199 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
201 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
202 present in many Western Digital hard drives. This timer is part of the
203 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
204 the default timer setting is not well suited to Linux or other *nix systems,
205 and can dramatically shorten the lifespan of the drive if left unchecked.")