[bug#60120,01/28] gnu: Add ocaml-5.0.
Commit Message
* gnu/packages/ocaml.scm (ocaml-5.0): New variable.
---
gnu/packages/ocaml.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
Comments
Hi!
Thanks for the patch series. Pushed to master with the following fixes:
[01/28]
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/ocaml/ocaml")
> + (commit version)))
is missing a file-name field (guix lint complains about it), like this:
(file-name (git-file-name name version))
[04/28]
> +(define-public ocaml5.0-result
but this was not added to the properties of ocaml-result.
[06/28]
0.2.1 is the latest version.
[07/28]
> "https://gitlab.inria.fr/fpottier/monolith/-/archive/20210525/archive.tar.gz"
I think this might not be a stable archive, and guix lint complains
about the name, so I used git-fetch instead.
[08/28]
0.3.0 is the latest version.
[09/28]
There was a space at the end of description, and it contained typos.
You should use https instead of http when available. There was a tab in
the patch.
[20/28]
Description does not match our usual style. It seems you didn't define
ocaml-eio as public, because it fails to build. Would be great to fix,
wdyt?
[21/28]
Missing synopsis and description.
[22/28]
Description does not match our usual style.
[23/28]
Missing synopsis and description.
[24/28]
Missing synopsis and description.
Hi Julien,
Thanks for your review! I'm very sorry for the sloppiness. I guess these
patches were collecting in a WIP status for months and I hurriedly fixed
them up in OCaml 5 excitement.
Julien Lepiller <julien@lepiller.eu> writes:
> [20/28]
> Description does not match our usual style. It seems you didn't define
> ocaml-eio as public, because it fails to build. Would be great to fix,
> wdyt?
ocaml-eio is an OCaml 5 only package. It won't compile with OCaml
4.14. That's the reason for not making ocaml-eio public. I guess a
comment shold have been added.
Thanks again!
-pukkamustard
@@ -185,6 +185,66 @@ (define-public camlboot
This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
(license license:expat))))
+(define-public ocaml-5.0
+ (package
+ (name "ocaml")
+ (version "5.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/ocaml")
+ (commit version)))
+ (sha256
+ (base32
+ "1p0p8wldrnbr61wfy3x4122017g4k5gjvfwlg3mvlqn8r2fxn2m5"))))
+ (build-system gnu-build-system)
+ (native-search-paths
+ (list (search-path-specification
+ (variable "OCAMLPATH")
+ (files (list "lib/ocaml" "lib/ocaml/site-lib")))
+ (search-path-specification
+ (variable "CAML_LD_LIBRARY_PATH")
+ (files (list "lib/ocaml/site-lib/stubslibs"
+ "lib/ocaml/site-lib/stublibs")))))
+ (native-inputs
+ (list perl pkg-config))
+ (inputs
+ (list libx11 libiberty ;needed for objdump support
+ zlib)) ;also needed for objdump support
+ (arguments
+ `(#:configure-flags '("--enable-ocamltest")
+ #:test-target "tests"
+ #:make-flags '("world.opt")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-/bin/sh-references
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((sh (search-input-file inputs "/bin/sh"))
+ (quoted-sh (string-append "\"" sh "\"")))
+ (with-fluids ((%default-port-encoding #f))
+ (for-each
+ (lambda (file)
+ (substitute* file
+ (("\"/bin/sh\"")
+ (begin
+ (format (current-error-port) "\
+patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
+ file quoted-sh)
+ quoted-sh))))
+ (find-files "." "\\.ml$")))))))))
+ (home-page "https://ocaml.org/")
+ (synopsis "The OCaml programming language")
+ (description
+ "OCaml is a general purpose industrial-strength programming language with
+an emphasis on expressiveness and safety. Developed for more than 20 years at
+Inria it benefits from one of the most advanced type systems and supports
+functional, imperative and object-oriented styles of programming.")
+ ;; The compiler is distributed under qpl1.0 with a change to choice of
+ ;; law: the license is governed by the laws of France. The library is
+ ;; distributed under lgpl2.0.
+ (license (list license:qpl license:lgpl2.0))))
+
+
(define-public ocaml-4.14
(package
(name "ocaml")