[PATCHES] Add guile's implementation for scheme-lsp-server

  • Open
  • quality assurance status badge
Details
5 participants
  • Abhishek Cherath
  • Andrew Tropin
  • Distopico
  • goodoldpaul
  • Ricardo G. Herdt
Owner
unassigned
Submitted by
goodoldpaul
Severity
normal
G
G
goodoldpaul wrote on 23 Dec 2022 21:26
(address . guix-patches@gnu.org)
15ea32667d93bab6b4a785253538cdb5@autistici.org
Dear Guixers,
I'm sending a couple of patches to add the Guile's implementation for a

Thank you for your time and efforts :)
G
G
Giacomo Leidi wrote on 23 Dec 2022 21:46
[PATCH 2/2] gnu: Add guile-scheme-lsp-server.
(address . 60286@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20221223204630.1833-2-goodoldpaul@autistici.org
* gnu/packages/scheme-xyz.scm (guile-scheme-lsp-server): New variable.
---
gnu/packages/scheme-xyz.scm | 85 +++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)

Toggle diff (102 lines)
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
G
G
Giacomo Leidi wrote on 23 Dec 2022 21:46
[PATCH 1/2] gnu: Add guile-scheme-json-rpc.
(address . 60286@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20221223204630.1833-1-goodoldpaul@autistici.org
* 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

Toggle diff (89 lines)
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@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
A
A
Abhishek Cherath wrote on 31 Dec 2022 17:23
[PATCHES] Add guile's implementation for scheme-lsp-server
(address . 60286@debbugs.gnu.org)
24291997-B08A-4644-B0BF-25F759EE6A13@quic.us
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.
Attachment: file
G
G
goodoldpaul wrote on 2 Jan 2023 02:52
(address . 60286@debbugs.gnu.org)
f15587251ce3f7e90f53612bc6b09711@autistici.org
Dear Abhishek,
thank you for the heads up! I fixed my patches with your suggestions and
I'm sending an updated patchset.

giacomo
G
G
Giacomo Leidi wrote on 2 Jan 2023 03:00
[PATCHv2 1/2] gnu: Add guile-scheme-json-rpc.
(address . 60286@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20230102020024.27498-1-goodoldpaul@autistici.org
* 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

Toggle diff (90 lines)
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@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
G
G
Giacomo Leidi wrote on 2 Jan 2023 03:00
[PATCHv2 2/2] gnu: Add guile-scheme-lsp-server.
(address . 60286@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20230102020024.27498-2-goodoldpaul@autistici.org
* gnu/packages/scheme-xyz.scm (guile-scheme-lsp-server): New variable.
---
gnu/packages/scheme-xyz.scm | 85 +++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)

Toggle diff (102 lines)
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
G
G
goodoldpaul wrote on 12 Apr 2023 22:43
Re: [PATCHES] Add guile's implementation for scheme-lsp-server
(address . 60286@debbugs.gnu.org)
44013bc23722fa720268916df79b962c@autistici.org
Dear Guixers,

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

Thank you for your time and efforts,

Giacomo
G
G
Giacomo Leidi wrote on 12 Apr 2023 22:44
[v3 2/2] gnu: Add guile-scheme-lsp-server.
(address . 60286@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20230412204402.14774-2-goodoldpaul@autistici.org
* gnu/packages/scheme-xyz.scm (guile-scheme-lsp-server): New variable.
---
gnu/packages/scheme-xyz.scm | 85 +++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)

Toggle diff (102 lines)
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
G
G
Giacomo Leidi wrote on 12 Apr 2023 22:44
[v3 1/2] gnu: Add guile-scheme-json-rpc.
(address . 60286@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20230412204402.14774-1-goodoldpaul@autistici.org
* 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

Toggle diff (90 lines)
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@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
R
R
Ricardo G. Herdt wrote on 21 Jun 2023 21:16
Re: [PATCHES] Add guile's implementation for scheme-lsp-server
(address . 60286@debbugs.gnu.org)
826bc5ec20281f371ab62befc19d3b51@posteo.de
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
R
R
Ricardo G. Herdt wrote on 21 Jun 2023 21:27
(address . 60286@debbugs.gnu.org)
890f1480abf9e421aa3301a0e857ee2f@posteo.de
* 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(-)

Toggle diff (143 lines)
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
A
A
Andrew Tropin wrote on 7 Aug 2023 11:44
Re: [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
871qgfrxu8.fsf@trop.in
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.

Toggle quote (20 lines)
> * 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.

Toggle quote (30 lines)
> (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.

Toggle quote (41 lines)
> + (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.

Toggle quote (43 lines)
> + (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.

Toggle quote (21 lines)
> + (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

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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmTQvO8ACgkQIgjSCVjB
3rB3OA//XWLcJNEGDTVrOqrU/mx662Qly/R+gy1tzAq7oUrFosW4WMUQMW/ZeAfZ
STAoXyuH9bAXZ4iViTNc0/D96GMPK7dRWCwdK4+dFQtU9KWNSuNIBK+FPl4nDR3G
Ya4ekE7PrwM4wy1xGGzYvn4PptfXdB5Z1TpmQQFqIYsyYpk1sX5du8QNNxcJgB6w
ZJIyFAxUe9Bp+GnV8pCyCf8fRIB8liKtmzjqSSc7weQ2ghiinn345CdfqG8lcr8H
qviJ1carqOdUxI9vrxr2xVOY+imG3zM/bMcEOuhnaE1W2JBSCiQ8tlVR84wGOwTK
KRKHzjt7Z6YxBuvtger2OJCupKHNv0MG0Ztqsgm2sr5Z4ysHJlL4mr+8ioJPUdvS
eMcy4MdB+mneKr0San8faxgWkRizkJOcm1ShEiR5zDXnlG8tQx7x2eljnBb6oOfv
Na65usBxyV9J3spI9ErMZno37hhI8pV2ke2aCUq/BkZ+KoBRjTCyl7hRH8Ot3Wt+
DdaM+aKodQD4tHWnVQgOQzoBcc3NsfVEVCxA63opOzpFUOqL6zZaIMY2MgU/o19q
0SpXtgBQscJhqoYYe9WJvDt9TwxaPOkRaZHVhDBHFp0/cN2t/nhttAvZk8qdAP4D
I4Sf+Q0igYK1RjPOelqUOeXtczlI3HOxQLJpDYPXPo5WAwz/j1o=
=vEuU
-----END PGP SIGNATURE-----

D
D
Distopico wrote on 5 Sep 2023 05:59
[PATCH v2] gnu: Add emacs-flymake-guile.
(address . 60286@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230905040053.8453-1-distopico@riseup.net
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(+)

Toggle diff (44 lines)
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@fabionatali.com>
;;; Copyright © 2023 Arnaud Lechevallier <arnaud.lechevallier@free.fr>
;;; Copyright © 2023 Ahmad Draidi <a.r.draidi@redscript.org>
+;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@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
R
R
Ricardo G. Herdt wrote on 17 Sep 2023 10:29
Re: [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
(address . 60286@debbugs.gnu.org)
64b9e6079f9ce79d7abecd452059bbce@posteo.de
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:
Toggle quote (194 lines)
> 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!
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 60286@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 60286
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch