diff mbox series

[bug#52039,v2,7/7] gnu: Add ocaml-utop.

Message ID 20211122173702.59732-7-zimon.toutoune@gmail.com
State New
Headers show
Series [bug#52039,v2,1/7] gnu: Add ocaml-trie. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

zimoun Nov. 22, 2021, 5:37 p.m. UTC
* gnu/packages/ocaml.scm (ocaml-utop): New variable.
(ocaml4.07-utop): Inherit and adjust.
---
 gnu/packages/ocaml.scm | 52 +++++++++++++++++++++++++++++-------------
 1 file changed, 36 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 844d018ded..0551aec589 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4125,40 +4125,60 @@  (define-public ocaml4.07-lambda-term
         ("ocaml-zed" ,ocaml4.07-zed)))
      (properties '()))))
 
-(define-public ocaml4.07-utop
+(define-public ocaml-utop
   (package
-    (name "ocaml4.07-utop")
-    (version "2.4.3")
+    (name "ocaml-utop")
+    (version "2.8.0")
+    (home-page "https://github.com/ocaml-community/utop")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/ocaml-community/utop")
+             (url home-page)
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
+        (base32 "1zf4hg33sblzh2f65vk0292jg4jlwa8702kfwpsg1kcg4w6nsfdp"))))
     (build-system dune-build-system)
     (arguments
-     `(#:test-target "."
-       #:ocaml ,ocaml-4.07
-       #:findlib ,ocaml4.07-findlib
-       #:dune ,ocaml4.07-dune))
+     '(#:test-target "."))
     (native-inputs
-     `(("cppo" ,(package-with-ocaml4.07 ocaml-cppo))))
+     `(("ocaml-cppo" ,ocaml-cppo)))
     (propagated-inputs
-     `(("lambda-term" ,ocaml4.07-lambda-term)
-       ("lwt" ,(package-with-ocaml4.07 ocaml-lwt))
-       ("react" ,(package-with-ocaml4.07 ocaml-react))
-       ("camomile" ,(package-with-ocaml4.07 ocaml-camomile))
-       ("zed" ,ocaml4.07-zed)))
-    (home-page "https://github.com/ocaml-community/utop")
+     `(("ocaml-lambda-term" ,ocaml-lambda-term)
+       ("ocaml-lwt" ,ocaml-lwt)
+       ("ocaml-lwt-react" ,ocaml-lwt-react)
+       ("ocaml-camomile" ,ocaml-camomile)
+       ("ocaml-react" ,ocaml-react)))
+    (properties `((ocaml4.07-variant . ,(delay ocaml4.07-utop))))
     (synopsis "Improved interface to the OCaml toplevel")
     (description "UTop is an improved toplevel for OCaml.  It can run in a
 terminal or in Emacs.  It supports line editing, history, real-time and context
 sensitive completion, colors, and more.")
     (license license:bsd-3)))
 
+(define-public ocaml4.07-utop
+  (package-with-ocaml4.07
+   (package
+     (inherit ocaml-utop)
+     (version "2.4.3")
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/ocaml-community/utop")
+              (commit version)))
+        (file-name (git-file-name "ocaml4.07-utop" version))
+        (sha256
+         (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
+     (propagated-inputs
+      `(("lambda-term" ,ocaml4.07-lambda-term)
+        ("lwt" ,(package-with-ocaml4.07 ocaml-lwt))
+        ("react" ,(package-with-ocaml4.07 ocaml-react))
+        ("camomile" ,(package-with-ocaml4.07 ocaml-camomile))
+        ("zed" ,ocaml4.07-zed)))
+     (properties '()))))
+
 (define-public ocaml-integers
   (package
     (name "ocaml-integers")