From: Giacomo Leidi via Guix-patches via <guix-patches@gnu.org>
To: 60286@debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul@autistici.org>
Subject: [bug#60286] [PATCHv2 2/2] gnu: Add guile-scheme-lsp-server.
Date: Mon, 2 Jan 2023 03:00:24 +0100 [thread overview]
Message-ID: <20230102020024.27498-2-goodoldpaul@autistici.org> (raw)
In-Reply-To: <20230102020024.27498-1-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(+)
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
next prev parent reply other threads:[~2023-01-02 2:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Giacomo Leidi via Guix-patches via [this message]
2023-04-12 20:44 ` [bug#60286] [v3 " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230102020024.27498-2-goodoldpaul@autistici.org \
--to=guix-patches@gnu.org \
--cc=60286@debbugs.gnu.org \
--cc=goodoldpaul@autistici.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.