Add ocaml 4.07
more/packages/ocaml.scm
52 | 52 | (number->string file-number) "/" name "-" version | |
53 | 53 | ".tar.gz")) | |
54 | 54 | ||
55 | + | (define-public ocaml-4.07 | |
56 | + | (package | |
57 | + | (inherit ocaml) | |
58 | + | (version "4.07.0") | |
59 | + | (source (origin | |
60 | + | (method url-fetch) | |
61 | + | (uri (string-append | |
62 | + | "http://caml.inria.fr/pub/distrib/ocaml-" | |
63 | + | (version-major+minor version) | |
64 | + | "/ocaml-" version ".tar.xz")) | |
65 | + | (sha256 | |
66 | + | (base32 | |
67 | + | "03wzkzv6w4rdiiva20g5amz0n4x75swpjl8d80468p6zm8hgfnzl")))) | |
68 | + | (arguments | |
69 | + | `(#:phases | |
70 | + | (modify-phases %standard-phases | |
71 | + | (add-after 'unpack 'patch-/bin/sh-references | |
72 | + | (lambda* (#:key inputs #:allow-other-keys) | |
73 | + | (let* ((sh (string-append (assoc-ref inputs "bash") | |
74 | + | "/bin/sh")) | |
75 | + | (quoted-sh (string-append "\"" sh "\""))) | |
76 | + | (with-fluids ((%default-port-encoding #f)) | |
77 | + | (for-each | |
78 | + | (lambda (file) | |
79 | + | (substitute* file | |
80 | + | (("\"/bin/sh\"") | |
81 | + | (begin | |
82 | + | (format (current-error-port) "\ | |
83 | + | patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%" | |
84 | + | file quoted-sh) | |
85 | + | quoted-sh)))) | |
86 | + | (find-files "." "\\.ml$")) | |
87 | + | #t)))) | |
88 | + | (replace 'configure | |
89 | + | (lambda* (#:key outputs #:allow-other-keys) | |
90 | + | (let* ((out (assoc-ref outputs "out")) | |
91 | + | (mandir (string-append out "/share/man"))) | |
92 | + | ;; Custom configure script doesn't recognize | |
93 | + | ;; --prefix=<PREFIX> syntax (with equals sign). | |
94 | + | (invoke "./configure" | |
95 | + | "--prefix" out | |
96 | + | "--mandir" mandir)) | |
97 | + | #t)) | |
98 | + | (replace 'build | |
99 | + | (lambda _ | |
100 | + | (invoke "make" "-j" (number->string | |
101 | + | (parallel-job-count)) | |
102 | + | "world.opt") | |
103 | + | #t)) | |
104 | + | (delete 'check) | |
105 | + | (add-after 'install 'check | |
106 | + | (lambda _ | |
107 | + | (with-directory-excursion "testsuite" | |
108 | + | (invoke "make" "all")) | |
109 | + | #t))))))) | |
110 | + | ||
55 | 111 | (define-public ocaml-fix | |
56 | 112 | (package | |
57 | 113 | (inherit ocaml) |