1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages disk)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages check)
25 #:use-module (gnu packages gettext)
26 #:use-module (gnu packages linux)
27 #:use-module (gnu packages readline)
28 #:use-module (gnu packages guile)
29 #:use-module ((gnu packages compression)
39 (uri (string-append "mirror://gnu/parted/parted-"
43 "05fa4m1bky9d13hqv91jlnngzlyn7y4rnnyq6d86w0dg3vww372y"))))
44 (build-system gnu-build-system)
45 (arguments `(#:configure-flags '("--disable-device-mapper")
46 #:phases (alist-cons-before
47 'configure 'fix-mkswap
48 (lambda* (#:key inputs #:allow-other-keys)
49 (let ((util-linux (assoc-ref inputs
52 "tests/t9050-partition-table-types.sh"
54 (string-append util-linux "/sbin/mkswap")))))
60 ;; With Readline 6.3, parted/ui.c fails to build because it uses the
61 ;; now undefined 'CPPFunction' type.
62 ("readline" ,readline-6.2)
64 ("util-linux" ,util-linux)))
66 `(("gettext" ,gnu-gettext)))
67 (home-page "http://www.gnu.org/software/parted/")
68 (synopsis "Disk partition editor")
70 "GNU Parted is a package for creating and manipulating disk partition
71 tables. It includes a library and command-line utility.")
81 (uri (string-append "mirror://gnu/fdisk/gnufdisk-"
85 "04nd7civ561x2lwcmxhsqbprml3178jfc58fy1v7hzqg5k4nbhy3"))))
86 (build-system gnu-build-system)
88 `(("gettext" ,gnu-gettext)
90 ("util-linux" ,util-linux)
92 (home-page "https://www.gnu.org/software/fdisk/")
93 (synopsis "Low-level disk partitioning and formatting")
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.")
100 (define-public ddrescue
107 (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
111 "0bvmsbzli2j4czwkabzs978n1y6vx31axh02kpgcf7033cc6rydy"))))
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)))
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.")