[PATCH 00/14] Add ocaml-lsp-server and its dependencies

  • Open
  • quality assurance status badge
Details
3 participants
  • Benjamin
  • Ludovic Courtès
  • pukkamustard
Owner
unassigned
Submitted by
Benjamin
Severity
normal
B
B
Benjamin wrote on 21 Jun 2023 17:45
(address . guix-patches@gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
cover.1687361650.git.benjamin@uvy.fr
Hello,

These patches add ocaml-lsp-server package.

A lot of dependencies were required, but for most of them, this is just
a dune subpackage.
For ocaml-dune-build-info, note that I included the patch from [0]
and I used the same technique for other dune packages.

The latest version of ocaml-lsp-server depends on ocaml-merlin-lib.
I added a compatible version as a new package instead of upgrading
current ocaml-merlin-lib as I was not sure if it would be safe to do so.

Finally, the version 1.6.1 is supporting ocaml 5.0 and 5.1 [1] but I only
tested for 5.0.
Also, as 4.14 is not compatible with it, I only made public version 5.0
of it. I do not no either if was the good thing to be done.

I tested lsp server localy and it has been working fine with neovim for
my usage.



Benjamin (14):
gnu: Fix ocaml-dune-build-info
gnu: Add ocaml-dune-rpc.
gnu: Add ocaml-chrome-trace.
gnu: Add ocaml-dyn.
gnu: Add ocaml-stdune.
gnu: Add ocaml-fiber.
gnu: Add ocaml-xdg.
gnu: Add ocaml-ordering.
gnu: Add ocamlc-loc.
gnu: Add ocamlformat-rpc-lib.
gnu: Add ocaml-pp.
gnu: Add ocaml-ppx-yojson-conv-lib.
gnu: Add ocaml-merlin-lib-4.9.
gnu: Add ocaml-lsp-server.

gnu/packages/ocaml.scm | 290 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 289 insertions(+), 1 deletion(-)


base-commit: dcca13ed7340f17a33a4c0907c13b64d5da66a8e
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 01/14] gnu: Fix ocaml-dune-build-info
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
4a2ca732a0969bd82410021477b432b44ccc594f.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-dune-build-info): fix ocaml-dune-build-info
to make it compatible with package-with-ocaml5.0
---
gnu/packages/ocaml.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ab0aa0574a..7aa87ca4df 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9658,6 +9658,7 @@ (define-public ocaml-dune-build-info
(inherit dune)
(name "ocaml-dune-build-info")
(build-system dune-build-system)
+ (properties '())
(arguments
'(#:package "dune-build-info"
;; No separate test suite from dune.
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 02/14] gnu: Add ocaml-dune-rpc.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
3f8769082b56273ea3b212014e09b4ce1fd84115.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-dune-rpc): New variable.
---
gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7aa87ca4df..18825f607a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9672,6 +9672,30 @@ (define-public ocaml-dune-build-info
reporting the version from the version control system during development to
get an precise reference of when the executable was built.")))
+(define-public ocaml-dune-rpc
+ (package
+ (inherit dune)
+ (name "ocaml-dune-rpc")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "dune-rpc"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-csexp
+ ocaml-ordering
+ ocaml-dyn
+ ocaml-xdg
+ ocaml-stdune
+ ocaml-pp
+ ocaml-odoc))
+ (properties '())
+ (synopsis "Communicate with dune using rpc")
+ (description "Library to connect and control a running dune instance")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 03/14] gnu: Add ocaml-chrome-trace.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
88306cb0fdfcbcaa3e8c82b6059da748274376e0.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-chrome-trace): New variable.
---
gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 18825f607a..078c7837e7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9696,6 +9696,27 @@ (define-public ocaml-dune-rpc
(synopsis "Communicate with dune using rpc")
(description "Library to connect and control a running dune instance")))
+(define-public ocaml-chrome-trace
+ (package
+ (inherit dune)
+ (name "ocaml-chrome-trace")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "chrome-trace"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-odoc))
+ (properties '())
+ (synopsis "Chrome trace event generation library")
+ (description
+ "This library offers no backwards compatibility guarantees. Use at your own
+risk.")
+ (license license:expat)))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 04/14] gnu: Add ocaml-dyn.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
fc1837c4bce7788c178c452d2210dc5a8b907f8b.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-dyn): New variable.
---
gnu/packages/ocaml.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 078c7837e7..5ad86c7c20 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9717,6 +9717,24 @@ (define-public ocaml-chrome-trace
risk.")
(license license:expat)))
+(define-public ocaml-dyn
+ (package
+ (inherit dune)
+ (name "ocaml-dyn")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "dyn"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-ordering ocaml-pp ocaml-odoc))
+ (properties '())
+ (synopsis "Dynamic type")
+ (description "Dynamic type")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 05/14] gnu: Add ocaml-stdune.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
fc802394583c538bf0a007f8082e70ce0194474d.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-stdune): New variable.
---
gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 5ad86c7c20..3e5fe7c92a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9735,6 +9735,27 @@ (define-public ocaml-dyn
(synopsis "Dynamic type")
(description "Dynamic type")))
+(define-public ocaml-stdune
+ (package
+ (inherit dune)
+ (name "ocaml-stdune")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "stdune"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-dyn ocaml-ordering ocaml-pp ocaml-csexp
+ ocaml-odoc))
+ (properties '())
+ (synopsis "Dune's unstable standard library")
+ (description
+ "This library offers no backwards compatibility guarantees. Use at your own
+risk.")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 06/14] gnu: Add ocaml-fiber.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
33226aafe04e813c4141e5a3487ab31b863c78fe.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-fiber): New variable.
---
gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3e5fe7c92a..730a6ee014 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9756,6 +9756,26 @@ (define-public ocaml-stdune
"This library offers no backwards compatibility guarantees. Use at your own
risk.")))
+(define-public ocaml-fiber
+ (package
+ (inherit dune)
+ (name "ocaml-fiber")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "fiber"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-stdune ocaml-dyn ocaml-odoc))
+ (properties '())
+ (synopsis "Structured concurrency library")
+ (description
+ "This library offers no backwards compatibility guarantees. Use at your own
+risk.")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 07/14] gnu: Add ocaml-xdg.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
d8de5f4cf07a707e8716d204d2beaf04296a0531.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-xdg): New variable.
---
gnu/packages/ocaml.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 730a6ee014..da3794ad33 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9776,6 +9776,25 @@ (define-public ocaml-fiber
"This library offers no backwards compatibility guarantees. Use at your own
risk.")))
+(define-public ocaml-xdg
+ (package
+ (inherit dune)
+ (name "ocaml-xdg")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "xdg"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-odoc))
+ (properties '())
+ (synopsis "XDG Base Directory Specification")
+ (description
+ "https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 09/14] gnu: Add ocamlc-loc.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
216839fea045d048ef99cec4e808a8f166be689e.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocamlc-loc): New variable.
---
gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0d856aad8a..e482541d60 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9813,6 +9813,26 @@ (define-public ocaml-ordering
(synopsis "Element ordering")
(description "Element ordering")))
+(define-public ocamlc-loc
+ (package
+ (inherit dune)
+ (name "ocamlc-loc")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "ocamlc-loc"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-dyn ocaml-odoc))
+ (properties '())
+ (synopsis "Parse ocaml compiler output into structured form")
+ (description
+ "This library offers no backwards compatibility guarantees. Use at your own
+risk.")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 10/14] gnu: Add ocamlformat-rpc-lib.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
f1090ae7e004abab1c141c7eade57de1e05d77ec.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocamlformat-rpc-lib): New variable.
---
gnu/packages/ocaml.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e482541d60..30eb7e2209 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9908,6 +9908,20 @@ (define-public ocamlformat
a uniform style.")
(license license:expat)))
+(define-public ocamlformat-rpc-lib
+ (package
+ (inherit ocamlformat)
+ (name "ocamlformat-rpc-lib")
+ (arguments
+ '(#:package "ocamlformat-rpc-lib"
+ #:tests? #f))
+ (propagated-inputs (list ocaml-csexp ocaml-odoc))
+ (synopsis "Auto-formatter for OCaml code (RPC mode)")
+ (description
+ "OCamlFormat is a tool to automatically format OCaml code in a uniform style.
+This package defines a RPC interface to OCamlFormat")))
+
+
(define-public ocaml-bigstringaf
(package
(name "ocaml-bigstringaf")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 08/14] gnu: Add ocaml-ordering.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
03f780c110ad01c8e7ebbb42c2252d110e191b8d.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-ordering): New variable.
---
gnu/packages/ocaml.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index da3794ad33..0d856aad8a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9795,6 +9795,24 @@ (define-public ocaml-xdg
(description
"https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html")))
+(define-public ocaml-ordering
+ (package
+ (inherit dune)
+ (name "ocaml-ordering")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "ordering"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-odoc))
+ (properties '())
+ (synopsis "Element ordering")
+ (description "Element ordering")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 11/14] gnu: Add ocaml-pp.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
c306259b55a2a1acb626382555d6fcb60a1db2ad.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-pp): New variable.
---
gnu/packages/ocaml.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 30eb7e2209..ffc7a9e5e9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2015,6 +2015,37 @@ (define-public ocaml5.0-csexp
(propagated-inputs
`(("ocaml-result" ,ocaml5.0-result)))))
+(define-public ocaml-pp
+ (package
+ (name "ocaml-pp")
+ (version "1.1.2")
+ (home-page "https://github.com/ocaml-dune/pp")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0w7gxa85ffbd6jgs6ziarq69yi423f0qkpk05r3abh6lg8smw8pg"))))
+ (build-system dune-build-system)
+ (native-inputs (list ocaml-ppx-expect))
+ (synopsis "Pretty-printing library")
+ (description
+ "This library provides a lean alternative to the Format [1] module of the OCaml
+standard library. It aims to make it easy for users to do the right thing. If
+you have tried Format before but find its API complicated and difficult to use,
+then Pp might be a good choice for you. Pp uses the same concepts of boxes and
+break hints, and the final rendering is done to formatter from the Format
+module. However it defines its own algebra which some might find easier to work
+with and reason about. No previous knowledge is required to start using this
+library, however the various guides for the Format module such as this one [2]
+should be applicable to Pp as well. [1]:
+https://caml.inria.fr/pub/docs/manual-ocaml/libref/Format.html [2]:
+http://caml.inria.fr/resources/doc/guides/format.en.html")
+ (license license:expat)))
+
(define-public ocaml-migrate-parsetree
(package
(name "ocaml-migrate-parsetree")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 12/14] gnu: Add ocaml-ppx-yojson-conv-lib.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
570cb71b21f0c049b81664a226e6c5b48a0a8e08.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-ppx-yojson-conv-lib): New variable.
---
gnu/packages/ocaml.scm | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ffc7a9e5e9..794a7a96d3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6170,7 +6170,28 @@ (define-public ocaml-yojson
yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
serializers and deserializers from type definitions.")
(license license:bsd-3)))
-
+
+(define-public ocaml-ppx-yojson-conv-lib
+ (package
+ (name "ocaml-ppx-yojson-conv-lib")
+ (version "0.15.0")
+ (home-page "https://github.com/janestreet/ppx_yojson_conv_lib")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0slc5cwy60vx8gskmn20hmndjncpp5zs80a9wm7hxv8yl003i60y"))))
+ (build-system dune-build-system)
+ (propagated-inputs (list ocaml-yojson))
+ (properties `((upstream-name . "ppx_yojson_conv_lib")))
+ (synopsis "Runtime lib for ppx_yojson_conv")
+ (description "Part of the Jane Street's PPX rewriters collection.")
+ (license license:expat)))
+
(define-public ocaml-merlin-lib
(package
(name "ocaml-merlin-lib")
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 13/14] gnu: Add ocaml-merlin-lib-4.9.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
71f95751c269df1c5ff9367c805c5e9e1c6b1783.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-merlin-lib-4.9): New variable.
---
gnu/packages/ocaml.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 794a7a96d3..726f47a0e4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6238,6 +6238,23 @@ (define ocaml-merlin-lib-500
(define-public ocaml5.0-merlin-lib
(package-with-ocaml5.0 ocaml-merlin-lib-500))
+(define-public ocaml-merlin-lib-4.9
+ (package
+ (inherit ocaml-merlin-lib)
+ (name "ocaml-merlin-lib")
+ (version "4.9-500")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/merlin")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "186rb6cj9a18jhss3pablp48s7pl5xbmx8ih1dxbfh2wa3hvsdsb"))))
+ (properties '())))
+
(define-public ocaml-dot-merlin-reader
(package
(inherit ocaml-merlin-lib)
--
2.40.1
B
B
Benjamin wrote on 21 Jun 2023 17:48
[PATCH 14/14] gnu: Add ocaml-lsp-server.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
083d46189e6881fbcaf5b1d391164a5d74a9bf4f.1687361650.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-lsp-server): New variable.
---
gnu/packages/ocaml.scm | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 726f47a0e4..5306c7881a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6331,6 +6331,49 @@ (define-public ocaml5.0-merlin
Atom.")
(license license:expat))))
+;this package is not public because 1.16.1 only support ocaml 5.0 and 5.1
+(define ocaml-lsp-server
+ (package
+ (name "ocaml-lsp-server")
+ (version "1.16.1")
+ (home-page "https://github.com/ocaml/ocaml-lsp")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (sha256
+ (base32
+ "09410g0mmwhgcrxyygdzabmx26ahsa5madcs38ah2b6jygic4dzb"))))
+ (build-system dune-build-system)
+ (arguments '(#:tests? #f)) ; tests are failing for v1.16.1
+ (propagated-inputs (list ocaml-merlin-lib-4.9
+ ocamlformat-rpc-lib
+ ocaml-pp
+ ocamlc-loc
+ ocaml-spawn
+ ocaml-ordering
+ ocaml-fiber
+ ocaml-dyn
+ ocaml-dune-rpc
+ ocaml-re
+ ocaml-csexp
+ ocaml-uutf
+ ocaml-odoc-parser
+ ocaml-dune-build-info
+ ocaml-xdg
+ ocaml-stdune
+ ocaml-chrome-trace
+ ocaml-ppx-yojson-conv-lib
+ ocaml-yojson))
+ (native-inputs (list ocaml-ppx-expect ocamlformat ocaml-odoc))
+ (properties `((upstream-name . "ocaml-lsp-server")))
+ (synopsis "LSP Server for OCaml")
+ (description "An LSP server for OCaml.")
+ (license license:isc)))
+
+(define-public ocaml5.0-lsp-server (package-with-ocaml5.0 ocaml-lsp-server))
+
(define-public ocaml-gsl
(package
(name "ocaml-gsl")
--
2.40.1
L
L
Ludovic Courtès wrote on 18 Jul 2023 13:52
Re: bug#64209: [PATCH 00/14] Add ocaml-lsp-server and its dependencies
(name . Benjamin)(address . benjamin@uvy.fr)
87351ll9lz.fsf@gnu.org
Hi,

Benjamin <benjamin@uvy.fr> skribis:

Toggle quote (20 lines)
> A lot of dependencies were required, but for most of them, this is just
> a dune subpackage.
> For ocaml-dune-build-info, note that I included the patch from [0]
> and I used the same technique for other dune packages.
>
> The latest version of ocaml-lsp-server depends on ocaml-merlin-lib.
> I added a compatible version as a new package instead of upgrading
> current ocaml-merlin-lib as I was not sure if it would be safe to do so.
>
> Finally, the version 1.6.1 is supporting ocaml 5.0 and 5.1 [1] but I only
> tested for 5.0.
> Also, as 4.14 is not compatible with it, I only made public version 5.0
> of it. I do not no either if was the good thing to be done.
>
> I tested lsp server localy and it has been working fine with neovim for
> my usage.
>
> [0] https://issues.guix.gnu.org/63947
> [1] https://github.com/ocaml/ocaml-lsp/blob/master/CHANGES.md#1161

I’m not on the OCaml team, so I’ll let Julien and pukkamustard comment.

One issue: could you work on improving synopses and descriptions a bit
and submit a v2, as per
Don’t spend hours on this, but at least try to have sentences with a
bit of context in ‘description’.

Thanks in advance!

Ludo’.
P
P
pukkamustard wrote on 6 Aug 2023 22:25
Re: [bug#64209] [PATCH 00/14] Add ocaml-lsp-server and its dependencies
(name . Benjamin)(address . benjamin@uvy.fr)
86tttb99xq.fsf@posteo.net
Hi,

Thanks for the patches!

Couldn't look at everything yet, just some initial remarks.

Benjamin <benjamin@uvy.fr> writes:

Toggle quote (9 lines)
> Hello,
>
> These patches add ocaml-lsp-server package.
>
> ...
>
> Benjamin (14):
> gnu: Fix ocaml-dune-build-info

Lgtm, this patch would fix #63947.

Toggle quote (2 lines)
> gnu: Add ocaml-dune-rpc.

There seems to be an issue with the ordering of the patches. I can not
build ocaml-dune-rpc, as it requires ocaml-ordering which is only
available a couple of commits later.

In general, try to make things build at every commit. In this case it
requires re-ordering the commits.

Could you explain why the 'remove-vendor phase is needed? It seems like
if code is vendored it should maybe also be removed in the `dune`
package?

As Ludo mentioned, the description and synopses could use a little bit
of improvement. For example descriptions should be full sentences.

Toggle quote (2 lines)
> gnu: Add ocaml-chrome-trace.

We need a more descriptive description.

I guess the descriptions come from OPAM. Unfortunately Guix has stricter
requirements than OPAM...:)

-pukkamustard
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 03/14] gnu: Add ocamlformat-rpc-lib.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
1e8578485ee4b894c8115510d2245f73efa75db3.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocamlformat-rpc-lib): New variable.
---
gnu/packages/ocaml.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e664f33955..1da68ab162 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9777,6 +9777,19 @@ (define-public ocamlformat
a uniform style.")
(license license:expat)))
+(define-public ocamlformat-rpc-lib
+ (package
+ (inherit ocamlformat)
+ (name "ocamlformat-rpc-lib")
+ (arguments
+ '(#:package "ocamlformat-rpc-lib"
+ #:tests? #f))
+ (propagated-inputs (list ocaml-csexp ocaml-odoc))
+ (synopsis "Auto-formatter for OCaml code in RPC mode")
+ (description
+ "OCamlFormat is a tool to automatically format OCaml code in a uniform style.
+This package defines a RPC interface to OCamlFormat")))
+
(define-public ocaml-bigstringaf
(package
(name "ocaml-bigstringaf")
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 04/14] gnu: Add ocaml-ppx-yojson-conv-lib.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
4cb88f66628e496efdce1eaf1cfd3b08bff2a185.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-ppx-yojson-conv-lib): New variable.
---
gnu/packages/ocaml.scm | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1da68ab162..ec21a26d19 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6169,7 +6169,28 @@ (define-public ocaml-yojson
yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
serializers and deserializers from type definitions.")
(license license:bsd-3)))
-
+
+(define-public ocaml-ppx-yojson-conv-lib
+ (package
+ (name "ocaml-ppx-yojson-conv-lib")
+ (version "0.15.0")
+ (home-page "https://github.com/janestreet/ppx_yojson_conv_lib")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0slc5cwy60vx8gskmn20hmndjncpp5zs80a9wm7hxv8yl003i60y"))))
+ (build-system dune-build-system)
+ (propagated-inputs (list ocaml-yojson))
+ (properties `((upstream-name . "ppx_yojson_conv_lib")))
+ (synopsis "Runtime lib for ppx_yojson_conv")
+ (description "This library is a part of the Jane Street's PPX rewriters collection.")
+ (license license:expat)))
+
(define-public ocaml-merlin-lib
(package
(name "ocaml-merlin-lib")
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:22
[PATCH v2 00/14] Reorder commits and better descriptions
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
cover.1691500834.git.benjamin@uvy.fr
Hi

I’am updating, my first series of patches.

I bumped ocaml-lsp-server to latest patch

Toggle quote (4 lines)
> There seems to be an issue with the ordering of the patches. I can not
> build ocaml-dune-rpc, as it requires ocaml-ordering which is only
> available a couple of commits later.

I reordered commits so that each package can be built for each commit

Toggle quote (4 lines)
> Could you explain why the 'remove-vendor phase is needed? It seems like
> if code is vendored it should maybe also be removed in the `dune`
> package?

I did this because I saw that opam build is doing this way :

If those vendor files are not remove, there was some errors when
building ocaml-stdune

```
File "otherlibs/stdune/path.mli", line 1:
Error: The files otherlibs/stdune/.stdune.objs/byte/stdune__Path_intf.cmi
and /gnu/store/wig75gdqm284z6y89dcd75fmxzim307a-ocaml5.0-pp-1.1.2/lib/ocaml/site-lib/pp/pp.cmi
make inconsistent assumptions over interface Pp
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "dune" arguments: ("build" "@install" "-p" "stdune") exit-status: 1 term-signal: #f stop-signal: #f>
phase `build' failed after 1.8 seconds
command "dune" "build" "@install" "-p" "stdune" failed with status 1
builder for `/gnu/store/cb2n85al5bqn6q3pcaiil01p9wvfbpvw-ocaml5.0-stdune-3.6.1.drv' failed with exit code 1
build of /gnu/store/cb2n85al5bqn6q3pcaiil01p9wvfbpvw-ocaml5.0-stdune-3.6.1.drv failed
```

Because it has been repeated for each dune sublibraries, it probably
make sense to share this part of the code.
Though I don't know if we can directly do that for dune as those

Toggle quote (5 lines)
> We need a more descriptive description.

> I guess the descriptions come from OPAM. Unfortunately Guix has stricter
> requirements than OPAM...:)

You are right, I just took descriptions from opam and did not edit them
I updated some of the description and synopsis. Tell if it is enough.
As I don't exactly know what packages are doing, I just picked up descriptions
from source files comments

Tell me if you have other comments on those patches

Best

Benjamin

Benjamin (14):
gnu: Fix ocaml-dune-build-info
gnu: Add ocaml-pp.
gnu: Add ocamlformat-rpc-lib.
gnu: Add ocaml-ppx-yojson-conv-lib.
gnu: Add ocaml-ordering.
gnu: Add ocaml-dyn.
gnu: Add ocaml-stdune.
gnu: Add ocaml-chrome-trace.
gnu: Add ocaml-xdg.
gnu: Add ocamlc-loc.
gnu: Add ocaml-fiber.
gnu: Add ocaml-dune-rpc.
gnu: Add ocaml-merlin-lib-4.9.
gnu: Add ocaml-lsp-server.

gnu/packages/ocaml.scm | 295 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 294 insertions(+), 1 deletion(-)


base-commit: b20e5bcafd9654a767ffb78eefd7494f73ca67c8
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:22
[PATCH v2 01/14] gnu: Fix ocaml-dune-build-info
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
03c44a096cfcabc480411e8f6a7685dabbbc6ea1.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-dune-build-info): fix ocaml-dune-build-info
to make it compatible with package-with-ocaml5.0
---
gnu/packages/ocaml.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 8ff755aea9..552afc4784 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9657,6 +9657,7 @@ (define-public ocaml-dune-build-info
(inherit dune)
(name "ocaml-dune-build-info")
(build-system dune-build-system)
+ (properties '())
(arguments
'(#:package "dune-build-info"
;; No separate test suite from dune.
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:22
[PATCH v2 02/14] gnu: Add ocaml-pp.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
90cc05c03d34058c2650aaa5a7f83710f1164562.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-pp): New variable.
---
gnu/packages/ocaml.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 552afc4784..e664f33955 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2014,6 +2014,37 @@ (define-public ocaml5.0-csexp
(propagated-inputs
`(("ocaml-result" ,ocaml5.0-result)))))
+(define-public ocaml-pp
+ (package
+ (name "ocaml-pp")
+ (version "1.1.2")
+ (home-page "https://github.com/ocaml-dune/pp")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0w7gxa85ffbd6jgs6ziarq69yi423f0qkpk05r3abh6lg8smw8pg"))))
+ (build-system dune-build-system)
+ (native-inputs (list ocaml-ppx-expect))
+ (synopsis "Pretty-printing library")
+ (description
+ "This library provides a lean alternative to the Format [1] module of the OCaml
+standard library. It aims to make it easy for users to do the right thing. If
+you have tried Format before but find its API complicated and difficult to use,
+then Pp might be a good choice for you. Pp uses the same concepts of boxes and
+break hints, and the final rendering is done to formatter from the Format
+module. However it defines its own algebra which some might find easier to work
+with and reason about. No previous knowledge is required to start using this
+library, however the various guides for the Format module such as this one [2]
+should be applicable to Pp as well. [1]:
+https://caml.inria.fr/pub/docs/manual-ocaml/libref/Format.html [2]:
+http://caml.inria.fr/resources/doc/guides/format.en.html")
+ (license license:expat)))
+
(define-public ocaml-migrate-parsetree
(package
(name "ocaml-migrate-parsetree")
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 05/14] gnu: Add ocaml-ordering.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
ab8e8fd93e8d8bdcc174f149dd529c9194a13123.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-ordering): New variable.
---
gnu/packages/ocaml.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ec21a26d19..45e34c7d66 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9723,6 +9723,25 @@ (define-public ocaml-dune-build-info
reporting the version from the version control system during development to
get an precise reference of when the executable was built.")))
+(define-public ocaml-ordering
+ (package
+ (inherit dune)
+ (name "ocaml-ordering")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "ordering"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-odoc))
+ (properties '())
+ (synopsis "Element ordering library")
+ (description "This library implement element ordering and a convenient
+operator for efficiently chaining multiple comparisons together.")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 06/14] gnu: Add ocaml-dyn.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
201c2384c8ca530ecd0b50c2ce16e373a05c91eb.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-dyn): New variable.
---
gnu/packages/ocaml.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 45e34c7d66..88a72a2220 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9723,6 +9723,25 @@ (define-public ocaml-dune-build-info
reporting the version from the version control system during development to
get an precise reference of when the executable was built.")))
+(define-public ocaml-dyn
+ (package
+ (inherit dune)
+ (name "ocaml-dyn")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "dyn"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-ordering ocaml-pp ocaml-odoc))
+ (properties '())
+ (synopsis "Dynamic type library")
+ (description "Representation of OCaml values such that they can be
+processed without knowing their type")))
+
(define-public ocaml-ordering
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 07/14] gnu: Add ocaml-stdune.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
dea60a458a27db60ccc8b23ba183e33a2f2e9239.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-stdune): New variable.
---
gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 88a72a2220..fb7612ee1b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9742,6 +9742,27 @@ (define-public ocaml-dyn
(description "Representation of OCaml values such that they can be
processed without knowing their type")))
+(define-public ocaml-stdune
+ (package
+ (inherit dune)
+ (name "ocaml-stdune")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "stdune"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-dyn ocaml-ordering ocaml-pp ocaml-csexp
+ ocaml-odoc))
+ (properties '())
+ (synopsis "Dune's unstable standard library")
+ (description
+ "This library is dune standard library. It offers no backwards
+compatibility guarantees. You should use it at your own risk.")))
+
(define-public ocaml-ordering
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 08/14] gnu: Add ocaml-chrome-trace.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
1b9cce8818b09259d25536d083d4566866e25296.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-chrome-trace): New variable.
---
gnu/packages/ocaml.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index fb7612ee1b..e037009ae8 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9723,6 +9723,29 @@ (define-public ocaml-dune-build-info
reporting the version from the version control system during development to
get an precise reference of when the executable was built.")))
+(define-public ocaml-chrome-trace
+ (package
+ (inherit dune)
+ (name "ocaml-chrome-trace")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "chrome-trace"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-odoc))
+ (properties '())
+ (synopsis "Chrome trace event generation library")
+ (description
+ "Output trace data to a file in Chrome's trace_event format. This format is
+ compatible with chrome trace viewer [chrome://tracing].
+ This library offers no backwards compatibility guarantees. Use at your own
+risk.")
+ (license license:expat)))
+
(define-public ocaml-dyn
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 09/14] gnu: Add ocaml-xdg.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
765ad52e637eecd1009213d9126d7122ba453ce5.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-xdg): New variable.
---
gnu/packages/ocaml.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e037009ae8..3d36c9ec7d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9786,6 +9786,25 @@ (define-public ocaml-stdune
"This library is dune standard library. It offers no backwards
compatibility guarantees. You should use it at your own risk.")))
+(define-public ocaml-xdg
+ (package
+ (inherit dune)
+ (name "ocaml-xdg")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "xdg"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-odoc))
+ (properties '())
+ (synopsis "XDG Base Directory Specification")
+ (description
+ "https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html")))
+
(define-public ocaml-ordering
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 10/14] gnu: Add ocamlc-loc.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
dfba1653fe4464199828737ee2f2e9634fcac7b7.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocamlc-loc): New variable.
---
gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3d36c9ec7d..c0cb55ac32 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9824,6 +9824,26 @@ (define-public ocaml-ordering
(description "This library implement element ordering and a convenient
operator for efficiently chaining multiple comparisons together.")))
+(define-public ocamlc-loc
+ (package
+ (inherit dune)
+ (name "ocamlc-loc")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "ocamlc-loc"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-dyn ocaml-odoc))
+ (properties '())
+ (synopsis "Parse ocaml compiler output into structured form")
+ (description
+ "This library offers no backwards compatibility guarantees. Use at your own
+risk.")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 11/14] gnu: Add ocaml-fiber.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
0ea26472bc15c7a50838ef86dd4e1e1431bf4b41.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-fiber): New variable.
---
gnu/packages/ocaml.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c0cb55ac32..1958e19028 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9786,6 +9786,28 @@ (define-public ocaml-stdune
"This library is dune standard library. It offers no backwards
compatibility guarantees. You should use it at your own risk.")))
+(define-public ocaml-fiber
+ (package
+ (inherit dune)
+ (name "ocaml-fiber")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "fiber"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-stdune ocaml-dyn ocaml-odoc))
+ (properties '())
+ (synopsis "Structured concurrency library")
+ (description
+ "This library implements structured concurrency :
+ https://en.wikipedia.org/wiki/Structured_concurrency
+ It offers no backwards compatibility guarantees. Use at your own
+risk.")))
+
(define-public ocaml-xdg
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 13/14] gnu: Add ocaml-merlin-lib-4.9.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
23ff61518f9d452aec0effe900532dd33f393cd7.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-merlin-lib-4.9): New variable.
---
gnu/packages/ocaml.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 50cd80e761..b57c61ff8c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6237,6 +6237,23 @@ (define ocaml-merlin-lib-500
(define-public ocaml5.0-merlin-lib
(package-with-ocaml5.0 ocaml-merlin-lib-500))
+(define-public ocaml-merlin-lib-4.9
+ (package
+ (inherit ocaml-merlin-lib)
+ (name "ocaml-merlin-lib")
+ (version "4.9-500")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/merlin")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "186rb6cj9a18jhss3pablp48s7pl5xbmx8ih1dxbfh2wa3hvsdsb"))))
+ (properties '())))
+
(define-public ocaml-dot-merlin-reader
(package
(inherit ocaml-merlin-lib)
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 12/14] gnu: Add ocaml-dune-rpc.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
a509e95d5981f735afb3034f8e87bbc36a89929a.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-dune-rpc): New variable.
---
gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1958e19028..50cd80e761 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9723,6 +9723,30 @@ (define-public ocaml-dune-build-info
reporting the version from the version control system during development to
get an precise reference of when the executable was built.")))
+(define-public ocaml-dune-rpc
+ (package
+ (inherit dune)
+ (name "ocaml-dune-rpc")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "dune-rpc"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-csexp
+ ocaml-ordering
+ ocaml-dyn
+ ocaml-xdg
+ ocaml-stdune
+ ocaml-pp
+ ocaml-odoc))
+ (properties '())
+ (synopsis "Communicate with dune using rpc")
+ (description "Library to connect and control a running dune instance")))
+
(define-public ocaml-chrome-trace
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 8 Aug 2023 15:23
[PATCH v2 14/14] gnu: Add ocaml-lsp-server.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
321ec1fd18676878a8c81b4e65942c800f2d9033.1691500834.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-lsp-server): New variable.
---
gnu/packages/ocaml.scm | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b57c61ff8c..ee87e84c0b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6330,6 +6330,49 @@ (define-public ocaml5.0-merlin
Atom.")
(license license:expat))))
+;this package is not public because 1.16.1 only support ocaml 5.0 and 5.1
+(define ocaml-lsp-server
+ (package
+ (name "ocaml-lsp-server")
+ (version "1.16.2")
+ (home-page "https://github.com/ocaml/ocaml-lsp")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (sha256
+ (base32
+ "1nd1655allyml2qpr6asxv3d2pdq5clw7vx7zx9bfiawyi2szsn8"))))
+ (build-system dune-build-system)
+ (arguments '(#:tests? #f)) ; tests are failing for v1.16.1
+ (propagated-inputs (list ocaml-merlin-lib-4.9
+ ocamlformat-rpc-lib
+ ocaml-pp
+ ocamlc-loc
+ ocaml-spawn
+ ocaml-ordering
+ ocaml-fiber
+ ocaml-dyn
+ ocaml-dune-rpc
+ ocaml-re
+ ocaml-csexp
+ ocaml-uutf
+ ocaml-odoc-parser
+ ocaml-dune-build-info
+ ocaml-xdg
+ ocaml-stdune
+ ocaml-chrome-trace
+ ocaml-ppx-yojson-conv-lib
+ ocaml-yojson))
+ (native-inputs (list ocaml-ppx-expect ocamlformat ocaml-odoc))
+ (properties `((upstream-name . "ocaml-lsp-server")))
+ (synopsis "LSP Server for OCaml")
+ (description "This package implements an Ocaml language server implementation.")
+ (license license:isc)))
+
+(define-public ocaml5.0-lsp-server (package-with-ocaml5.0 ocaml-lsp-server))
+
(define-public ocaml-gsl
(package
(name "ocaml-gsl")
--
2.41.0
P
P
pukkamustard wrote on 14 Oct 2023 11:37
Re: [bug#64209] [PATCH v2 00/14] Reorder commits and better descriptions
(name . Benjamin)(address . benjamin@uvy.fr)
86bkd17coq.fsf@posteo.net
Hi,

Thanks for the update. I haven't been able to check it thoroughly yet.

Unfortunately the synopsis/descriptions still need a bit of polish. For
example (non-exhaustive):

- ocaml-pp: The synopsis should indicate that it is an OCaml
library. For markup (in this case hyerplinks) you must use the Texinfo
- ocamlformat-rpc-lib: Final sentence is missing a punctuation.
- ocaml-ppx-yojson-conv-lib: See ocaml-ppx-fields-conv for an example of
a better description/synopsis.
- ocaml-dyn: Missing punctiation mark.
- ocaml-stdune: Not sure about the description.
- ocaml-xdg: Description should be more than just a link.

Also maybe we first re-solve #63947 (https://issues.guix.gnu.org/63947;
friendly ping to Julien) instead of re-fixining it in this series.

Cheers,
pukkamustard
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 01/14] gnu: Fix ocaml-dune-build-info
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
cd46c0a5fc265972fd7abdf17d97a8f25ed78e46.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-dune-build-info): fix ocaml-dune-build-info
to make it compatible with package-with-ocaml5.0
---
gnu/packages/ocaml.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7993dbaa73..2fd2f8e9f9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9627,6 +9627,7 @@ (define-public ocaml-dune-build-info
(inherit dune)
(name "ocaml-dune-build-info")
(build-system dune-build-system)
+ (properties '())
(arguments
'(#:package "dune-build-info"
;; No separate test suite from dune.
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 00/14] improve synopsies and descriptions
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
cover.1699630991.git.benjamin@uvy.fr
Hello,

Here we go for the third revision.
- I rebase on latest master
- I updated synopsies and added "ocaml" in all of then.
- I updated descriptions, add a final "." in all of them and tried to
make them more understanable

Tell me if there is more to be changed. I'll try to fix changes much
faster than last time.

Best

Benjamin

Benjamin (14):
gnu: Fix ocaml-dune-build-info
gnu: Add ocaml-pp.
gnu: Add ocamlformat-rpc-lib.
gnu: Add ocaml-ppx-yojson-conv-lib.
gnu: Add ocaml-ordering.
gnu: Add ocaml-dyn.
gnu: Add ocaml-stdune.
gnu: Add ocaml-chrome-trace.
gnu: Add ocaml-xdg.
gnu: Add ocamlc-loc.
gnu: Add ocaml-fiber.
gnu: Add ocaml-dune-rpc.
gnu: Add ocaml-merlin-lib-4.9.
gnu: Add ocaml-lsp-server.

gnu/packages/ocaml.scm | 291 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 290 insertions(+), 1 deletion(-)


base-commit: bb3ab24a296ffa5273b2e82a02ed057e90c095f3
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 02/14] gnu: Add ocaml-pp.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
e33a01b5729a4b7fa02ff08cbcc816595bd8f7d3.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-pp): New variable.

Change-Id: Ic1782f531515802facb7fbcaea35405feffe2dc3
---
gnu/packages/ocaml.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2fd2f8e9f9..497588c4ea 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1980,6 +1980,33 @@ (define-public ocaml5.0-csexp
(propagated-inputs
`(("ocaml-result" ,ocaml5.0-result)))))
+(define-public ocaml-pp
+ (package
+ (name "ocaml-pp")
+ (version "1.1.2")
+ (home-page "https://github.com/ocaml-dune/pp")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0w7gxa85ffbd6jgs6ziarq69yi423f0qkpk05r3abh6lg8smw8pg"))))
+ (build-system dune-build-system)
+ (native-inputs (list ocaml-ppx-expect))
+ (synopsis "Pretty-printing library for ocaml that aims to be easy to use")
+ (description
+ "This library provides a lean alternative to the Format module of the OCaml
+standard library. It aims to make it easy for users to do the right thing. If
+you have tried Format before but find its API complicated and difficult to use,
+then Pp might be a good choice for you. Pp uses the same concepts of boxes and
+break hints, and the final rendering is done to formatter from the Format
+module. However it defines its own algebra which some might find easier to work
+with and reason about.")
+ (license license:expat)))
+
(define-public ocaml-migrate-parsetree
(package
(name "ocaml-migrate-parsetree")
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 03/14] gnu: Add ocamlformat-rpc-lib.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
ebe642583948659af8d78a451bd3591b091487ab.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocamlformat-rpc-lib): New variable.

Change-Id: I960fb7bb4647c1ec1def870d5ec5afe6411347cf
---
gnu/packages/ocaml.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 497588c4ea..3aeec614ca 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9743,6 +9743,19 @@ (define-public ocamlformat
a uniform style.")
(license license:expat)))
+(define-public ocamlformat-rpc-lib
+ (package
+ (inherit ocamlformat)
+ (name "ocamlformat-rpc-lib")
+ (arguments
+ '(#:package "ocamlformat-rpc-lib"
+ #:tests? #f))
+ (propagated-inputs (list ocaml-csexp ocaml-odoc))
+ (synopsis "Auto-formatter for OCaml code in RPC mode")
+ (description
+ "OCamlFormat is a tool to automatically format OCaml code in a uniform style.
+This package defines a RPC interface to OCamlFormat.")))
+
(define-public ocaml-bigstringaf
(package
(name "ocaml-bigstringaf")
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 04/14] gnu: Add ocaml-ppx-yojson-conv-lib.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
347a36477eb86e13a2a6158641c75b4de6e29486.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-ppx-yojson-conv-lib): New variable.

Change-Id: Iff772e4492ec80071ba99ba473164da9440a1f63
---
gnu/packages/ocaml.scm | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3aeec614ca..6cf88e08c0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6135,7 +6135,30 @@ (define-public ocaml-yojson
yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
serializers and deserializers from type definitions.")
(license license:bsd-3)))
-
+
+(define-public ocaml-ppx-yojson-conv-lib
+ (package
+ (name "ocaml-ppx-yojson-conv-lib")
+ (version "0.15.0")
+ (home-page "https://github.com/janestreet/ppx_yojson_conv_lib")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0slc5cwy60vx8gskmn20hmndjncpp5zs80a9wm7hxv8yl003i60y"))))
+ (build-system dune-build-system)
+ (propagated-inputs (list ocaml-yojson))
+ (properties `((upstream-name . "ppx_yojson_conv_lib")))
+ (synopsis "Runtime library used by ocaml PPX yojson convertor")
+ (description "Ppx_yojson_conv_lib is the runtime library used by
+ppx_yojson_conv, a ppx rewriter that can be used to convert ocaml types
+to a Yojson.Safe value.")
+ (license license:expat)))
+
(define-public ocaml-merlin-lib
(package
(name "ocaml-merlin-lib")
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 05/14] gnu: Add ocaml-ordering.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
ffe6bfe800cd6e50a30d014d0b1e6f408198c558.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-ordering): New variable.

Change-Id: I358f4759e050c2d2d24f611a70149bf38e2f1c59
---
gnu/packages/ocaml.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6cf88e08c0..1b4bd8685e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9691,6 +9691,25 @@ (define-public ocaml-dune-build-info
reporting the version from the version control system during development to
get an precise reference of when the executable was built.")))
+(define-public ocaml-ordering
+ (package
+ (inherit dune)
+ (name "ocaml-ordering")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "ordering"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-odoc))
+ (properties '())
+ (synopsis "Ocaml element ordering library")
+ (description "This library implement element ordering and a convenient
+operator for efficiently chaining multiple comparisons together.")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 06/14] gnu: Add ocaml-dyn.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
b282750919e32cec71b90fc1d809e9571f0df4ab.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-dyn): New variable.

Change-Id: I4f35a5e3e9271f70cfd88845964d24257d1d0ddf
---
gnu/packages/ocaml.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1b4bd8685e..0cafb8c6ee 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9691,6 +9691,25 @@ (define-public ocaml-dune-build-info
reporting the version from the version control system during development to
get an precise reference of when the executable was built.")))
+(define-public ocaml-dyn
+ (package
+ (inherit dune)
+ (name "ocaml-dyn")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "dyn"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-ordering ocaml-pp ocaml-odoc))
+ (properties '())
+ (synopsis "Ocaml dynamic type library")
+ (description "Representation of OCaml values such that they can be
+processed without knowing their type.")))
+
(define-public ocaml-ordering
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 08/14] gnu: Add ocaml-chrome-trace.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
a64bdfd9d04ff5b2ffb7d151630216b13ab7e7be.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-chrome-trace): New variable.

Change-Id: I3c761ff694a0be32171df0fa3f57c6930b9c5438
---
gnu/packages/ocaml.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a97ae57b56..76cc995753 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9691,6 +9691,28 @@ (define-public ocaml-dune-build-info
reporting the version from the version control system during development to
get an precise reference of when the executable was built.")))
+(define-public ocaml-chrome-trace
+ (package
+ (inherit dune)
+ (name "ocaml-chrome-trace")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "chrome-trace"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-odoc))
+ (properties '())
+ (synopsis "Chrome trace event generation library for ocaml")
+ (description
+ "Output trace data to a file in Chrome's trace_event format. This format is
+ compatible with chrome trace viewer chrome://tracing.
+ This library offers no backwards compatibility guarantees.")
+ (license license:expat)))
+
(define-public ocaml-dyn
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 07/14] gnu: Add ocaml-stdune.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
a36d15f35c19c41069de88a006d868af16464d04.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-stdune): New variable.

Change-Id: Iac602da6a41ed99264c9a20fac989d43e2e9ed0d
---
gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0cafb8c6ee..a97ae57b56 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9710,6 +9710,27 @@ (define-public ocaml-dyn
(description "Representation of OCaml values such that they can be
processed without knowing their type.")))
+(define-public ocaml-stdune
+ (package
+ (inherit dune)
+ (name "ocaml-stdune")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "stdune"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-dyn ocaml-ordering ocaml-pp ocaml-csexp
+ ocaml-odoc))
+ (properties '())
+ (synopsis "Ocaml Dune's unstable standard library")
+ (description
+ "This library is dune standard library. It offers no backwards
+compatibility guarantees.")))
+
(define-public ocaml-ordering
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 09/14] gnu: Add ocaml-xdg.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
a7e05e3db1194290adf0f33674cbac6aadd9fd89.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-xdg): New variable.

Change-Id: Ie4246d9e655fafd60e650ac8043bdc6d51bcb737
---
gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 76cc995753..a12e7f4264 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9753,6 +9753,26 @@ (define-public ocaml-stdune
"This library is dune standard library. It offers no backwards
compatibility guarantees.")))
+(define-public ocaml-xdg
+ (package
+ (inherit dune)
+ (name "ocaml-xdg")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "xdg"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-odoc))
+ (properties '())
+ (synopsis "XDG Base Directory Specification library for ocaml")
+ (description
+ "This ocaml library returns user XDG directories such as XDG_CONFIG_HOME,
+ XDG_STATE_HOME.")))
+
(define-public ocaml-ordering
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 10/14] gnu: Add ocamlc-loc.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
a79c69b50ac1706a9e9437747e5786c9c10547be.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocamlc-loc): New variable.

Change-Id: I6f07101aa27eb5879ab8c33a72e4278ba09b6b92
---
gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a12e7f4264..2af4f4133f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9792,6 +9792,26 @@ (define-public ocaml-ordering
(description "This library implement element ordering and a convenient
operator for efficiently chaining multiple comparisons together.")))
+(define-public ocamlc-loc
+ (package
+ (inherit dune)
+ (name "ocamlc-loc")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "ocamlc-loc"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-dyn ocaml-odoc))
+ (properties '())
+ (synopsis "Parse ocaml compiler output into structured form")
+ (description
+ "This library parses ocaml complier output and returns it as ocaml values.
+This library offers no backwards compatibility guarantees.")))
+
(define-public ocaml-either
(package
(name "ocaml-either")
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 11/14] gnu: Add ocaml-fiber.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
562531b201c3165ec8d5a0a3fefdeee4bd716835.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-fiber): New variable.

Change-Id: I712cc3d907915fe9e1a0d3ff9e02bd6514130645
---
gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2af4f4133f..733bcd011e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9753,6 +9753,26 @@ (define-public ocaml-stdune
"This library is dune standard library. It offers no backwards
compatibility guarantees.")))
+(define-public ocaml-fiber
+ (package
+ (inherit dune)
+ (name "ocaml-fiber")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "fiber"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-stdune ocaml-dyn ocaml-odoc))
+ (properties '())
+ (synopsis "Structured concurrency library for ocaml")
+ (description
+ "This library implements structured concurrency for ocaml.
+ It offers no backwards compatibility guarantees.")))
+
(define-public ocaml-xdg
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 13/14] gnu: Add ocaml-merlin-lib-4.9.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
c8a4cc17da4b8513c08d30426f26ea66ab25ecfb.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-merlin-lib-4.9): New variable.
---
gnu/packages/ocaml.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e96beeed56..f9405ae2b9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6205,6 +6205,23 @@ (define ocaml-merlin-lib-500
(define-public ocaml5.0-merlin-lib
(package-with-ocaml5.0 ocaml-merlin-lib-500))
+(define-public ocaml-merlin-lib-4.9
+ (package
+ (inherit ocaml-merlin-lib)
+ (name "ocaml-merlin-lib")
+ (version "4.9-500")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/merlin")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "186rb6cj9a18jhss3pablp48s7pl5xbmx8ih1dxbfh2wa3hvsdsb"))))
+ (properties '())))
+
(define-public ocaml-dot-merlin-reader
(package
(inherit ocaml-merlin-lib)
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 12/14] gnu: Add ocaml-dune-rpc.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
0d1362ebc5b2475bcc6a2a0cd9a6b07ff90b28e1.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-dune-rpc): New variable.

Change-Id: Iccdb76ffa3ca7a896de9f349939df77dfaca35f8
---
gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 733bcd011e..e96beeed56 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9691,6 +9691,30 @@ (define-public ocaml-dune-build-info
reporting the version from the version control system during development to
get an precise reference of when the executable was built.")))
+(define-public ocaml-dune-rpc
+ (package
+ (inherit dune)
+ (name "ocaml-dune-rpc")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "dune-rpc"
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'remove-vendor
+ (lambda _
+ (delete-file-recursively "vendor/csexp")
+ (delete-file-recursively "vendor/pp"))))))
+ (propagated-inputs (list ocaml-csexp
+ ocaml-ordering
+ ocaml-dyn
+ ocaml-xdg
+ ocaml-stdune
+ ocaml-pp
+ ocaml-odoc))
+ (properties '())
+ (synopsis "Communicate with ocaml dune using rpc")
+ (description "Library to connect and control a running dune instance.")))
+
(define-public ocaml-chrome-trace
(package
(inherit dune)
--
2.41.0
B
B
Benjamin wrote on 10 Nov 2023 16:46
[PATCH v3 14/14] gnu: Add ocaml-lsp-server.
(address . 64209@debbugs.gnu.org)(name . Benjamin)(address . benjamin@uvy.fr)
04fccf1e6952e13e2e89404bef218c540aae2e16.1699630991.git.benjamin@uvy.fr
* gnu/packages/ocaml.scm (ocaml-lsp-server): New variable.
---
gnu/packages/ocaml.scm | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f9405ae2b9..3d2826f0ce 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6298,6 +6298,49 @@ (define-public ocaml5.0-merlin
Atom.")
(license license:expat))))
+;this package is not public because 1.16.1 only support ocaml 5.0 and 5.1
+(define ocaml-lsp-server
+ (package
+ (name "ocaml-lsp-server")
+ (version "1.16.2")
+ (home-page "https://github.com/ocaml/ocaml-lsp")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (sha256
+ (base32
+ "1nd1655allyml2qpr6asxv3d2pdq5clw7vx7zx9bfiawyi2szsn8"))))
+ (build-system dune-build-system)
+ (arguments '(#:tests? #f)) ; tests are failing for v1.16.1
+ (propagated-inputs (list ocaml-merlin-lib-4.9
+ ocamlformat-rpc-lib
+ ocaml-pp
+ ocamlc-loc
+ ocaml-spawn
+ ocaml-ordering
+ ocaml-fiber
+ ocaml-dyn
+ ocaml-dune-rpc
+ ocaml-re
+ ocaml-csexp
+ ocaml-uutf
+ ocaml-odoc-parser
+ ocaml-dune-build-info
+ ocaml-xdg
+ ocaml-stdune
+ ocaml-chrome-trace
+ ocaml-ppx-yojson-conv-lib
+ ocaml-yojson))
+ (native-inputs (list ocaml-ppx-expect ocamlformat ocaml-odoc))
+ (properties `((upstream-name . "ocaml-lsp-server")))
+ (synopsis "LSP Server for OCaml")
+ (description "This package implements an Ocaml language server implementation.")
+ (license license:isc)))
+
+(define-public ocaml5.0-lsp-server (package-with-ocaml5.0 ocaml-lsp-server))
+
(define-public ocaml-gsl
(package
(name "ocaml-gsl")
--
2.41.0
?