Update license headers.
[jackhill/guix/guix.git] / distro / packages / perl.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
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.
10 ;;;
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.
15 ;;;
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/>.
18
19 (define-module (distro packages perl)
20 #:use-module (guix licenses)
21 #:use-module (distro)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix utils)
25 #:use-module (guix build-system gnu))
26
27 (define-public perl
28 ;; Yeah, Perl... It is required early in the bootstrap process by Linux.
29 (package
30 (name "perl")
31 (version "5.16.1")
32 (source (origin
33 (method url-fetch)
34 (uri (string-append "http://www.cpan.org/src/5.0/perl-"
35 version ".tar.gz"))
36 (sha256
37 (base32
38 "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km"))))
39 (build-system gnu-build-system)
40 (arguments
41 (lambda (system)
42 `(#:tests? #f
43 #:patches (list (assoc-ref %build-inputs "patch/no-sys-dirs"))
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 (pwd (search-path (search-path-as-string->list
51 (getenv "PATH"))
52 "pwd")))
53 ;; Use the right path for `pwd'.
54 (substitute* "dist/Cwd/Cwd.pm"
55 (("/bin/pwd") pwd))
56
57 (zero?
58 (system* "/bin/sh" "./Configure"
59 (string-append "-Dprefix=" out)
60 (string-append "-Dman1dir=" out "/share/man/man1")
61 (string-append "-Dman3dir=" out "/share/man/man3")
62 "-de" "-Dcc=gcc"
63 "-Uinstallusrbinperl"
64 "-Dinstallstyle=lib/perl5"
65 "-Duseshrplib"
66 (string-append "-Dlocincpth=" libc "/include")
67 (string-append "-Dloclibpth=" libc "/lib")))))
68 %standard-phases))))
69 (inputs `(("patch/no-sys-dirs" ,(search-patch "perl-no-sys-dirs.patch"))))
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"