From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AOE8Dz290GTGywAASxT56A (envelope-from ) for ; Mon, 07 Aug 2023 11:45:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qPngDj290GSd2wAAauVa8A (envelope-from ) for ; Mon, 07 Aug 2023 11:45:33 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 848334BC14 for ; Mon, 7 Aug 2023 11:45:32 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=ktvu4VlY; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691401533; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=fPrGZNEuDzWqMvhC2XSgzYpplrL4fOgnRNsssTjJNB4=; b=AtqyCuP4VYGqfWd7Bt5pcq432s4u5tnaoOSRxqQ7HRtpKbafLTyYpRwnM2PCHzkw/KdT8L QHAHw43MtgxmgWjAtdmj2dqi5GS+c5J1GxYS0VnxXxgVgtMcgWuVLoHo9KZh0v1jnB3uzS +tGsfiNQvuDYt/Uo+Xti6M6RwZuokZ0Mg3hy6gS683pkTKMffCvLJbofZX8HzdYrstdB00 kX15ERiN5ayAjIp6oTdvcnCFub4VCIucju5QqqE+w3W3ndD0Y7FKF4A1QTnSFE6FPZDc/0 tTjuEgTYnxcJ2FtchoxEitLm9QLNbAlBTeoip07rHVtimxIQsF3svpm6BnnnqA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=ktvu4VlY; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691401533; a=rsa-sha256; cv=none; b=iDc6EurEjtD2SpNhF7FegKaa+RK6mjVJX69OXGOr/ZFDA8w2950CnT8Voo5UXl1FazDFq/ jvvi0s32cOR2qQd94zSaQjzIsSeQ8QCaWHllbkzYqgG/56DmuwNWZRQMku0/2A4JgDcJyW BradY/tO3oL+MJ4eJrl3E7YpmazmJsKHFjPR4v5RihP6SRe9kiyxXllvQdL0+LgBFDF5Yc enuQx8p70pdiI7x7cryblxa//CWFjI3CGle2H1/pz2XLM1YTFV+iwDPtvLFkE7UuuF9Ts4 LgHmJJk1yHqmxb5hZlzLJTcxtNcg8BibpWHXMK5TuZ4p26l04e1mt0UdLJAqpA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSwnT-0006m1-LQ; Mon, 07 Aug 2023 05:45:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSwnP-0006lI-7f for guix-patches@gnu.org; Mon, 07 Aug 2023 05:45:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qSwnO-0002dp-Tv for guix-patches@gnu.org; Mon, 07 Aug 2023 05:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSwnO-0008VE-G6 for guix-patches@gnu.org; Mon, 07 Aug 2023 05:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#60286] [PATCHES] Add guile's implementation for scheme-lsp-server Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Aug 2023 09:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60286 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Ricardo G. Herdt" , 60286@debbugs.gnu.org Received: via spool by 60286-submit@debbugs.gnu.org id=B60286.169140147132629 (code B ref 60286); Mon, 07 Aug 2023 09:45:02 +0000 Received: (at 60286) by debbugs.gnu.org; 7 Aug 2023 09:44:31 +0000 Received: from localhost ([127.0.0.1]:60609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSwmt-0008UC-6x for submit@debbugs.gnu.org; Mon, 07 Aug 2023 05:44:31 -0400 Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]:39401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSwmp-0008Tw-8z for 60286@debbugs.gnu.org; Mon, 07 Aug 2023 05:44:30 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id BAF2020005; Mon, 7 Aug 2023 09:44:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1691401460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fPrGZNEuDzWqMvhC2XSgzYpplrL4fOgnRNsssTjJNB4=; b=ktvu4VlYncjQj5ZnM8l49QGUwAFWfG1PCPm5wEs6vI467ZHcmTABFbm9bBcRY8v+zD7FFj F9K0/uM0JgpGyb6LLGdxolM/5It/NzKdT0KVDUTC5Hh402FkJxs7tfgd0CMFWiSXUNQslk O2nCG2EpZDrNWy06Ewhi6BjcLK4xXM4+Fq13zbcT7sEkdI6bZtTfSkyjq927VVt1Bgig9h rnjjcBOUlsr1HURnmU28Mzur5DgVXiXjL7kSHRspLF8WopO3VLe5AF16yOflLGZgIbkP43 u9G3dCW+MDUu6MEJpuJ0auqTvzdnrpkrl4AZOBr7tF4vprzsD5O8YtnSjg7Y3A== From: Andrew Tropin In-Reply-To: <890f1480abf9e421aa3301a0e857ee2f@posteo.de> References: <826bc5ec20281f371ab62befc19d3b51@posteo.de> <890f1480abf9e421aa3301a0e857ee2f@posteo.de> Date: Mon, 07 Aug 2023 13:44:15 +0400 Message-ID: <871qgfrxu8.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-GND-Sasl: andrew@trop.in X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 848334BC14 X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -0.86 X-Migadu-Spam-Score: -0.86 X-TUID: DZyxpRK+nzwA --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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=20 > 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 > -=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > "0w4m8xx8yyj0rv0q57mjr8ja87l7yikscj33i3ck26wg7230ppa5")))) > +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > "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=20 > Scheme") > (description > "This library implements parts of the > @uref{https://www.jsonrpc.org/specification,JSON-RPC specification},=20 > 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 > +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 > "/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=20 > 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=20 > implementations. > +To achieve this, the code is designed to contain as much logic as=20 > possible in > +R7RS Scheme, separating implementation-specific code in different=20 > modules. > + > +This package delivers Guile's implementation for=20 > @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=3D56667ee55c 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! =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----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----- --=-=-=--