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>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
54 (uri (string-append "mirror://gnu/parted/parted-"
58 "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"))))
59 (build-system gnu-build-system)
62 (modify-phases %standard-phases
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"))))))))
72 ("readline" ,readline)
73 ("util-linux" ,util-linux)))
75 `(("gettext" ,gnu-gettext)
78 ("python" ,python-2)))
79 (home-page "https://www.gnu.org/software/parted/")
80 (synopsis "Disk partition editor")
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+)))
93 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
97 "04nd7civ561x2lwcmxhsqbprml3178jfc58fy1v7hzqg5k4nbhy3"))))
98 (build-system gnu-build-system)
100 `(("gettext" ,gnu-gettext)
102 ("util-linux" ,util-linux)
104 (home-page "https://www.gnu.org/software/fdisk/")
105 (synopsis "Low-level disk partitioning and formatting")
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+)))
112 (define-public gptfdisk
119 (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
120 version "/" name "-" version ".tar.gz"))
123 "1izazbyv5n2d81qdym77i8mg9m870hiydmq4d0s51npx5vp8lk46"))))
124 (build-system gnu-build-system)
126 `(("gettext" ,gnu-gettext)
129 ("util-linux" ,util-linux))) ; libuuid
131 `(#:test-target "test"
133 (modify-phases %standard-phases
134 ;; no configure script
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
150 (license license:gpl2)))
152 (define-public ddrescue
159 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
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)))
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+)))
175 (define-public dosfstools
182 (uri (string-append "https://github.com/" name "/" name
183 "/releases/download/v" version "/"
184 name "-" version ".tar.xz"))
187 "1bvxbv1w6vhbx0nx7ygp700wq5k2hjv0hm7w0kz1x7amaf4p6dwh"))))
188 (build-system gnu-build-system)
190 `(#:make-flags (list (string-append "PREFIX=" %output)
192 #:tests? #f)) ;no tests
193 (home-page "https://github.com/dosfstools/dosfstools")
194 (synopsis "Utilities for making and checking MS-DOS FAT filesystems")
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+)))
200 (define-public sdparm
207 (uri (string-append "http://sg.danny.cz/sg/p/"
208 name "-" version ".tar.xz"))
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")
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)))
226 (define-public idle3-tools
233 (uri (string-append "mirror://sourceforge/idle3-tools/idle3-tools-"
237 "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p"))))
238 (build-system gnu-build-system)
240 `(#:tests? #f ;no test suite
242 (modify-phases %standard-phases
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")
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+)))
258 (define-public gparted
265 (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
266 version "/gparted-" version ".tar.gz"))
268 (base32 "1h9d6x335wxpm49yphzm9n1hbh2hcg0p2rphv76mrvsss91bcm1g"))))
269 (build-system gnu-build-system)
271 `(#:tests? #f ; Tests require a network connection.
272 #:configure-flags '("--disable-scrollkeeper")))
274 `(("util-linux" ,util-linux)
280 ("gnome-doc-utils" ,gnome-doc-utils)
281 ("docbook-xml" ,docbook-xml-4.2)
283 ("python-libxml2" ,python2-libxml2)
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+)))