Subject: [PATCH v2 02/15] gnu: Add ocaml-jsonrpc.

From: Herman Rimm <[email-masked]>
Date: Thu, 26 Sep 2024 09:23:32 +0200

* gnu/packages/ocaml.scm (ocaml-jsonrpc): Add variable.

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a17b46a5b9..7dcc17357d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4005,6 +4005,45 @@ (define-public ocaml-jsonm
 without a complete in-memory representation of the data.")
     (license license:isc)))
 
+(define-public ocaml-jsonrpc
+  (package
+    (name "ocaml-jsonrpc")
+    (version "1.17.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ocaml/ocaml-lsp")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (modules '((guix build utils)))
+       (snippet #~(for-each delete-file-recursively
+                            '("jsonrpc-fiber"
+                              "lsp"
+                              "lsp.opam"
+                              "lsp-fiber"
+                              "ocaml-lsp-server"
+                              "ocaml-lsp-server.opam")))
+       (sha256
+        (base32
+         "1w1m2mi7va3wcwgvgzqd3af6hrhx5zzyr3hqa228pcimp44w6f0h"))))
+    (build-system dune-build-system)
+    (arguments `(#:package "jsonrpc"))
+    (propagated-inputs (list ocaml-odoc))
+    (native-inputs (list dune-stdune
+                         ocaml-dune-build-info
+                         ocaml-ppx-expect
+                         ocaml-ppx-inline-test
+                         ocaml-ppx-yojson-conv-lib
+                         ocaml-uutf
+                         ocaml-yojson))
+    (home-page "https://github.com/ocaml/ocaml-lsp")
+    (synopsis "JSON-RPC protocol implementation")
+    (description
+      "This package provides a JSON-RPC implementation as described in
+https://www.jsonrpc.org/specification.")
+    (license license:isc)))
+
 (define-public ocaml-ocp-indent
   (package
     (name "ocaml-ocp-indent")
-- 
2.45.2