From 818ae83b3a3ef5b18217ea622d4e16455b6c1c18 Mon Sep 17 00:00:00 2001 From: Jason Conroy Date: Sun, 21 Dec 2025 11:44:14 -0500 Subject: [PATCH] gnu: ocaml: Move ocaml5.3-result to module `ocaml5`. * gnu/packages/ocaml.scm (ocaml5.3-result): Delete variable. * gnu/packages/ocaml5.scm (ocaml5.3-result): New variable. Change-Id: If63a977367a963ca6a714a4f92a0847086aa5516 Signed-off-by: Julien Lepiller --- gnu/packages/ocaml.scm | 13 ++----------- gnu/packages/ocaml5.scm | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 81eba200ff3..4945471d3f8 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2227,7 +2227,7 @@ module of this library is parameterised by the type of S-expressions.") ,@(substitute-keyword-arguments (package-arguments ocaml-csexp) ((#:dune _) ocaml5:ocaml5.3-dune-bootstrap)))) (propagated-inputs - `(("ocaml-result" ,ocaml5.3-result))))) + `(("ocaml-result" ,ocaml5:ocaml5.3-result))))) (define-public ocaml-migrate-parsetree (package @@ -2349,7 +2349,7 @@ bitsrings in Erlang style as primitives to the language."))) `(#:dune ,dune-bootstrap)) (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result)) (ocaml5.0-variant . ,(delay ocaml5.0-result)) - (ocaml5.3-variant . ,(delay ocaml5.3-result)))) + (ocaml5.3-variant . ,(delay ocaml5:ocaml5.3-result)))) (home-page "https://github.com/janestreet/result") (synopsis "Compatibility Result module") (description "Uses the new result type defined in OCaml >= 4.03 while @@ -2375,15 +2375,6 @@ defined in this library.") #:ocaml ,ocaml5:ocaml-5.0 #:findlib ,ocaml5.0-findlib)))) -(define-public ocaml5.3-result - (package - (inherit ocaml-result) - (name "ocaml5.3-result") - (arguments - `(#:dune ,ocaml5:ocaml5.3-dune-bootstrap - #:ocaml ,ocaml5:ocaml-5.3 - #:findlib ,ocaml5:ocaml5.3-findlib)))) - (define-public ocaml-iso8601 (package (name "ocaml-iso8601") diff --git a/gnu/packages/ocaml5.scm b/gnu/packages/ocaml5.scm index 6e81f11d42f..9d47152a753 100644 --- a/gnu/packages/ocaml5.scm +++ b/gnu/packages/ocaml5.scm @@ -57,6 +57,8 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages xorg) + #:use-module ((guix build-system dune) + #:select ((ocaml5-dune-build-system . dune-build-system))) #:use-module ((guix build-system ocaml) #:select ((ocaml5-build-system . ocaml-build-system))) #:use-module (guix build-system gnu) @@ -145,6 +147,30 @@ functional, imperative and object-oriented styles of programming.") (base32 "05jhy9zn53v12rn3sg3vllqf5blv1gp7f06803npimc58crxy6rv")))))) +(define-public ocaml5.3-result + (package + (name "ocaml5.3-result") + (version "1.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/janestreet/result") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "166laj8qk7466sdl037c6cjs4ac571hglw4l5qpyll6df07h6a7q")))) + (build-system dune-build-system) + (arguments + `(#:dune ,ocaml5.3-dune-bootstrap)) + (home-page "https://github.com/janestreet/result") + (synopsis "Compatibility Result module") + (description + "Uses the new result type defined in OCaml >= 4.03 while +staying compatible with older version of OCaml should use the Result module +defined in this library.") + (license license:bsd-3))) + (define-public ocaml5.3-dune-bootstrap (package (name "ocaml5.3-dune")