gnu: Add poppler-qt5.
[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 <tobias.geerinckx.rice@gmail.com>
6 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
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.
14 ;;;
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.
19 ;;;
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/>.
22
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))
35
36 (define-public parted
37 (package
38 (name "parted")
39 (version "3.2")
40 (source (origin
41 (method url-fetch)
42 (uri (string-append "mirror://gnu/parted/parted-"
43 version ".tar.xz"))
44 (sha256
45 (base32
46 "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"))))
47 (build-system gnu-build-system)
48 (arguments
49 `(#:phases
50 (modify-phases %standard-phases
51 (add-after
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"))))))))
58 (inputs
59 `(("lvm2" ,lvm2)
60 ("readline" ,readline)
61 ("util-linux" ,util-linux)))
62 (native-inputs
63 `(("gettext" ,gnu-gettext)
64 ;; For the tests.
65 ("perl" ,perl)
66 ("python" ,python-2)))
67 (home-page "https://www.gnu.org/software/parted/")
68 (synopsis "Disk partition editor")
69 (description
70 "GNU Parted is a package for creating and manipulating disk partition
71 tables. It includes a library and command-line utility.")
72 (license gpl3+)))
73
74 (define-public fdisk
75 (package
76 (name "fdisk")
77 (version "2.0.0a")
78 (source
79 (origin
80 (method url-fetch)
81 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
82 version ".tar.gz"))
83 (sha256
84 (base32
85 "04nd7civ561x2lwcmxhsqbprml3178jfc58fy1v7hzqg5k4nbhy3"))))
86 (build-system gnu-build-system)
87 (inputs
88 `(("gettext" ,gnu-gettext)
89 ("guile" ,guile-1.8)
90 ("util-linux" ,util-linux)
91 ("parted" ,parted)))
92 (home-page "https://www.gnu.org/software/fdisk/")
93 (synopsis "Low-level disk partitioning and formatting")
94 (description
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.")
98 (license gpl3+)))
99
100 (define-public ddrescue
101 (package
102 (name "ddrescue")
103 (version "1.21")
104 (source
105 (origin
106 (method url-fetch)
107 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
108 version ".tar.lz"))
109 (sha256
110 (base32
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)))
116 (description
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.")
121 (license gpl3+)))
122
123 (define-public dosfstools
124 (package
125 (name "dosfstools")
126 (version "3.0.28")
127 (source
128 (origin
129 (method url-fetch)
130 (uri (string-append "https://github.com/" name "/" name
131 "/releases/download/v" version "/"
132 name "-" version ".tar.xz"))
133 (sha256
134 (base32
135 "1qkya6lald91c8nsf29jwnk0k5v42wlj24gacfdp3wpc8hq935gf"))))
136 (build-system gnu-build-system)
137 (arguments
138 `(#:make-flags (list (string-append "PREFIX=" %output)
139 "CC=gcc")
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")
145 (description
146 "The dosfstools package includes the mkfs.fat and fsck.fat utilities,
147 which respectively make and check MS-DOS FAT filesystems.")
148 (license gpl3+)))
149
150 (define-public sdparm
151 (package
152 (name "sdparm")
153 (version "1.09")
154 (source
155 (origin
156 (method url-fetch)
157 (uri (string-append "http://sg.danny.cz/sg/p/"
158 name "-" version ".tar.xz"))
159 (sha256
160 (base32
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")
165 (description
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.")
174 (license bsd-3)))
175
176 (define-public idle3-tools
177 (package
178 (name "idle3-tools")
179 (version "0.9.1")
180 (source
181 (origin
182 (method url-fetch)
183 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
184 version ".tgz"))
185 (sha256
186 (base32
187 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
188 (build-system gnu-build-system)
189 (arguments
190 `(#:tests? #f ;no test suite
191 #:phases
192 (modify-phases %standard-phases
193 (delete 'configure))
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")
200 (description
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.")
206 (license gpl3+)))