guix_mirror_bot pushed a commit to branch ocaml-team
in repository guix.
commit 35a0b4ad0588e2a966750e43bacd817ade60247a
Author: Jason Conroy <[email protected]>
AuthorDate: Sun Dec 21 10:43:31 2025 -0500
gnu: ocaml: Move [email protected] to module `ocaml5`.
* gnu/packages/ocaml.scm (ocaml-5.0): Delete variable.
* gnu/packages/ocaml5.scm (ocaml-5.0): New variable.
* guix/build-system/ocaml.scm (default-ocaml5.0): Update package reference.
Change-Id: I3f3e453e15638e36afbe7fd7bd920bc5fa328d06
Signed-off-by: Julien Lepiller <[email protected]>
---
gnu/packages/ocaml.scm | 80 ++++-----------------------------------------
gnu/packages/ocaml5.scm | 79 +++++++++++++++++++++++++++++++++++++++++++-
guix/build-system/ocaml.scm | 2 +-
3 files changed, 85 insertions(+), 76 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 33e0fabc17..9bf77eb878 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -76,6 +76,7 @@
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages node)
+ #:use-module ((gnu packages ocaml5) #:prefix ocaml5:)
#:use-module (gnu packages parallel)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
@@ -223,78 +224,9 @@ OCaml and can effectively bootstrap OCaml 4.07.
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)))
- (file-name (git-file-name name 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 parallel 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"
- ;; This doesn't have the desired effect and makes test runs less
- ;; stable. See https://codeberg.org/guix/guix/pulls/2933.
- #:parallel-tests? #f
- #:make-flags '("defaultentry")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enable-parallel-tests
- (lambda _
- ;; Patch the `tests` build target to enable a special parallel
- ;; execution mode based on GNU Parallel.
- (substitute* "Makefile"
- (("-C testsuite all") "-C testsuite parallel"))))
- (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-5.3
(package
- (inherit ocaml-5.0)
+ (inherit ocaml5:ocaml-5.0)
(version "5.3.0")
(source (origin
(method git-fetch)
@@ -1685,7 +1617,7 @@ compilers that can directly deal with packages.")
(inherit ocaml-findlib)
(name "ocaml5.0-findlib")
(native-inputs
- (list m4 ocaml-5.0))))
+ (list m4 ocaml5:ocaml-5.0))))
(define-public ocaml5.3-findlib
(package
@@ -2085,7 +2017,7 @@ config.h files for instance. Among other things,
dune-configurator allows one t
(arguments
`(,@(package-arguments dune-configurator)
#:dune ,ocaml5.0-dune-bootstrap
- #:ocaml ,ocaml-5.0
+ #:ocaml ,ocaml5:ocaml-5.0
#:findlib ,ocaml5.0-findlib))
(propagated-inputs (list ocaml5.0-csexp))))
@@ -2302,7 +2234,7 @@ module of this library is parameterised by the type of
S-expressions.")
(inherit ocaml-csexp)
(name "ocaml5.0-csexp")
(arguments
- `(#:ocaml ,ocaml-5.0
+ `(#:ocaml ,ocaml5:ocaml-5.0
#:findlib ,ocaml5.0-findlib
,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
((#:dune _) ocaml5.0-dune-bootstrap))))
@@ -2464,7 +2396,7 @@ defined in this library.")
(name "ocaml5.0-result")
(arguments
`(#:dune ,ocaml5.0-dune-bootstrap
- #:ocaml ,ocaml-5.0
+ #:ocaml ,ocaml5:ocaml-5.0
#:findlib ,ocaml5.0-findlib))))
(define-public ocaml5.3-result
diff --git a/gnu/packages/ocaml5.scm b/gnu/packages/ocaml5.scm
index d999952ea0..17a1de7f84 100644
--- a/gnu/packages/ocaml5.scm
+++ b/gnu/packages/ocaml5.scm
@@ -50,8 +50,85 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages ocaml5)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages parallel)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages xorg)
#:use-module ((guix build-system ocaml)
- #:select ((ocaml5-build-system . ocaml-build-system))))
+ #:select ((ocaml5-build-system . ocaml-build-system)))
+ #:use-module (guix build-system gnu)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages))
+
+(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)))
+ (file-name (git-file-name name 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 parallel 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"
+ ;; This doesn't have the desired effect and makes test runs less
+ ;; stable. See https://codeberg.org/guix/guix/pulls/2933.
+ #:parallel-tests? #f
+ #:make-flags '("defaultentry")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'enable-parallel-tests
+ (lambda _
+ ;; Patch the `tests` build target to enable a special
parallel
+ ;; execution mode based on GNU Parallel.
+ (substitute* "Makefile"
+ (("-C testsuite all")
+ "-C testsuite parallel"))))
+ (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))))
+
;;;
;;; Avoid adding new packages to the end of this file. To reduce the chances
;;; of a merge conflict, place them above by existing packages with similar
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index 9361be4c6b..92a7e3e916 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -122,7 +122,7 @@
(@* (gnu packages ocaml) ocaml4.09-dune))
(define (default-ocaml5.0)
- (@* (gnu packages ocaml) ocaml-5.0))
+ (@* (gnu packages ocaml5) ocaml-5.0))
(define (default-ocaml5.0-findlib)
(@* (gnu packages ocaml) ocaml5.0-findlib))