7479603e93ab9fe50847866fdc6d102bece594d0
[jackhill/guix/guix.git] / gnu / packages / perl.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages perl)
21 #:use-module (guix licenses)
22 #:use-module (gnu packages)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system perl))
27
28 (define-public perl
29 ;; Yeah, Perl... It is required early in the bootstrap process by Linux.
30 (package
31 (name "perl")
32 (version "5.16.1")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "http://www.cpan.org/src/5.0/perl-"
36 version ".tar.gz"))
37 (sha256
38 (base32
39 "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km"))
40 (patches (list (search-patch "perl-no-sys-dirs.patch")))))
41 (build-system gnu-build-system)
42 (arguments
43 '(#:tests? #f
44 #:phases
45 (alist-replace
46 'configure
47 (lambda* (#:key inputs outputs #:allow-other-keys)
48 (let ((out (assoc-ref outputs "out"))
49 (libc (assoc-ref inputs "libc")))
50 ;; Use the right path for `pwd'.
51 (substitute* "dist/Cwd/Cwd.pm"
52 (("/bin/pwd")
53 (which "pwd")))
54
55 (zero?
56 (system* "./Configure"
57 (string-append "-Dprefix=" out)
58 (string-append "-Dman1dir=" out "/share/man/man1")
59 (string-append "-Dman3dir=" out "/share/man/man3")
60 "-de" "-Dcc=gcc"
61 "-Uinstallusrbinperl"
62 "-Dinstallstyle=lib/perl5"
63 "-Duseshrplib"
64 (string-append "-Dlocincpth=" libc "/include")
65 (string-append "-Dloclibpth=" libc "/lib")))))
66 %standard-phases)))
67 (native-search-paths (list (search-path-specification
68 (variable "PERL5LIB")
69 (directories '("lib/perl5/site_perl")))))
70 (synopsis "Implementation of the Perl programming language")
71 (description
72 "Perl 5 is a highly capable, feature-rich programming language with over
73 24 years of development.")
74 (home-page "http://www.perl.org/")
75 (license gpl1+))) ; or "Artistic"
76
77 (define-public perl-file-list
78 (package
79 (name "perl-file-list")
80 (version "0.3.1")
81 (source (origin
82 (method url-fetch)
83 (uri (string-append
84 "mirror://cpan/authors/id/D/DO/DOPACKI/File-List-"
85 version ".tar.gz"))
86 (sha256
87 (base32
88 "00m5ax4aq59hdvav6yc4g63vhx3a57006rglyypagvrzfxjvm8s8"))))
89 (build-system perl-build-system)
90 (arguments
91 `(#:phases
92 (alist-cons-after
93 'unpack 'cd
94 (lambda* _
95 (chdir "List"))
96 %standard-phases)))
97 (license (package-license perl))
98 (synopsis "Perl extension for crawling directory trees and compiling
99 lists of files")
100 (description
101 "The File::List module crawls the directory tree starting at the
102 provided base directory and can return files (and/or directories if desired)
103 matching a regular expression.")
104 (home-page "http://search.cpan.org/~dopacki/File-List/")))
105
106 (define-public perl-io-tty
107 (package
108 (name "perl-io-tty")
109 (version "1.11")
110 (source (origin
111 (method url-fetch)
112 (uri (string-append "mirror://cpan/authors/id/T/TO/TODDR/IO-Tty-"
113 version ".tar.gz"))
114 (sha256
115 (base32
116 "0lgd9xcbi4gf4gw1ka6fj94my3w1f3k1zamb4pfln0qxz45zlxx4"))))
117 (build-system perl-build-system)
118 (home-page "http://search.cpan.org/~toddr/IO-Tty/")
119 (synopsis "Perl interface to pseudo ttys")
120 (description
121 "This package provides the 'IO::Pty' and 'IO::Tty' Perl interfaces to
122 pseudo ttys.")
123 (license (package-license perl))))
124
125 (define-public perl-archive-zip
126 (package
127 (name "perl-archive-zip")
128 (version "1.30")
129 (source
130 (origin
131 (method url-fetch)
132 (uri (string-append
133 "mirror://cpan/authors/id/A/AD/ADAMK/Archive-Zip-"
134 version ".tar.gz"))
135 (sha256
136 (base32
137 "0633zah5z9njiqnvy3vh42fjymncmil1jdfb7d18w8xpfzzp5d7q"))))
138 (build-system perl-build-system)
139 (synopsis "Perl API to zip files")
140 (description "The Archive::Zip module allows a Perl program to create,
141 manipulate, read, and write Zip archive files.")
142 (home-page "http://search.cpan.org/~phred/Archive-Zip-1.37/lib/Archive/Zip.pm")
143 (license (package-license perl))))
144
145 (define-public perl-digest-sha1
146 (package
147 (name "perl-digest-sha1")
148 (version "2.13")
149 (source (origin
150 (method url-fetch)
151 (uri (string-append "mirror://cpan/authors/id/G/GA/GAAS/"
152 "Digest-SHA1-" version ".tar.gz"))
153 (sha256
154 (base32
155 "1k23p5pjk42vvzg8xcn4iwdii47i0qm4awdzgbmz08bl331dmhb8"))))
156 (build-system perl-build-system)
157 (synopsis "Perl implementation of the SHA-1 message digest algorithm")
158 (description
159 "This package provides 'Digest::SHA1', an implementation of the NIST
160 SHA-1 message digest algorithm for use by Perl programs.")
161 (home-page (string-append "http://search.cpan.org/~gaas/Digest-SHA1-"
162 version "/SHA1.pm"))
163 (license (package-license perl))))
164
165 (define-public perl-benchmark-timer
166 (package
167 (name "perl-benchmark-timer")
168 (version "0.7102")
169 (source (origin
170 (method url-fetch)
171 (uri (string-append "mirror://cpan/authors/id/D/DC/DCOPPIT/"
172 "Benchmark-Timer-" version ".tar.gz"))
173 (sha256
174 (base32
175 "1gl9ybm9hgia3ld5s11b7bv2p2hmx5rss5hxcfy6rmbzrjcnci01"))))
176 (build-system perl-build-system)
177 ;; The optional input module Statistics::PointEstimation (from
178 ;; Statistics-TTest) lists no license.
179 (synopsis "Benchmarking with statistical confidence")
180 (description
181 "The Benchmark::Timer class allows you to time portions of code
182 conveniently, as well as benchmark code by allowing timings of repeated
183 trials. It is perfect for when you need more precise information about the
184 running time of portions of your code than the Benchmark module will give you,
185 but don't want to go all out and profile your code.")
186 (home-page (string-append "http://search.cpan.org/~dcoppit/"
187 "Benchmark-Timer-" version))
188 (license gpl2)))
189
190 (define-public perl-exporter-lite
191 (package
192 (name "perl-exporter-lite")
193 (version "0.06")
194 (source (origin
195 (method url-fetch)
196 (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
197 "Exporter-Lite-" version ".tar.gz"))
198 (sha256
199 (base32
200 "0k4gkvid4fr8yvwj0axdx5111mzfw2iipls3qllxr364fqhmclpj"))))
201 (build-system perl-build-system)
202 (synopsis "Lightweight exporting of functions and variables")
203 (description
204 "Exporter::Lite is an alternative to Exporter, intended to provide a
205 lightweight subset of the most commonly-used functionality. It supports
206 import(), @EXPORT and @EXPORT_OK and not a whole lot else.")
207 (home-page (string-append "http://search.cpan.org/~neilb/"
208 "Exporter-Lite-" version))
209 (license (package-license perl))))
210
211 (define-public perl-probe-perl
212 (package
213 (name "perl-probe-perl")
214 (version "0.03")
215 (source (origin
216 (method url-fetch)
217 (uri (string-append "mirror://cpan/authors/id/K/KW/KWILLIAMS/"
218 "Probe-Perl-" version ".tar.gz"))
219 (sha256
220 (base32
221 "0c9wiaz0mqqknafr4jdr0g2gdzxnn539182z0icqaqvp5qgd5r6r"))))
222 (build-system perl-build-system)
223 (synopsis "Information about the currently running perl")
224 (description
225 "Probe::Perl provides methods for obtaining information about the
226 currently running perl interpreter. It originally began life as code in the
227 Module::Build project, but has been externalized here for general use.")
228 (home-page (string-append "http://search.cpan.org/~kwilliams/"
229 "Probe-Perl-" version))
230 (license (package-license perl))))
231
232 (define-public perl-ipc-run3
233 (package
234 (name "perl-ipc-run3")
235 (version "0.048")
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
239 "IPC-Run3-" version ".tar.gz"))
240 (sha256
241 (base32
242 "0r9m8q78bg7yycpixd7738jm40yz71p2q7inm766kzsw3g6c709x"))))
243 (build-system perl-build-system)
244 (synopsis "Run a subprocess with input/ouput redirection")
245 (description
246 "The IPC::Run3 module allows you to run a subprocess and redirect stdin,
247 stdout, and/or stderr to files and perl data structures. It aims to satisfy
248 99% of the need for using system, qx, and open3 with a simple, extremely
249 Perlish API and none of the bloat and rarely used features of IPC::Run.")
250 (home-page (string-append "http://search.cpan.org/~rjbs/"
251 "IPC-Run3-" version))
252 ;; "You may use this module under the terms of the BSD, Artistic, or GPL
253 ;; licenses, any version."
254 (license (list bsd-3 gpl3+))))
255
256 (define-public perl-test-script
257 (package
258 (name "perl-test-script")
259 (version "1.07")
260 (source (origin
261 (method url-fetch)
262 (uri (string-append "mirror://cpan/authors/id/A/AD/ADAMK/"
263 "Test-Script-" version ".tar.gz"))
264 (sha256
265 (base32
266 "15pb4zzsnm33msc1syhig2bk05xqc0pckmfyahdwbd177bj5w7p2"))))
267 (build-system perl-build-system)
268 (propagated-inputs
269 `(("probe-perl" ,perl-probe-perl)
270 ("ipc-run3" ,perl-ipc-run3)))
271 (synopsis "Basic cross-platform tests for scripts")
272 (description
273 "The intent of the Test::Script module is to provide a series of basic
274 tests for 80% of the testing you will need to do for scripts in the script (or
275 bin as is also commonly used) paths of your Perl distribution.")
276 (home-page (string-append "http://search.cpan.org/~adamk/"
277 "Test-Script-" version))
278 (license (package-license perl))))
279
280 (define-public perl-file-which
281 (package
282 (name "perl-file-which")
283 (version "1.09")
284 (source (origin
285 (method url-fetch)
286 (uri (string-append "mirror://cpan/authors/id/A/AD/ADAMK/"
287 "File-Which-" version ".tar.gz"))
288 (sha256
289 (base32
290 "1hxjyh9yrv32f3g8vrnr8iylzprajsac14vjm75kf1qnj1jyqbxp"))))
291 (build-system perl-build-system)
292 (native-inputs `(("test-script" ,perl-test-script)))
293 (synopsis "Portable implementation of the `which' utility")
294 (description
295 "File::Which was created to be able to get the paths to executable
296 programs on systems under which the `which' program wasn't implemented in the
297 shell.")
298 (home-page (string-append "http://search.cpan.org/~adamk/"
299 "File-Which-" version))
300 (license (package-license perl))))
301
302 (define-public perl-getopt-tabular
303 (package
304 (name "perl-getopt-tabular")
305 (version "0.3")
306 (source (origin
307 (method url-fetch)
308 (uri (string-append "mirror://cpan/authors/id/G/GW/GWARD/"
309 "Getopt-Tabular-" version ".tar.gz"))
310 (sha256
311 (base32
312 "0xskl9lcj07sdfx5dkma5wvhhgf5xlsq0khgh8kk34dm6dv0dpwv"))))
313 (build-system perl-build-system)
314 (synopsis "Table-driven argument parsing for Perl")
315 (description
316 "Getopt::Tabular is a Perl 5 module for table-driven argument parsing,
317 vaguely inspired by John Ousterhout's Tk_ParseArgv.")
318 (home-page (string-append "http://search.cpan.org/~gward/"
319 "Getopt-Tabular-" version))
320 (license (package-license perl))))
321
322 (define-public perl-regexp-common
323 (package
324 (name "perl-regexp-common")
325 (version "2013031301")
326 (source (origin
327 (method url-fetch)
328 (uri (string-append "mirror://cpan/authors/id/A/AB/ABIGAIL/"
329 "Regexp-Common-" version ".tar.gz"))
330 (sha256
331 (base32
332 "112wybsm0vr8yfannx6sdfvgp5vza28gjgr3pgn69ak4sac836kj"))))
333 (build-system perl-build-system)
334 (synopsis "Provide commonly requested regular expressions")
335 (description
336 "This module exports a single hash (`%RE') that stores or generates
337 commonly needed regular expressions. Patterns currently provided include:
338 balanced parentheses and brackets, delimited text (with escapes), integers and
339 floating-point numbers in any base (up to 36), comments in 44 languages,
340 offensive language, lists of any pattern, IPv4 addresses, URIs, and Zip
341 codes.")
342 (home-page (string-append "http://search.cpan.org/~abigail/"
343 "Regexp-Common-" version))
344 ;; Quad-licensed: Perl Artistic, Perl Artistic 2.0, X11, and BSD.
345 (license (list (package-license perl) x11 bsd-3))))