From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uD/LN+8TpmOUOQAAbAwnHQ (envelope-from ) for ; Fri, 23 Dec 2022 21:47:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yB7dNu8TpmPF1AAA9RJhRA (envelope-from ) for ; Fri, 23 Dec 2022 21:47:43 +0100 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 3F19C200B3 for ; Fri, 23 Dec 2022 21:47:43 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8owx-0000rv-Jn; Fri, 23 Dec 2022 15:47:27 -0500 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 1p8owY-0000ls-Gb for guix-patches@gnu.org; Fri, 23 Dec 2022 15:47:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8owX-0000YS-RJ for guix-patches@gnu.org; Fri, 23 Dec 2022 15:47:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p8owX-0001ku-MJ for guix-patches@gnu.org; Fri, 23 Dec 2022 15:47:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60286] [PATCH 2/2] gnu: Add guile-scheme-lsp-server. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Dec 2022 20:47:01 +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: 60286@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 60286-submit@debbugs.gnu.org id=B60286.16718284076736 (code B ref 60286); Fri, 23 Dec 2022 20:47:01 +0000 Received: (at 60286) by debbugs.gnu.org; 23 Dec 2022 20:46:47 +0000 Received: from localhost ([127.0.0.1]:38762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8owI-0001kZ-RN for submit@debbugs.gnu.org; Fri, 23 Dec 2022 15:46:47 -0500 Received: from confino.investici.org ([93.190.126.19]:32949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8owG-0001kO-B3 for 60286@debbugs.gnu.org; Fri, 23 Dec 2022 15:46:45 -0500 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4Ndzk86Zrdz1142; Fri, 23 Dec 2022 20:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1671828400; bh=H+pI/r2Wo+784p7Xp6XjnHNGgfRkgEjvT9v4V6PmWp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nRVtpxakqUK3in7p1UkxMYP+x+eCnT2iBu4Bc5HnC/4BJJOiyWgMx1og4ca/GNF01 21ARsoDlmuKy2uSQeFvqifcHCSZAha+Zd06E4+Br5ztt7MxAEdYuz+HIE6v6EGFimX eXXtcMcj9NM6hHbGJdrwkiTJL6/wVMT3aO6mWWtM= Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4Ndzk861Wtz113v; Fri, 23 Dec 2022 20:46:40 +0000 (UTC) Date: Fri, 23 Dec 2022 21:46:30 +0100 Message-Id: <20221223204630.1833-2-goodoldpaul@autistici.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221223204630.1833-1-goodoldpaul@autistici.org> References: <20221223204630.1833-1-goodoldpaul@autistici.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Reply-to: Giacomo Leidi X-ACL-Warn: , Giacomo Leidi via Guix-patches From: Giacomo Leidi via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671828463; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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=H+pI/r2Wo+784p7Xp6XjnHNGgfRkgEjvT9v4V6PmWp8=; b=ucjo8LWIpGB9BIFMvTMfrYR//iA6Cvsv4mEUCvpOKG7Do5B8w82q44WnOSVbEXExXLK33A E7C9MCQx8hj1gZV9kG/iKQ5D8MNtvM+PrHT5CU56vO3biKVrlaTXeMoOLXXd0BDL1yOFTN drU8wrtzkLmATcCGONpLY9PwstvECKIU3CUlf3Ht9UXQBLeWoh6qvZAA9FLKskCjSxKoj5 vAc2oD+MVQhOqt0/uce4CcvXfvjkQQogpM1SeiyELBpHWvqMX1VbjwjU1MIehl0j+Jflos IN3VpsmXLFi/uDxCwkviaf+LGjsoyRfj4A2D29kLcvfr0uPQMVarV/0hYkPzIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=nRVtpxak; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671828463; a=rsa-sha256; cv=none; b=EE8xCTw1c5BDBidNsAb0f4BD+H3Z0xVCZNCzQbz9wQzoVVwoP4kb1ZC6gq5HwRIsIIkJMy 1ThogfsisFY9ZI23KzMExoLSfZTylGyGfZwkHHhPZmLGkWHViIiadvHn1oob3adouBGh+J UQGTEDH0KAXWbxymxBZJZhavJ/0sV/etQwoa1SoE161bgbKdc5fGjpy4Eo/f0ojPYjArvg De5KpYfjuQyFwFDb8CHoKypn5qtll//metWuRIlrMP8tLO8NPQRloZSWq4IA1rtCJoJEnm h0nQFdcdBQod7n3cMSKVdG7+nlcmhiyaXGpX509UQIO1Cy/RfYC5pxnwFVs2fA== X-Spam-Score: -1.51 X-Migadu-Queue-Id: 3F19C200B3 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=nRVtpxak; 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=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.51 X-TUID: D6pxcV0knQjg * 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