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