[bug#77453] gnu: Add sbcl-alive-lsp.

Message ID 87bjte97qt.fsf@gmail.com
State New
Headers
Series [bug#77453] gnu: Add sbcl-alive-lsp. |

Commit Message

Grigory Shepelev March 11, 2025, 7 p.m. UTC
  1. sbcl-package->ecl-package fails with: «Component #:SB-INTROSPECT not found, required by #<system "alive-lsp">»
2. Can be used with emacs-lsp. Requires override. Example:
#+begin_src elisp
(require 'lsp)

(defun lsp-lisp-alive-start-ls ()
 "Start the alive-lsp."
 (interactive)
 (when-let (((lsp--port-available "localhost" lsp-lisp-alive-port)))
  (lsp-async-start-process #'ignore #'ignore
   (executable-find "guix")
   guix-exe
   "shell"
   "sbcl"
   "sbcl-alive-lsp"
   ;; "-D" "-f" "guix.scm" ;; when working on some sbcl project packed in guix
   "--"
   "sbcl"
   "--eval"
   "(require :asdf)"
   "--eval"
   "(asdf:load-system :alive-lsp)"
   "--eval"
   (format "(alive/server::start :port %s)"
    lsp-lisp-alive-port))))

(lsp-lisp-alive-start-ls)
#+end_src
---
gnu/packages/lisp-xyz.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

--
2.48.1
Message-ID: <87ecya97th.fsf@gmail.com>
  

Patch

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 58e7f948ad..4c9a53c3cb 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -31778,6 +31778,35 @@  (define-public cl-usocket
 (define-public ecl-usocket
   (sbcl-package->ecl-package sbcl-usocket))

+(define-public sbcl-alive-lsp
+ (package
+  (name "sbcl-alive-lsp")
+  (version "0.0.1")
+  (source
+   (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url "https://github.com/nobody-famous/alive-lsp")
+          (commit "491251c2897d9251d04301061065e2c23171f6a0")))
+    (file-name (git-file-name "sbcl-alive-lsp" version))
+    (sha256
+     (base32 "112zk8hkg71h7bbdmqfgxqblccb2bs8wcl6f7nrjjm1hy3cf1919"))))
+  (build-system asdf-build-system/sbcl)
+  (inputs
+   (list
+    sbcl-usocket
+    sbcl-cl-json
+    sbcl-bordeaux-threads
+    sbcl-flexi-streams))
+  (home-page "https://github.com/nobody-famous/alive-lsp")
+  (synopsis "Common Lisp LSP: Alive")
+  (description "This is the language server for Alive:
+  The Average Lisp VSCode Environment.")
+  (license license:unlicense)))
+
+(define-public cl-alive-lsp
+ (sbcl-package->cl-source-package sbcl-alive-lsp))
+
 (define-public sbcl-utf8-input-stream
   (let ((commit "d33b57a4d439c2f0877e5513be45eb6940d92c68")
         (revision "0"))