GNU bug report logs - #60286
[PATCHES] Add guile's implementation for scheme-lsp-server

Previous Next

Package: guix-patches;

Reported by: goodoldpaul <at> autistici.org

Date: Fri, 23 Dec 2022 20:28:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 60286 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Fri, 23 Dec 2022 20:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to goodoldpaul <at> autistici.org:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 23 Dec 2022 20:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: goodoldpaul <at> autistici.org
To: guix-patches <at> gnu.org
Subject: [PATCHES] Add guile's implementation for scheme-lsp-server
Date: Fri, 23 Dec 2022 20:26:46 +0000
Dear Guixers,
I'm sending a couple of patches to add the Guile's implementation for a 
Scheme LSP Server ( https://codeberg.org/rgherdt/scheme-lsp-server ).

Thank you for your time and efforts :)




Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Fri, 23 Dec 2022 20:47:01 GMT) Full text and rfc822 format available.

Message #8 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: 60286 <at> debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [PATCH 2/2] gnu: Add guile-scheme-lsp-server.
Date: Fri, 23 Dec 2022 21:46:30 +0100
* gnu/packages/scheme-xyz.scm (guile-scheme-lsp-server): New variable.
---
 gnu/packages/scheme-xyz.scm | 85 +++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/gnu/packages/scheme-xyz.scm b/gnu/packages/scheme-xyz.scm
index 819c5cdf9e..513953b0f4 100644
--- a/gnu/packages/scheme-xyz.scm
+++ b/gnu/packages/scheme-xyz.scm
@@ -18,6 +18,7 @@
 
 (define-module (gnu packages scheme-xyz)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages texinfo)
@@ -65,3 +66,87 @@ (define-public guile-scheme-json-rpc
 This package delivers Guile's bytecode for @code{scheme-json-rpc}.")
     (home-page "https://codeberg.org/rgherdt/scheme-json-rpc")
     (license license:expat)))
+
+(define (scheme-lsp-server-origin name version hash)
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+           (url "https://codeberg.org/rgherdt/scheme-lsp-server.git")
+           (commit version)))
+    (file-name (git-file-name name version))
+    (sha256
+     (base32
+      hash))))
+
+(define-public guile-scheme-lsp-server
+  (package
+    (name "guile-scheme-lsp-server")
+    (version "0.2.2")
+    (source
+     (scheme-lsp-server-origin
+      name
+      version
+      "0lb359gw00w149h5yq2brfrcpybdwdj6ndbl7k1ms88l653r5l2g"))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:modules `((ice-9 match)
+                       (ice-9 ftw)
+                       ,@%gnu-build-system-modules)
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'move-to-guile-directory
+                 (lambda _
+                   (chdir "./guile")))
+               (add-after 'install 'wrap-entrypoint
+                 (lambda _
+                   (let* ((bin (string-append #$output "/bin"))
+                          (site (string-append #$output
+                                               "/share/guile/site"))
+                          (deps (list #$guile-scheme-json-rpc)))
+                     (match (scandir site)
+                       (("." ".." version)
+                        (let ((modules (string-append site "/"
+                                                      version))
+                              (compiled-modules (string-append #$output
+                                                 "/lib/guile/"
+                                                 version
+                                                 "/site-ccache")))
+                          (wrap-program (string-append bin
+                                         "/guile-lsp-server")
+                                        `("GUILE_LOAD_PATH" ":"
+                                          prefix
+                                          (,modules
+                                           ,@(map (lambda (dep)
+                                                    (string-append
+                                                     dep
+                                                     "/share/guile/site/"
+                                                     version))
+                                                  deps)))
+                                        `("GUILE_LOAD_COMPILED_PATH"
+                                          ":" prefix
+                                          (,compiled-modules
+                                           ,@(map (lambda (dep)
+                                                    (string-append
+                                                     dep
+                                                     "/lib/guile/"
+                                                     version
+                                                     "/site-ccache"))
+                                              deps))))
+                          #t)))))))))
+    (native-inputs (list autoconf automake pkg-config))
+    (inputs
+     ;; Depend on the latest Guile to avoid bytecode compatibility issues when
+     ;; using modules built against the latest version.
+     (list bash-minimal
+           guile-3.0-latest))
+    (propagated-inputs (list guile-scheme-json-rpc))
+    (synopsis "LSP (Language Server Protocol) server for Scheme")
+    (description
+     "@code{guile-lsp-server} is an implementation for Guile of the LSP
+specification.  This software aims to support several Scheme implementations.
+To achieve this, the code is designed to contain as much logic as possible in
+R7RS Scheme, separating implementation-specific code in different modules.
+
+This package delivers Guile's implementation for @code{scheme-lsp-server}.")
+    (home-page "https://codeberg.org/rgherdt/scheme-lsp-server")
+    (license license:expat)))
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Fri, 23 Dec 2022 20:47:02 GMT) Full text and rfc822 format available.

Message #11 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: 60286 <at> debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [PATCH 1/2] gnu: Add guile-scheme-json-rpc.
Date: Fri, 23 Dec 2022 21:46:29 +0100
* gnu/packages/scheme-xyz.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk                |  1 +
 gnu/packages/scheme-xyz.scm | 67 +++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 gnu/packages/scheme-xyz.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 45d05de02d..868903a0e7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -548,6 +548,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/sawfish.scm			\
   %D%/packages/scanner.scm			\
   %D%/packages/scheme.scm			\
+  %D%/packages/scheme-xyz.scm			\
   %D%/packages/spreadsheet.scm			\
   %D%/packages/screen.scm			\
   %D%/packages/scribus.scm			\
diff --git a/gnu/packages/scheme-xyz.scm b/gnu/packages/scheme-xyz.scm
new file mode 100644
index 0000000000..819c5cdf9e
--- /dev/null
+++ b/gnu/packages/scheme-xyz.scm
@@ -0,0 +1,67 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Giacomo Leidi <goodoldpaul <at> autistici.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages scheme-xyz)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages guile)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages texinfo)
+  #:use-module (guix gexp)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu))
+
+(define (scheme-json-rpc-origin name version hash)
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+           (url "https://codeberg.org/rgherdt/scheme-json-rpc.git")
+           (commit version)))
+    (file-name (git-file-name name version))
+    (sha256
+     (base32
+      hash))))
+
+(define-public guile-scheme-json-rpc
+  (package
+    (name "guile-scheme-json-rpc")
+    (version "0.2.11")
+    (source
+     (scheme-json-rpc-origin
+      name
+      version
+      "0w4m8xx8yyj0rv0q57mjr8ja87l7yikscj33i3ck26wg7230ppa5"))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'move-to-guile-directory
+                          (lambda _
+                            (chdir "./guile"))))))
+    (native-inputs (list autoconf automake pkg-config texinfo guile-3.0-latest))
+    (synopsis "Implementation of the JSON-RPC for Scheme")
+    (description
+     "@code{scheme-json-rpc} allows calling procedures
+on remote servers by exchanging JSON objects.  It implements the
+@url{jsonrpc specifications, https://www.jsonrpc.org/specification}.
+The low-level API strives to be R7RS compliant, relying on some SRFI's
+when needed.  So far it was only tested under CHICKEN 5 and Guile 3.
+
+This package delivers Guile's bytecode for @code{scheme-json-rpc}.")
+    (home-page "https://codeberg.org/rgherdt/scheme-json-rpc")
+    (license license:expat)))

base-commit: 1b29fccff2334fb5d6e979a290233a452969e39b
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Sat, 31 Dec 2022 16:24:02 GMT) Full text and rfc822 format available.

Message #14 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: Abhishek Cherath <abhi <at> quic.us>
To: 60286 <at> debbugs.gnu.org
Subject: [PATCHES] Add guile's implementation for scheme-lsp-server
Date: Sat, 31 Dec 2022 11:23:25 -0500
[Message part 1 (text/plain, inline)]
Ha! I hadn't seen this and submitted #60444

Does the json-rpc package need autoconf automake and TeX? I got it to work with guile-3, guile-json-3 as inputs and pkg-config as a native input. (Actually now that I think about it I guess guile-json isn't needed)

Also why would guile be a native input for json-rpc? Should just be an input right?

Thanks,
Abhishek.

[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Mon, 02 Jan 2023 01:53:02 GMT) Full text and rfc822 format available.

Message #17 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: goodoldpaul <at> autistici.org
To: 60286 <at> debbugs.gnu.org
Subject: Re: [PATCHES] Add guile's implementation for scheme-lsp-server
Date: Mon, 02 Jan 2023 01:52:36 +0000
Dear Abhishek,
thank you for the heads up! I fixed my patches with your suggestions and 
I'm sending an updated patchset.

giacomo




Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Mon, 02 Jan 2023 02:01:02 GMT) Full text and rfc822 format available.

Message #20 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: 60286 <at> debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [PATCHv2 1/2] gnu: Add guile-scheme-json-rpc.
Date: Mon,  2 Jan 2023 03:00:23 +0100
* gnu/packages/scheme-xyz.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk                |  1 +
 gnu/packages/scheme-xyz.scm | 68 +++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 gnu/packages/scheme-xyz.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index f0b1b3fd15..5a285eb629 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -548,6 +548,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/sawfish.scm			\
   %D%/packages/scanner.scm			\
   %D%/packages/scheme.scm			\
+  %D%/packages/scheme-xyz.scm			\
   %D%/packages/spreadsheet.scm			\
   %D%/packages/screen.scm			\
   %D%/packages/scribus.scm			\
diff --git a/gnu/packages/scheme-xyz.scm b/gnu/packages/scheme-xyz.scm
new file mode 100644
index 0000000000..91ba1e7f5b
--- /dev/null
+++ b/gnu/packages/scheme-xyz.scm
@@ -0,0 +1,68 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Giacomo Leidi <goodoldpaul <at> autistici.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages scheme-xyz)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages guile)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages texinfo)
+  #:use-module (guix gexp)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu))
+
+(define (scheme-json-rpc-origin name version hash)
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+           (url "https://codeberg.org/rgherdt/scheme-json-rpc.git")
+           (commit version)))
+    (file-name (git-file-name name version))
+    (sha256
+     (base32
+      hash))))
+
+(define-public guile-scheme-json-rpc
+  (package
+    (name "guile-scheme-json-rpc")
+    (version "0.2.11")
+    (source
+     (scheme-json-rpc-origin
+      name
+      version
+      "0w4m8xx8yyj0rv0q57mjr8ja87l7yikscj33i3ck26wg7230ppa5"))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'move-to-guile-directory
+                          (lambda _
+                            (chdir "./guile"))))))
+    (native-inputs (list pkg-config))
+    (inputs (list guile-3.0-latest))
+    (synopsis "Implementation of the JSON-RPC for Scheme")
+    (description
+     "@code{scheme-json-rpc} allows calling procedures
+on remote servers by exchanging JSON objects.  It implements the
+@url{jsonrpc specifications, https://www.jsonrpc.org/specification}.
+The low-level API strives to be R7RS compliant, relying on some SRFI's
+when needed.  So far it was only tested under CHICKEN 5 and Guile 3.
+
+This package delivers Guile's bytecode for @code{scheme-json-rpc}.")
+    (home-page "https://codeberg.org/rgherdt/scheme-json-rpc")
+    (license license:expat)))

base-commit: d7a9d72bb02a2a3b1a99183655bf878547116032
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Mon, 02 Jan 2023 02:01:02 GMT) Full text and rfc822 format available.

Message #23 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: 60286 <at> debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [PATCHv2 2/2] gnu: Add guile-scheme-lsp-server.
Date: Mon,  2 Jan 2023 03:00:24 +0100
* gnu/packages/scheme-xyz.scm (guile-scheme-lsp-server): New variable.
---
 gnu/packages/scheme-xyz.scm | 85 +++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/gnu/packages/scheme-xyz.scm b/gnu/packages/scheme-xyz.scm
index 91ba1e7f5b..3947bf4f92 100644
--- a/gnu/packages/scheme-xyz.scm
+++ b/gnu/packages/scheme-xyz.scm
@@ -18,6 +18,7 @@
 
 (define-module (gnu packages scheme-xyz)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages texinfo)
@@ -66,3 +67,87 @@ (define-public guile-scheme-json-rpc
 This package delivers Guile's bytecode for @code{scheme-json-rpc}.")
     (home-page "https://codeberg.org/rgherdt/scheme-json-rpc")
     (license license:expat)))
+
+(define (scheme-lsp-server-origin name version hash)
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+           (url "https://codeberg.org/rgherdt/scheme-lsp-server.git")
+           (commit version)))
+    (file-name (git-file-name name version))
+    (sha256
+     (base32
+      hash))))
+
+(define-public guile-scheme-lsp-server
+  (package
+    (name "guile-scheme-lsp-server")
+    (version "0.2.2")
+    (source
+     (scheme-lsp-server-origin
+      name
+      version
+      "0lb359gw00w149h5yq2brfrcpybdwdj6ndbl7k1ms88l653r5l2g"))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:modules `((ice-9 match)
+                       (ice-9 ftw)
+                       ,@%gnu-build-system-modules)
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'move-to-guile-directory
+                 (lambda _
+                   (chdir "./guile")))
+               (add-after 'install 'wrap-entrypoint
+                 (lambda _
+                   (let* ((bin (string-append #$output "/bin"))
+                          (site (string-append #$output
+                                               "/share/guile/site"))
+                          (deps (list #$guile-scheme-json-rpc)))
+                     (match (scandir site)
+                       (("." ".." version)
+                        (let ((modules (string-append site "/"
+                                                      version))
+                              (compiled-modules (string-append #$output
+                                                 "/lib/guile/"
+                                                 version
+                                                 "/site-ccache")))
+                          (wrap-program (string-append bin
+                                         "/guile-lsp-server")
+                                        `("GUILE_LOAD_PATH" ":"
+                                          prefix
+                                          (,modules
+                                           ,@(map (lambda (dep)
+                                                    (string-append
+                                                     dep
+                                                     "/share/guile/site/"
+                                                     version))
+                                                  deps)))
+                                        `("GUILE_LOAD_COMPILED_PATH"
+                                          ":" prefix
+                                          (,compiled-modules
+                                           ,@(map (lambda (dep)
+                                                    (string-append
+                                                     dep
+                                                     "/lib/guile/"
+                                                     version
+                                                     "/site-ccache"))
+                                              deps))))
+                          #t)))))))))
+    (native-inputs (list pkg-config))
+    (inputs
+     ;; Depend on the latest Guile to avoid bytecode compatibility issues when
+     ;; using modules built against the latest version.
+     (list bash-minimal
+           guile-3.0-latest))
+    (propagated-inputs (list guile-scheme-json-rpc))
+    (synopsis "LSP (Language Server Protocol) server for Scheme")
+    (description
+     "@code{guile-lsp-server} is an implementation for Guile of the LSP
+specification.  This software aims to support several Scheme implementations.
+To achieve this, the code is designed to contain as much logic as possible in
+R7RS Scheme, separating implementation-specific code in different modules.
+
+This package delivers Guile's implementation for @code{scheme-lsp-server}.")
+    (home-page "https://codeberg.org/rgherdt/scheme-lsp-server")
+    (license license:expat)))
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Wed, 12 Apr 2023 20:44:01 GMT) Full text and rfc822 format available.

Message #26 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: goodoldpaul <at> autistici.org
To: 60286 <at> debbugs.gnu.org
Subject: Re: [PATCHES] Add guile's implementation for scheme-lsp-server
Date: Wed, 12 Apr 2023 20:43:03 +0000
Dear Guixers,

this is a friendly ping :) I'm sending an updated patchset.

Thank you for your time and efforts,

Giacomo




Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Wed, 12 Apr 2023 20:45:02 GMT) Full text and rfc822 format available.

Message #29 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: 60286 <at> debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [v3 2/2] gnu: Add guile-scheme-lsp-server.
Date: Wed, 12 Apr 2023 22:44:02 +0200
* gnu/packages/scheme-xyz.scm (guile-scheme-lsp-server): New variable.
---
 gnu/packages/scheme-xyz.scm | 85 +++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/gnu/packages/scheme-xyz.scm b/gnu/packages/scheme-xyz.scm
index 91ba1e7f5b..3947bf4f92 100644
--- a/gnu/packages/scheme-xyz.scm
+++ b/gnu/packages/scheme-xyz.scm
@@ -18,6 +18,7 @@
 
 (define-module (gnu packages scheme-xyz)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages texinfo)
@@ -66,3 +67,87 @@ (define-public guile-scheme-json-rpc
 This package delivers Guile's bytecode for @code{scheme-json-rpc}.")
     (home-page "https://codeberg.org/rgherdt/scheme-json-rpc")
     (license license:expat)))
+
+(define (scheme-lsp-server-origin name version hash)
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+           (url "https://codeberg.org/rgherdt/scheme-lsp-server.git")
+           (commit version)))
+    (file-name (git-file-name name version))
+    (sha256
+     (base32
+      hash))))
+
+(define-public guile-scheme-lsp-server
+  (package
+    (name "guile-scheme-lsp-server")
+    (version "0.2.2")
+    (source
+     (scheme-lsp-server-origin
+      name
+      version
+      "0lb359gw00w149h5yq2brfrcpybdwdj6ndbl7k1ms88l653r5l2g"))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:modules `((ice-9 match)
+                       (ice-9 ftw)
+                       ,@%gnu-build-system-modules)
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'move-to-guile-directory
+                 (lambda _
+                   (chdir "./guile")))
+               (add-after 'install 'wrap-entrypoint
+                 (lambda _
+                   (let* ((bin (string-append #$output "/bin"))
+                          (site (string-append #$output
+                                               "/share/guile/site"))
+                          (deps (list #$guile-scheme-json-rpc)))
+                     (match (scandir site)
+                       (("." ".." version)
+                        (let ((modules (string-append site "/"
+                                                      version))
+                              (compiled-modules (string-append #$output
+                                                 "/lib/guile/"
+                                                 version
+                                                 "/site-ccache")))
+                          (wrap-program (string-append bin
+                                         "/guile-lsp-server")
+                                        `("GUILE_LOAD_PATH" ":"
+                                          prefix
+                                          (,modules
+                                           ,@(map (lambda (dep)
+                                                    (string-append
+                                                     dep
+                                                     "/share/guile/site/"
+                                                     version))
+                                                  deps)))
+                                        `("GUILE_LOAD_COMPILED_PATH"
+                                          ":" prefix
+                                          (,compiled-modules
+                                           ,@(map (lambda (dep)
+                                                    (string-append
+                                                     dep
+                                                     "/lib/guile/"
+                                                     version
+                                                     "/site-ccache"))
+                                              deps))))
+                          #t)))))))))
+    (native-inputs (list pkg-config))
+    (inputs
+     ;; Depend on the latest Guile to avoid bytecode compatibility issues when
+     ;; using modules built against the latest version.
+     (list bash-minimal
+           guile-3.0-latest))
+    (propagated-inputs (list guile-scheme-json-rpc))
+    (synopsis "LSP (Language Server Protocol) server for Scheme")
+    (description
+     "@code{guile-lsp-server} is an implementation for Guile of the LSP
+specification.  This software aims to support several Scheme implementations.
+To achieve this, the code is designed to contain as much logic as possible in
+R7RS Scheme, separating implementation-specific code in different modules.
+
+This package delivers Guile's implementation for @code{scheme-lsp-server}.")
+    (home-page "https://codeberg.org/rgherdt/scheme-lsp-server")
+    (license license:expat)))
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Wed, 12 Apr 2023 20:45:02 GMT) Full text and rfc822 format available.

Message #32 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: 60286 <at> debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [v3 1/2] gnu: Add guile-scheme-json-rpc.
Date: Wed, 12 Apr 2023 22:44:01 +0200
* gnu/packages/scheme-xyz.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk                |  1 +
 gnu/packages/scheme-xyz.scm | 68 +++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 gnu/packages/scheme-xyz.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 8088e8170b..7f6cfc4158 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -556,6 +556,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/sawfish.scm			\
   %D%/packages/scanner.scm			\
   %D%/packages/scheme.scm			\
+  %D%/packages/scheme-xyz.scm			\
   %D%/packages/spreadsheet.scm			\
   %D%/packages/screen.scm			\
   %D%/packages/scribus.scm			\
diff --git a/gnu/packages/scheme-xyz.scm b/gnu/packages/scheme-xyz.scm
new file mode 100644
index 0000000000..91ba1e7f5b
--- /dev/null
+++ b/gnu/packages/scheme-xyz.scm
@@ -0,0 +1,68 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Giacomo Leidi <goodoldpaul <at> autistici.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages scheme-xyz)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages guile)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages texinfo)
+  #:use-module (guix gexp)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu))
+
+(define (scheme-json-rpc-origin name version hash)
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+           (url "https://codeberg.org/rgherdt/scheme-json-rpc.git")
+           (commit version)))
+    (file-name (git-file-name name version))
+    (sha256
+     (base32
+      hash))))
+
+(define-public guile-scheme-json-rpc
+  (package
+    (name "guile-scheme-json-rpc")
+    (version "0.2.11")
+    (source
+     (scheme-json-rpc-origin
+      name
+      version
+      "0w4m8xx8yyj0rv0q57mjr8ja87l7yikscj33i3ck26wg7230ppa5"))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'move-to-guile-directory
+                          (lambda _
+                            (chdir "./guile"))))))
+    (native-inputs (list pkg-config))
+    (inputs (list guile-3.0-latest))
+    (synopsis "Implementation of the JSON-RPC for Scheme")
+    (description
+     "@code{scheme-json-rpc} allows calling procedures
+on remote servers by exchanging JSON objects.  It implements the
+@url{jsonrpc specifications, https://www.jsonrpc.org/specification}.
+The low-level API strives to be R7RS compliant, relying on some SRFI's
+when needed.  So far it was only tested under CHICKEN 5 and Guile 3.
+
+This package delivers Guile's bytecode for @code{scheme-json-rpc}.")
+    (home-page "https://codeberg.org/rgherdt/scheme-json-rpc")
+    (license license:expat)))

base-commit: dd3e5e71104a2bcbad80e52e062a144ea96b8c6a
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Wed, 21 Jun 2023 19:17:02 GMT) Full text and rfc822 format available.

Message #35 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: "Ricardo G. Herdt" <r.herdt <at> posteo.de>
To: 60286 <at> debbugs.gnu.org
Subject: Re: [PATCHES] Add guile's implementation for scheme-lsp-server
Date: Wed, 21 Jun 2023 19:16:45 +0000
Hi

I'm submitting a new patch using the already defined 
guile-scheme-json-rpc as dependency. I also updated tha latter to a new 
version, since guile-lsp-server now rely on its changes.

I moved guile-lsp-server (renamed from guile-scheme-lsp-server) to 
guile-xyz.scm, is that ok?

Regards,

Ricardo G. Herdt




Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Wed, 21 Jun 2023 19:28:01 GMT) Full text and rfc822 format available.

Message #38 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: "Ricardo G. Herdt" <r.herdt <at> posteo.de>
To: 60286 <at> debbugs.gnu.org
Subject: Re: [PATCHES] Add guile's implementation for scheme-lsp-server
Date: Wed, 21 Jun 2023 19:27:32 +0000
* gnu/packages/guile-xyz.scm: add guile-lsp-server;
  (guile-scheme-json-rpc): update to 0.4.0, change dependencies

Original package author Giacomo Leidi. Adapted to use 
guile-scheme-json-rpc.
---
 gnu/packages/guile-xyz.scm | 97 +++++++++++++++++++++++++++++++++++---
 1 file changed, 91 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index db7be432cc..1195e0e328 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1054,9 +1054,9 @@ (define-public guile2.2-sjson
     (inputs (list guile-2.2))))

 (define-public guile-scheme-json-rpc
-  (let ((commit "45ae6890f6619286f5679f88c094c88127b54c4a")
+  (let ((commit "50acef7b824e2d23140e48242020f5fdc85cc67d")
         (revision "0")
-        (version "0.2.11"))
+        (version "0.4.0"))
     (package
       (name "guile-scheme-json-rpc")
       (version (git-version version revision commit))
@@ -1068,16 +1068,20 @@ (define-public guile-scheme-json-rpc
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  
"0w4m8xx8yyj0rv0q57mjr8ja87l7yikscj33i3ck26wg7230ppa5"))))
+                  
"0jsampz2ahs18z6yh9b5l3lkj8ycnavs0vg9sjngdj3w3zvrdcvm"))))
       (build-system gnu-build-system)
       (arguments
        `(#:phases (modify-phases %standard-phases
                     (add-after 'unpack 'change-to-guile-dir
                       (lambda _
                         (chdir "guile"))))))
-      (inputs (list guile-3.0 guile-json-3))
-      (native-inputs (list pkg-config))
-      (synopsis "Library providing JSON-RPC capability in Scheme")
+      (inputs (list guile-3.0 guile-srfi-145 guile-srfi-180))
+      (native-inputs (list autoconf
+                           automake
+                           pkg-config
+                           texinfo
+                           guile-3.0))
+      (synopsis "Library providing JSON-RPC capability for Guile 
Scheme")
       (description
        "This library implements parts of the
 @uref{https://www.jsonrpc.org/specification,JSON-RPC specification}, 
allowing
@@ -1085,6 +1089,87 @@ (define-public guile-scheme-json-rpc
       (home-page "https://codeberg.org/rgherdt/scheme-json-rpc/")
       (license license:expat))))

+(define-public guile-lsp-server
+  (package
+    (name "guile-lsp-server")
+    (version "0.4.0")
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://codeberg.org/rgherdt/scheme-lsp-server.git")
+            (commit version)))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32
+        "04fc76pnl8mrwrjw49xhzs4r0dx2vh4gy2y151p33hahylf5z1xs"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:modules `((ice-9 match)
+                       (ice-9 ftw)
+                       ,@%gnu-build-system-modules)
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'move-to-guile-directory
+                 (lambda _
+                   (chdir "./guile")))
+               (add-after 'install 'wrap-entrypoint
+                 (lambda _
+                   (let* ((bin (string-append #$output "/bin"))
+                          (site (string-append #$output
+                                               "/share/guile/site"))
+                          (deps (list #$guile-scheme-json-rpc)))
+                     (match (scandir site)
+                       (("." ".." version)
+                        (let ((modules (string-append site "/"
+                                                      version))
+                              (compiled-modules (string-append #$output
+                                                 "/lib/guile/"
+                                                 version
+                                                 "/site-ccache")))
+                          (wrap-program (string-append bin
+                                         "/guile-lsp-server")
+                                        `("GUILE_LOAD_PATH" ":"
+                                          prefix
+                                          (,modules
+                                           ,@(map (lambda (dep)
+                                                    (string-append
+                                                     dep
+                                                     
"/share/guile/site/"
+                                                     version))
+                                                  deps)))
+                                        `("GUILE_LOAD_COMPILED_PATH"
+                                          ":" prefix
+                                          (,compiled-modules
+                                           ,@(map (lambda (dep)
+                                                    (string-append
+                                                     dep
+                                                     "/lib/guile/"
+                                                     version
+                                                     "/site-ccache"))
+                                              deps))))
+                          #t)))))))))
+    (native-inputs (list pkg-config))
+    (inputs
+     ;; Depend on the latest Guile to avoid bytecode compatibility 
issues when
+     ;; using modules built against the latest version.
+     (list bash-minimal
+           guile-3.0-latest))
+    (propagated-inputs (list guile-irregex
+                             guile-scheme-json-rpc
+                             guile-srfi-145
+                             guile-srfi-180))
+    (synopsis "LSP (Language Server Protocol) server for Scheme")
+    (description
+     "@code{guile-lsp-server} is an implementation for Guile of the LSP
+specification.  This software aims to support several Scheme 
implementations.
+To achieve this, the code is designed to contain as much logic as 
possible in
+R7RS Scheme, separating implementation-specific code in different 
modules.
+
+This package delivers Guile's implementation for 
@code{scheme-lsp-server}.")
+    (home-page "https://codeberg.org/rgherdt/scheme-lsp-server")
+    (license license:expat)))
+
 (define-public guile-squee
   (let ((commit "fab9d9590792f3ededd4abd8cfa6be5e56659678")
         (revision "4"))

base-commit: 392f9db97687bfb6195e65a28e1710f22b6cb972
-- 
2.40.1






Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Mon, 07 Aug 2023 09:45:02 GMT) Full text and rfc822 format available.

Message #41 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Tropin <andrew <at> trop.in>
To: "Ricardo G. Herdt" <r.herdt <at> posteo.de>, 60286 <at> debbugs.gnu.org
Subject: Re: [bug#60286] [PATCHES] Add guile's implementation for
 scheme-lsp-server
Date: Mon, 07 Aug 2023 13:44:15 +0400
[Message part 1 (text/plain, inline)]
On 2023-06-21 19:27, Ricardo G. Herdt wrote:

Hi Ricardo, thank you very much for the patches and working on
guile-lsp-server.

> * gnu/packages/guile-xyz.scm: add guile-lsp-server;
>    (guile-scheme-json-rpc): update to 0.4.0, change dependencies
>
> Original package author Giacomo Leidi. Adapted to use 
> guile-scheme-json-rpc.
> ---
>   gnu/packages/guile-xyz.scm | 97 +++++++++++++++++++++++++++++++++++---
>   1 file changed, 91 insertions(+), 6 deletions(-)
>
> diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
> index db7be432cc..1195e0e328 100644
> --- a/gnu/packages/guile-xyz.scm
> +++ b/gnu/packages/guile-xyz.scm
> @@ -1054,9 +1054,9 @@ (define-public guile2.2-sjson
>       (inputs (list guile-2.2))))
>
>   (define-public guile-scheme-json-rpc
> -  (let ((commit "45ae6890f6619286f5679f88c094c88127b54c4a")
> +  (let ((commit "50acef7b824e2d23140e48242020f5fdc85cc67d")

For tagged release there is no need for commit and revision, I'll remove
them and apply the part of the patch related to guile-scheme-json-rpc
version update as separate commit.

>           (revision "0")
> -        (version "0.2.11"))
> +        (version "0.4.0"))
>       (package
>         (name "guile-scheme-json-rpc")
>         (version (git-version version revision commit))
> @@ -1068,16 +1068,20 @@ (define-public guile-scheme-json-rpc
>                   (file-name (git-file-name name version))
>                   (sha256
>                    (base32
> -                  
> "0w4m8xx8yyj0rv0q57mjr8ja87l7yikscj33i3ck26wg7230ppa5"))))
> +                  
> "0jsampz2ahs18z6yh9b5l3lkj8ycnavs0vg9sjngdj3w3zvrdcvm"))))
>         (build-system gnu-build-system)
>         (arguments
>          `(#:phases (modify-phases %standard-phases
>                       (add-after 'unpack 'change-to-guile-dir
>                         (lambda _
>                           (chdir "guile"))))))
> -      (inputs (list guile-3.0 guile-json-3))
> -      (native-inputs (list pkg-config))
> -      (synopsis "Library providing JSON-RPC capability in Scheme")
> +      (inputs (list guile-3.0 guile-srfi-145 guile-srfi-180))
> +      (native-inputs (list autoconf
> +                           automake
> +                           pkg-config
> +                           texinfo
> +                           guile-3.0))

auto tools is already provided by gnu-build-system, no need to provide
them one more time.  I don't see any texi docs, so probably texinfo is
not needed.  Also guile-3.0 in native (build host side) inputs also not
needed.  Removed.

> +      (synopsis "Library providing JSON-RPC capability for Guile 
> Scheme")
>         (description
>          "This library implements parts of the
>   @uref{https://www.jsonrpc.org/specification,JSON-RPC specification}, 
> allowing
> @@ -1085,6 +1089,87 @@ (define-public guile-scheme-json-rpc
>         (home-page "https://codeberg.org/rgherdt/scheme-json-rpc/")
>         (license license:expat))))
>
> +(define-public guile-lsp-server
> +  (package
> +    (name "guile-lsp-server")
> +    (version "0.4.0")
> +    (source
> +     (origin
> +      (method git-fetch)
> +      (uri (git-reference
> +            (url "https://codeberg.org/rgherdt/scheme-lsp-server.git")
> +            (commit version)))
> +      (file-name (git-file-name name version))
> +      (sha256
> +       (base32
> +        "04fc76pnl8mrwrjw49xhzs4r0dx2vh4gy2y151p33hahylf5z1xs"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     (list #:modules `((ice-9 match)
> +                       (ice-9 ftw)
> +                       ,@%gnu-build-system-modules)
> +           #:phases
> +           #~(modify-phases %standard-phases
> +               (add-after 'unpack 'move-to-guile-directory
> +                 (lambda _
> +                   (chdir "./guile")))
> +               (add-after 'install 'wrap-entrypoint
> +                 (lambda _
> +                   (let* ((bin (string-append #$output "/bin"))
> +                          (site (string-append #$output
> +                                               "/share/guile/site"))
> +                          (deps (list #$guile-scheme-json-rpc)))

It's better to use (assoc-ref inputs ...) here, because
#$guile-scheme-json-rpc will hardcode the exact package and if someone
will try to inherit from guile-lsp-server and override
guile-scheme-json-rpc input, it won't make a desired effect and
hardcoded version of guile-scheme-json-rpc will be used.

Also, guile-lsp-server executable doesn't run, it's very likely that
other required dependencies are missing here in the deps variable.

> +                     (match (scandir site)
> +                       (("." ".." version)
> +                        (let ((modules (string-append site "/"
> +                                                      version))
> +                              (compiled-modules (string-append #$output
> +                                                 "/lib/guile/"
> +                                                 version
> +                                                 "/site-ccache")))
> +                          (wrap-program (string-append bin
> +                                         "/guile-lsp-server")
> +                                        `("GUILE_LOAD_PATH" ":"
> +                                          prefix
> +                                          (,modules
> +                                           ,@(map (lambda (dep)
> +                                                    (string-append
> +                                                     dep
> +                                                     
> "/share/guile/site/"
> +                                                     version))
> +                                                  deps)))
> +                                        `("GUILE_LOAD_COMPILED_PATH"
> +                                          ":" prefix
> +                                          (,compiled-modules
> +                                           ,@(map (lambda (dep)
> +                                                    (string-append
> +                                                     dep
> +                                                     "/lib/guile/"
> +                                                     version
> +                                                     "/site-ccache"))
> +                                              deps))))
> +                          #t)))))))))
> +    (native-inputs (list pkg-config))
> +    (inputs
> +     ;; Depend on the latest Guile to avoid bytecode compatibility 
> issues when
> +     ;; using modules built against the latest version.
> +     (list bash-minimal
> +           guile-3.0-latest))
> +    (propagated-inputs (list guile-irregex
> +                             guile-scheme-json-rpc
> +                             guile-srfi-145
> +                             guile-srfi-180))

For standalone programs like guile-lsp-server, where we manually
construct GUILE_LOAD_PATH it's not needed to propagate dependencies in
the profile, where package is installed.  It should be just inputs.

> +    (synopsis "LSP (Language Server Protocol) server for Scheme")
> +    (description
> +     "@code{guile-lsp-server} is an implementation for Guile of the LSP
> +specification.  This software aims to support several Scheme 
> implementations.
> +To achieve this, the code is designed to contain as much logic as 
> possible in
> +R7RS Scheme, separating implementation-specific code in different 
> modules.
> +
> +This package delivers Guile's implementation for 
> @code{scheme-lsp-server}.")
> +    (home-page "https://codeberg.org/rgherdt/scheme-lsp-server")
> +    (license license:expat)))
> +
>   (define-public guile-squee
>     (let ((commit "fab9d9590792f3ededd4abd8cfa6be5e56659678")
>           (revision "4"))
>
> base-commit: 392f9db97687bfb6195e65a28e1710f22b6cb972

Applied first part of the patch, pushed as
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=56667ee55c

Please update the guile-lsp-server package definition to make it work
(right now package builds, but executable fails to run).

P.S. Thanks to Giacomo for spinning up this thread!

-- 
Best regards,
Andrew Tropin
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Tue, 05 Sep 2023 04:03:01 GMT) Full text and rfc822 format available.

Message #44 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: Distopico <distopico <at> riseup.net>
To: 60286 <at> debbugs.gnu.org
Cc: Distopico <distopico <at> riseup.net>
Subject: [PATCH v2] gnu: Add emacs-flymake-guile.
Date: Mon,  4 Sep 2023 22:59:43 -0500
From v1 -> v2 remove flymake-quickdef dependency and update version.

* gnu/packages/emacs-xyz.scm (emacs-flymake-guile): New variable.
---

* gnu/packages/emacs-xyz.scm (emacs-flymake-guile): New variable.

 gnu/packages/emacs-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 3eaf215134..0d07235659 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -132,6 +132,7 @@
 ;;; Copyright © 2023 Fabio Natali <me <at> fabionatali.com>
 ;;; Copyright © 2023 Arnaud Lechevallier <arnaud.lechevallier <at> free.fr>
 ;;; Copyright © 2023 Ahmad Draidi <a.r.draidi <at> redscript.org>
+;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2497,6 +2498,29 @@ (define-public emacs-flymake-collection
 modes.")
     (license license:expat)))
 
+(define-public emacs-flymake-guile
+  (package
+    (name "emacs-flymake-guile")
+    (version "0.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url
+              "https://framagit.org/flymake-backends/flymake-guile.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "06x237qhvnbyxngbqinjg417n341h652jkagr1a5whximlsaw2c8"))))
+    (build-system emacs-build-system)
+    (home-page "https://framagit.org/flymake-backends/flymake-guile")
+    (synopsis "GNU Guile support for Flymake")
+    (description
+     "This package provides a Flymake backend for GNU Guile using @code{guild
+compile}.")
+    (license license:gpl3+)))
+
 (define-public emacs-flymake-popon
   (package
     (name "emacs-flymake-popon")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#60286; Package guix-patches. (Sun, 17 Sep 2023 08:31:01 GMT) Full text and rfc822 format available.

Message #47 received at 60286 <at> debbugs.gnu.org (full text, mbox):

From: "Ricardo G. Herdt" <r.herdt <at> posteo.de>
To: 60286 <at> debbugs.gnu.org
Subject: Re: [bug#60286] [PATCHES] Add guile's implementation for
 scheme-lsp-server
Date: Sun, 17 Sep 2023 08:29:50 +0000
Hi Andrew,

Thanks for the feedback. Could you please show the error you get when 
running guile-lsp-server? I'm using Guix on top of Debian, and running 
`guile-lsp-server` with the prefixes set works:

GUILE_LOAD_PATH=...:${HOME}/.guix-profile/share/guile/site/3.0/ 
GUILE_LOAD_COMPILED_PATH=...:${HOME}/.guix-profile/lib/guile/3.0/site-ccache 
./guile-lsp-server --version

Regards,

Ricardo


Am 07.08.2023 11:44 schrieb Andrew Tropin:
> On 2023-06-21 19:27, Ricardo G. Herdt wrote:
> 
> Hi Ricardo, thank you very much for the patches and working on
> guile-lsp-server.
> 
>> * gnu/packages/guile-xyz.scm: add guile-lsp-server;
>>    (guile-scheme-json-rpc): update to 0.4.0, change dependencies
>> 
>> Original package author Giacomo Leidi. Adapted to use
>> guile-scheme-json-rpc.
>> ---
>>   gnu/packages/guile-xyz.scm | 97 
>> +++++++++++++++++++++++++++++++++++---
>>   1 file changed, 91 insertions(+), 6 deletions(-)
>> 
>> diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
>> index db7be432cc..1195e0e328 100644
>> --- a/gnu/packages/guile-xyz.scm
>> +++ b/gnu/packages/guile-xyz.scm
>> @@ -1054,9 +1054,9 @@ (define-public guile2.2-sjson
>>       (inputs (list guile-2.2))))
>> 
>>   (define-public guile-scheme-json-rpc
>> -  (let ((commit "45ae6890f6619286f5679f88c094c88127b54c4a")
>> +  (let ((commit "50acef7b824e2d23140e48242020f5fdc85cc67d")
> 
> For tagged release there is no need for commit and revision, I'll 
> remove
> them and apply the part of the patch related to guile-scheme-json-rpc
> version update as separate commit.
> 
>>           (revision "0")
>> -        (version "0.2.11"))
>> +        (version "0.4.0"))
>>       (package
>>         (name "guile-scheme-json-rpc")
>>         (version (git-version version revision commit))
>> @@ -1068,16 +1068,20 @@ (define-public guile-scheme-json-rpc
>>                   (file-name (git-file-name name version))
>>                   (sha256
>>                    (base32
>> -
>> "0w4m8xx8yyj0rv0q57mjr8ja87l7yikscj33i3ck26wg7230ppa5"))))
>> +
>> "0jsampz2ahs18z6yh9b5l3lkj8ycnavs0vg9sjngdj3w3zvrdcvm"))))
>>         (build-system gnu-build-system)
>>         (arguments
>>          `(#:phases (modify-phases %standard-phases
>>                       (add-after 'unpack 'change-to-guile-dir
>>                         (lambda _
>>                           (chdir "guile"))))))
>> -      (inputs (list guile-3.0 guile-json-3))
>> -      (native-inputs (list pkg-config))
>> -      (synopsis "Library providing JSON-RPC capability in Scheme")
>> +      (inputs (list guile-3.0 guile-srfi-145 guile-srfi-180))
>> +      (native-inputs (list autoconf
>> +                           automake
>> +                           pkg-config
>> +                           texinfo
>> +                           guile-3.0))
> 
> auto tools is already provided by gnu-build-system, no need to provide
> them one more time.  I don't see any texi docs, so probably texinfo is
> not needed.  Also guile-3.0 in native (build host side) inputs also not
> needed.  Removed.
> 
>> +      (synopsis "Library providing JSON-RPC capability for Guile
>> Scheme")
>>         (description
>>          "This library implements parts of the
>>   @uref{https://www.jsonrpc.org/specification,JSON-RPC specification},
>> allowing
>> @@ -1085,6 +1089,87 @@ (define-public guile-scheme-json-rpc
>>         (home-page "https://codeberg.org/rgherdt/scheme-json-rpc/")
>>         (license license:expat))))
>> 
>> +(define-public guile-lsp-server
>> +  (package
>> +    (name "guile-lsp-server")
>> +    (version "0.4.0")
>> +    (source
>> +     (origin
>> +      (method git-fetch)
>> +      (uri (git-reference
>> +            (url 
>> "https://codeberg.org/rgherdt/scheme-lsp-server.git")
>> +            (commit version)))
>> +      (file-name (git-file-name name version))
>> +      (sha256
>> +       (base32
>> +        "04fc76pnl8mrwrjw49xhzs4r0dx2vh4gy2y151p33hahylf5z1xs"))))
>> +    (build-system gnu-build-system)
>> +    (arguments
>> +     (list #:modules `((ice-9 match)
>> +                       (ice-9 ftw)
>> +                       ,@%gnu-build-system-modules)
>> +           #:phases
>> +           #~(modify-phases %standard-phases
>> +               (add-after 'unpack 'move-to-guile-directory
>> +                 (lambda _
>> +                   (chdir "./guile")))
>> +               (add-after 'install 'wrap-entrypoint
>> +                 (lambda _
>> +                   (let* ((bin (string-append #$output "/bin"))
>> +                          (site (string-append #$output
>> +                                               "/share/guile/site"))
>> +                          (deps (list #$guile-scheme-json-rpc)))
> 
> It's better to use (assoc-ref inputs ...) here, because
> #$guile-scheme-json-rpc will hardcode the exact package and if someone
> will try to inherit from guile-lsp-server and override
> guile-scheme-json-rpc input, it won't make a desired effect and
> hardcoded version of guile-scheme-json-rpc will be used.
> 
> Also, guile-lsp-server executable doesn't run, it's very likely that
> other required dependencies are missing here in the deps variable.
> 
>> +                     (match (scandir site)
>> +                       (("." ".." version)
>> +                        (let ((modules (string-append site "/"
>> +                                                      version))
>> +                              (compiled-modules (string-append 
>> #$output
>> +                                                 "/lib/guile/"
>> +                                                 version
>> +                                                 "/site-ccache")))
>> +                          (wrap-program (string-append bin
>> +                                         "/guile-lsp-server")
>> +                                        `("GUILE_LOAD_PATH" ":"
>> +                                          prefix
>> +                                          (,modules
>> +                                           ,@(map (lambda (dep)
>> +                                                    (string-append
>> +                                                     dep
>> +
>> "/share/guile/site/"
>> +                                                     version))
>> +                                                  deps)))
>> +                                        `("GUILE_LOAD_COMPILED_PATH"
>> +                                          ":" prefix
>> +                                          (,compiled-modules
>> +                                           ,@(map (lambda (dep)
>> +                                                    (string-append
>> +                                                     dep
>> +                                                     "/lib/guile/"
>> +                                                     version
>> +                                                     "/site-ccache"))
>> +                                              deps))))
>> +                          #t)))))))))
>> +    (native-inputs (list pkg-config))
>> +    (inputs
>> +     ;; Depend on the latest Guile to avoid bytecode compatibility
>> issues when
>> +     ;; using modules built against the latest version.
>> +     (list bash-minimal
>> +           guile-3.0-latest))
>> +    (propagated-inputs (list guile-irregex
>> +                             guile-scheme-json-rpc
>> +                             guile-srfi-145
>> +                             guile-srfi-180))
> 
> For standalone programs like guile-lsp-server, where we manually
> construct GUILE_LOAD_PATH it's not needed to propagate dependencies in
> the profile, where package is installed.  It should be just inputs.
> 
>> +    (synopsis "LSP (Language Server Protocol) server for Scheme")
>> +    (description
>> +     "@code{guile-lsp-server} is an implementation for Guile of the 
>> LSP
>> +specification.  This software aims to support several Scheme
>> implementations.
>> +To achieve this, the code is designed to contain as much logic as
>> possible in
>> +R7RS Scheme, separating implementation-specific code in different
>> modules.
>> +
>> +This package delivers Guile's implementation for
>> @code{scheme-lsp-server}.")
>> +    (home-page "https://codeberg.org/rgherdt/scheme-lsp-server")
>> +    (license license:expat)))
>> +
>>   (define-public guile-squee
>>     (let ((commit "fab9d9590792f3ededd4abd8cfa6be5e56659678")
>>           (revision "4"))
>> 
>> base-commit: 392f9db97687bfb6195e65a28e1710f22b6cb972
> 
> Applied first part of the patch, pushed as
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=56667ee55c
> 
> Please update the guile-lsp-server package definition to make it work
> (right now package builds, but executable fails to run).
> 
> P.S. Thanks to Giacomo for spinning up this thread!




This bug report was last modified 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.