Merge branch 'master' into core-updates
[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))))