gnu: Use synopses from the Womb.
[jackhill/guix/guix.git] / gnu / packages / ocaml.scm
CommitLineData
d192efae
CR
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
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 (gnu packages ocaml)
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)
25 #:use-module (gnu packages perl))
26
27(define-public ocaml
28 (package
29 (name "ocaml")
30 (version "4.00.1")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append
34 "http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-"
35 version ".tar.gz"))
36 (sha256
37 (base32
38 "0yp86napnvbi2jgxr6bk1235bmjdclgzrzgq4mhwv87l7dymr3dl"))))
39 (build-system gnu-build-system)
40 (arguments
41 `(#:modules ((guix build gnu-build-system)
42 (guix build utils)
43 (srfi srfi-1))
44 #:phases (alist-replace
45 'configure
46 (lambda* (#:key outputs #:allow-other-keys)
47 ;; OCaml uses "-prefix <prefix>" rather than the usual
48 ;; "--prefix=<prefix>".
49 (let ((out (assoc-ref outputs "out")))
50 (zero? (system* "./configure" "-prefix" out))))
51 (alist-replace
52 'build
53 (lambda* (#:key outputs #:allow-other-keys)
54 ;; "make" does not do anything, we must use
55 ;; "make world.opt".
56 (zero? (system* "make" "world.opt")))
57 (alist-replace
58 'check-after-install
59 (lambda* (#:key outputs #:allow-other-keys)
60 ;; There does not seem to be a "check" or "test" target.
61 (zero? (system "cd testsuite && make all")))
62 (let ((check (assq-ref %standard-phases 'check)))
63 ;; OCaml assumes that "make install" is run before
64 ;; launching the tests.
65 (alist-cons-after
66 'install 'check-after-install
67 check
68 (alist-delete 'check %standard-phases))))))))
69 (inputs `(("perl" ,perl)))
70 (home-page "http://caml.inria.fr/")
71 (synopsis "The OCaml programming language")
72 (description
73 "OCaml is a general purpose industrial-strength programming language with
74an emphasis on expressiveness and safety. Developed for more than 20 years at
75Inria it benefits from one of the most advanced type systems and supports
76functional, imperative and object-oriented styles of programming.")
77 (license (list qpl gpl2))))