27ab7a698bbd8ae5f1a4a2f683f53e54b249c6e8
[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 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages disk)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages docbook)
33 #:use-module (gnu packages gettext)
34 #:use-module (gnu packages glib)
35 #:use-module (gnu packages gtk)
36 #:use-module (gnu packages gnome)
37 #:use-module (gnu packages linux)
38 #:use-module (gnu packages ncurses)
39 #:use-module (gnu packages perl)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages popt)
42 #:use-module (gnu packages python)
43 #:use-module (gnu packages readline)
44 #:use-module (gnu packages guile)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages xml))
47
48 (define-public parted
49 (package
50 (name "parted")
51 (version "3.2")
52 (source (origin
53 (method url-fetch)
54 (uri (string-append "mirror://gnu/parted/parted-"
55 version ".tar.xz"))
56 (sha256
57 (base32
58 "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"))))
59 (build-system gnu-build-system)
60 (arguments
61 `(#:phases
62 (modify-phases %standard-phases
63 (add-after
64 'unpack 'fix-locales-and-python
65 (lambda* (#:key inputs #:allow-other-keys)
66 (substitute* "tests/t0251-gpt-unicode.sh"
67 (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
68 (substitute* "tests/msdos-overlap"
69 (("/usr/bin/python") (which "python"))))))))
70 (inputs
71 `(("lvm2" ,lvm2)
72 ("readline" ,readline)
73 ("util-linux" ,util-linux)))
74 (native-inputs
75 `(("gettext" ,gnu-gettext)
76 ;; For the tests.
77 ("perl" ,perl)
78 ("python" ,python-2)))
79 (home-page "https://www.gnu.org/software/parted/")
80 (synopsis "Disk partition editor")
81 (description
82 "GNU Parted is a package for creating and manipulating disk partition
83 tables. It includes a library and command-line utility.")
84 (license license:gpl3+)))
85
86 (define-public fdisk
87 (package
88 (name "fdisk")
89 (version "2.0.0a")
90 (source
91 (origin
92 (method url-fetch)
93 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
94 version ".tar.gz"))
95 (sha256
96 (base32
97 "04nd7civ561x2lwcmxhsqbprml3178jfc58fy1v7hzqg5k4nbhy3"))))
98 (build-system gnu-build-system)
99 (inputs
100 `(("gettext" ,gnu-gettext)
101 ("guile" ,guile-1.8)
102 ("util-linux" ,util-linux)
103 ("parted" ,parted)))
104 (home-page "https://www.gnu.org/software/fdisk/")
105 (synopsis "Low-level disk partitioning and formatting")
106 (description
107 "GNU fdisk provides a GNU version of the common disk partitioning tool
108 fdisk. fdisk is used for the creation and manipulation of disk partition
109 tables, and it understands a variety of different formats.")
110 (license license:gpl3+)))
111
112 (define-public gptfdisk
113 (package
114 (name "gptfdisk")
115 (version "1.0.1")
116 (source
117 (origin
118 (method url-fetch)
119 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
120 version "/" name "-" version ".tar.gz"))
121 (sha256
122 (base32
123 "1izazbyv5n2d81qdym77i8mg9m870hiydmq4d0s51npx5vp8lk46"))))
124 (build-system gnu-build-system)
125 (inputs
126 `(("gettext" ,gnu-gettext)
127 ("ncurses" ,ncurses)
128 ("popt" ,popt)
129 ("util-linux" ,util-linux))) ; libuuid
130 (arguments
131 `(#:test-target "test"
132 #:phases
133 (modify-phases %standard-phases
134 ;; no configure script
135 (delete 'configure)
136 ;; no install target
137 (replace 'install
138 (lambda* (#:key outputs #:allow-other-keys)
139 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
140 (install-file "gdisk" bin)
141 (install-file "sgdisk" bin)
142 (install-file "cgdisk" bin)
143 (install-file "fixparts" bin)))))))
144 (home-page "http://www.rodsbooks.com/gdisk/")
145 (synopsis "Low-level GPT disk partitioning and formatting")
146 (description "GPT fdisk (aka gdisk) is a text-mode partitioning tool that
147 works on Globally Unique Identifier (GUID) Partition Table (GPT) disks, rather
148 than on the more common (through 2009) Master Boot Record (MBR) partition
149 tables.")
150 (license license:gpl2)))
151
152 (define-public ddrescue
153 (package
154 (name "ddrescue")
155 (version "1.21")
156 (source
157 (origin
158 (method url-fetch)
159 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
160 version ".tar.lz"))
161 (sha256
162 (base32
163 "1b71hb42lh33y9843nd1mxlwkk9qh9ajvnz6ivzd1jq9lav4x7ph"))))
164 (build-system gnu-build-system)
165 (home-page "http://www.gnu.org/software/ddrescue/ddrescue.html")
166 (synopsis "Data recovery utility")
167 (native-inputs `(("lzip" ,lzip)))
168 (description
169 "GNU ddrescue is a fully automated data recovery tool. It copies data
170 from one file to another, working to rescue data in case of read errors. The
171 program also includes a tool for manipulating its log files, which are used
172 to recover data more efficiently by only reading the necessary blocks.")
173 (license license:gpl3+)))
174
175 (define-public dosfstools
176 (package
177 (name "dosfstools")
178 (version "4.0")
179 (source
180 (origin
181 (method url-fetch)
182 (uri (string-append "https://github.com/" name "/" name
183 "/releases/download/v" version "/"
184 name "-" version ".tar.xz"))
185 (sha256
186 (base32
187 "1bvxbv1w6vhbx0nx7ygp700wq5k2hjv0hm7w0kz1x7amaf4p6dwh"))))
188 (build-system gnu-build-system)
189 (arguments
190 `(#:make-flags (list (string-append "PREFIX=" %output)
191 "CC=gcc")
192 #:tests? #f)) ;no tests
193 (home-page "https://github.com/dosfstools/dosfstools")
194 (synopsis "Utilities for making and checking MS-DOS FAT filesystems")
195 (description
196 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
197 which respectively make and check MS-DOS FAT filesystems.")
198 (license license:gpl3+)))
199
200 (define-public sdparm
201 (package
202 (name "sdparm")
203 (version "1.09")
204 (source
205 (origin
206 (method url-fetch)
207 (uri (string-append "http://sg.danny.cz/sg/p/"
208 name "-" version ".tar.xz"))
209 (sha256
210 (base32
211 "0jakqyjwi72zqjzss04bally0xl0lc4710mx8da08vpmir1hfphg"))))
212 (build-system gnu-build-system)
213 (home-page "http://sg.danny.cz/sg/sdparm.html")
214 (synopsis "Provide access to SCSI device parameters")
215 (description
216 "Sdparm reads and modifies SCSI device parameters. These devices can be
217 SCSI disks, in which case the role of @command{sdparm} is similar to its
218 namesake: the @command{hdparm} utility originally designed for ATA disks.
219 However, @command{sdparm} can be used to access parameters on any device that
220 uses a SCSI command set. Such devices include CD/DVD drives (irrespective of
221 transport), SCSI and ATAPI tape drives, and SCSI enclosures. This utility can
222 also send commands associated with starting and stopping the media, loading
223 and unloading removable media and some other housekeeping functions.")
224 (license license:bsd-3)))
225
226 (define-public idle3-tools
227 (package
228 (name "idle3-tools")
229 (version "0.9.1")
230 (source
231 (origin
232 (method url-fetch)
233 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
234 version ".tgz"))
235 (sha256
236 (base32
237 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
238 (build-system gnu-build-system)
239 (arguments
240 `(#:tests? #f ;no test suite
241 #:phases
242 (modify-phases %standard-phases
243 (delete 'configure))
244 #:make-flags (list "CC=gcc"
245 (string-append "manprefix=")
246 (string-append "DESTDIR="
247 (assoc-ref %outputs "out")))))
248 (home-page "http://idle3-tools.sourceforge.net")
249 (synopsis "Change or disable Western Digital hard drives' Idle3 timer")
250 (description
251 "Idle3-tools provides a utility to get, set, or disable the Idle3 timer
252 present in many Western Digital hard drives. This timer is part of the
253 \"IntelliPark\" feature that stops the disk when not in use. Unfortunately,
254 the default timer setting is not well suited to Linux or other *nix systems,
255 and can dramatically shorten the lifespan of the drive if left unchecked.")
256 (license license:gpl3+)))
257
258 (define-public gparted
259 (package
260 (name "gparted")
261 (version "0.26.1")
262 (source
263 (origin
264 (method url-fetch)
265 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
266 version "/gparted-" version ".tar.gz"))
267 (sha256
268 (base32 "1h9d6x335wxpm49yphzm9n1hbh2hcg0p2rphv76mrvsss91bcm1g"))))
269 (build-system gnu-build-system)
270 (arguments
271 `(#:tests? #f ; Tests require a network connection.
272 #:configure-flags '("--disable-scrollkeeper")))
273 (inputs
274 `(("util-linux" ,util-linux)
275 ("parted" ,parted)
276 ("glib" ,glib)
277 ("gtkmm" ,gtkmm-2)
278 ("libxml2" ,libxml2)
279 ("libxslt" ,libxslt)
280 ("gnome-doc-utils" ,gnome-doc-utils)
281 ("docbook-xml" ,docbook-xml-4.2)
282 ("python" ,python-2)
283 ("python-libxml2" ,python2-libxml2)
284 ("which" ,which)))
285 (native-inputs
286 `(("intltool" ,intltool)
287 ("pkg-config" ,pkg-config)))
288 (home-page "https://sourceforge.net/projects/gparted/")
289 (synopsis "Partition editor to graphically manage disk partitions")
290 (description "GParted is a GNOME partition editor for creating,
291 reorganizing, and deleting disk partitions. It uses libparted from the parted
292 project to detect and manipulate partition tables. Optional file system tools
293 permit managing file systems not included in libparted.")
294 ;; The home page says GPLv2, but the source code says GPLv2+.
295 (license license:gpl2+)))