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