all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
@ 2022-12-23 20:26 goodoldpaul--- via Guix-patches via
  2022-12-23 20:46 ` [bug#60286] [PATCH 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: goodoldpaul--- via Guix-patches via @ 2022-12-23 20:26 UTC (permalink / raw)
  To: 60286

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 :)




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCH 1/2] gnu: Add guile-scheme-json-rpc.
  2022-12-23 20:26 [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server goodoldpaul--- via Guix-patches via
@ 2022-12-23 20:46 ` Giacomo Leidi via Guix-patches via
  2022-12-23 20:46   ` [bug#60286] [PATCH 2/2] gnu: Add guile-scheme-lsp-server Giacomo Leidi via Guix-patches via
  2022-12-31 16:23 ` [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server Abhishek Cherath
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Giacomo Leidi via Guix-patches via @ 2022-12-23 20:46 UTC (permalink / raw)
  To: 60286; +Cc: Giacomo Leidi

* 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@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





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCH 2/2] gnu: Add guile-scheme-lsp-server.
  2022-12-23 20:46 ` [bug#60286] [PATCH 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
@ 2022-12-23 20:46   ` Giacomo Leidi via Guix-patches via
  0 siblings, 0 replies; 15+ messages in thread
From: Giacomo Leidi via Guix-patches via @ 2022-12-23 20:46 UTC (permalink / raw)
  To: 60286; +Cc: Giacomo Leidi

* 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





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
  2022-12-23 20:26 [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server goodoldpaul--- via Guix-patches via
  2022-12-23 20:46 ` [bug#60286] [PATCH 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
@ 2022-12-31 16:23 ` Abhishek Cherath
  2023-01-02  1:52 ` goodoldpaul--- via Guix-patches via
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Abhishek Cherath @ 2022-12-31 16:23 UTC (permalink / raw)
  To: 60286

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

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 #2: Type: text/html, Size: 433 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
  2022-12-23 20:26 [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server goodoldpaul--- via Guix-patches via
  2022-12-23 20:46 ` [bug#60286] [PATCH 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
  2022-12-31 16:23 ` [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server Abhishek Cherath
@ 2023-01-02  1:52 ` goodoldpaul--- via Guix-patches via
  2023-04-12 20:43   ` goodoldpaul--- via Guix-patches via
  2023-01-02  2:00 ` [bug#60286] [PATCHv2 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: goodoldpaul--- via Guix-patches via @ 2023-01-02  1:52 UTC (permalink / raw)
  To: 60286

Dear Abhishek,
thank you for the heads up! I fixed my patches with your suggestions and 
I'm sending an updated patchset.

giacomo




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCHv2 1/2] gnu: Add guile-scheme-json-rpc.
  2022-12-23 20:26 [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server goodoldpaul--- via Guix-patches via
                   ` (2 preceding siblings ...)
  2023-01-02  1:52 ` goodoldpaul--- via Guix-patches via
@ 2023-01-02  2:00 ` Giacomo Leidi via Guix-patches via
  2023-01-02  2:00   ` [bug#60286] [PATCHv2 2/2] gnu: Add guile-scheme-lsp-server Giacomo Leidi via Guix-patches via
  2023-04-12 20:44 ` [bug#60286] [v3 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Giacomo Leidi via Guix-patches via @ 2023-01-02  2:00 UTC (permalink / raw)
  To: 60286; +Cc: Giacomo Leidi

* 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@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





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCHv2 2/2] gnu: Add guile-scheme-lsp-server.
  2023-01-02  2:00 ` [bug#60286] [PATCHv2 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
@ 2023-01-02  2:00   ` Giacomo Leidi via Guix-patches via
  0 siblings, 0 replies; 15+ messages in thread
From: Giacomo Leidi via Guix-patches via @ 2023-01-02  2:00 UTC (permalink / raw)
  To: 60286; +Cc: Giacomo Leidi

* 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





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
  2023-01-02  1:52 ` goodoldpaul--- via Guix-patches via
@ 2023-04-12 20:43   ` goodoldpaul--- via Guix-patches via
  0 siblings, 0 replies; 15+ messages in thread
From: goodoldpaul--- via Guix-patches via @ 2023-04-12 20:43 UTC (permalink / raw)
  To: 60286

Dear Guixers,

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

Thank you for your time and efforts,

Giacomo




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#60286] [v3 1/2] gnu: Add guile-scheme-json-rpc.
  2022-12-23 20:26 [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server goodoldpaul--- via Guix-patches via
                   ` (3 preceding siblings ...)
  2023-01-02  2:00 ` [bug#60286] [PATCHv2 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
@ 2023-04-12 20:44 ` Giacomo Leidi via Guix-patches via
  2023-04-12 20:44   ` [bug#60286] [v3 2/2] gnu: Add guile-scheme-lsp-server Giacomo Leidi via Guix-patches via
  2023-06-21 19:16 ` [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server Ricardo G. Herdt
  2023-09-05  3:59 ` [bug#60286] [PATCH v2] gnu: Add emacs-flymake-guile Distopico
  6 siblings, 1 reply; 15+ messages in thread
From: Giacomo Leidi via Guix-patches via @ 2023-04-12 20:44 UTC (permalink / raw)
  To: 60286; +Cc: Giacomo Leidi

* 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@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





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#60286] [v3 2/2] gnu: Add guile-scheme-lsp-server.
  2023-04-12 20:44 ` [bug#60286] [v3 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
@ 2023-04-12 20:44   ` Giacomo Leidi via Guix-patches via
  0 siblings, 0 replies; 15+ messages in thread
From: Giacomo Leidi via Guix-patches via @ 2023-04-12 20:44 UTC (permalink / raw)
  To: 60286; +Cc: Giacomo Leidi

* 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





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
  2022-12-23 20:26 [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server goodoldpaul--- via Guix-patches via
                   ` (4 preceding siblings ...)
  2023-04-12 20:44 ` [bug#60286] [v3 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
@ 2023-06-21 19:16 ` Ricardo G. Herdt
  2023-06-21 19:27   ` Ricardo G. Herdt
  2023-09-05  3:59 ` [bug#60286] [PATCH v2] gnu: Add emacs-flymake-guile Distopico
  6 siblings, 1 reply; 15+ messages in thread
From: Ricardo G. Herdt @ 2023-06-21 19:16 UTC (permalink / raw)
  To: 60286

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




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
  2023-06-21 19:16 ` [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server Ricardo G. Herdt
@ 2023-06-21 19:27   ` Ricardo G. Herdt
  2023-08-07  9:44     ` Andrew Tropin
  0 siblings, 1 reply; 15+ messages in thread
From: Ricardo G. Herdt @ 2023-06-21 19:27 UTC (permalink / raw)
  To: 60286

* 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






^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
  2023-06-21 19:27   ` Ricardo G. Herdt
@ 2023-08-07  9:44     ` Andrew Tropin
  2023-09-17  8:29       ` Ricardo G. Herdt
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew Tropin @ 2023-08-07  9:44 UTC (permalink / raw)
  To: Ricardo G. Herdt, 60286

[-- Attachment #1: Type: text/plain, Size: 8477 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCH v2] gnu: Add emacs-flymake-guile.
  2022-12-23 20:26 [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server goodoldpaul--- via Guix-patches via
                   ` (5 preceding siblings ...)
  2023-06-21 19:16 ` [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server Ricardo G. Herdt
@ 2023-09-05  3:59 ` Distopico
  6 siblings, 0 replies; 15+ messages in thread
From: Distopico @ 2023-09-05  3:59 UTC (permalink / raw)
  To: 60286; +Cc: Distopico

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@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





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server
  2023-08-07  9:44     ` Andrew Tropin
@ 2023-09-17  8:29       ` Ricardo G. Herdt
  0 siblings, 0 replies; 15+ messages in thread
From: Ricardo G. Herdt @ 2023-09-17  8:29 UTC (permalink / raw)
  To: 60286

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!




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-09-17  8:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-23 20:26 [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server goodoldpaul--- via Guix-patches via
2022-12-23 20:46 ` [bug#60286] [PATCH 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
2022-12-23 20:46   ` [bug#60286] [PATCH 2/2] gnu: Add guile-scheme-lsp-server Giacomo Leidi via Guix-patches via
2022-12-31 16:23 ` [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server Abhishek Cherath
2023-01-02  1:52 ` goodoldpaul--- via Guix-patches via
2023-04-12 20:43   ` goodoldpaul--- via Guix-patches via
2023-01-02  2:00 ` [bug#60286] [PATCHv2 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
2023-01-02  2:00   ` [bug#60286] [PATCHv2 2/2] gnu: Add guile-scheme-lsp-server Giacomo Leidi via Guix-patches via
2023-04-12 20:44 ` [bug#60286] [v3 1/2] gnu: Add guile-scheme-json-rpc Giacomo Leidi via Guix-patches via
2023-04-12 20:44   ` [bug#60286] [v3 2/2] gnu: Add guile-scheme-lsp-server Giacomo Leidi via Guix-patches via
2023-06-21 19:16 ` [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server Ricardo G. Herdt
2023-06-21 19:27   ` Ricardo G. Herdt
2023-08-07  9:44     ` Andrew Tropin
2023-09-17  8:29       ` Ricardo G. Herdt
2023-09-05  3:59 ` [bug#60286] [PATCH v2] gnu: Add emacs-flymake-guile Distopico

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.