From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id iEINAGwYN2S9XwEASxT56A (envelope-from ) for ; Wed, 12 Apr 2023 22:45:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8M/XOmsYN2SJlgAAG6o9tA (envelope-from ) for ; Wed, 12 Apr 2023 22:45:31 +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 A83FD310B7 for ; Wed, 12 Apr 2023 22:45:31 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmhKy-0000jm-F6; Wed, 12 Apr 2023 16:45:04 -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 1pmhKw-0000j2-Fw for guix-patches@gnu.org; Wed, 12 Apr 2023 16:45:02 -0400 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 1pmhKw-0002qW-6T for guix-patches@gnu.org; Wed, 12 Apr 2023 16:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmhKw-0008SE-1v for guix-patches@gnu.org; Wed, 12 Apr 2023 16:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#60286] [v3 2/2] gnu: Add guile-scheme-lsp-server. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 Apr 2023 20: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: 60286@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 60286-submit@debbugs.gnu.org id=B60286.168133226032409 (code B ref 60286); Wed, 12 Apr 2023 20:45:02 +0000 Received: (at 60286) by debbugs.gnu.org; 12 Apr 2023 20:44:20 +0000 Received: from localhost ([127.0.0.1]:41899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmhKG-0008Qe-9e for submit@debbugs.gnu.org; Wed, 12 Apr 2023 16:44:20 -0400 Received: from confino.investici.org ([93.190.126.19]:47825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmhKE-0008QW-ME for 60286@debbugs.gnu.org; Wed, 12 Apr 2023 16:44:19 -0400 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4PxZSf1QMnz110l; Wed, 12 Apr 2023 20:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1681332258; bh=R7aBhXIXNIyVQ6HscR/C+47OtpD06hP4mG9HsTmADL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RdfUtaWmi8u4EJDNhIS3qy7Ha27BUQlxuhvImMWQfe2Q9ubuaF+BBqMXPFLjaO5uD JkwfeOaYHNsMME7q9r47vzysL/r21PA+ylLPDgJqWLvuo8MyAlZBG7ArO23Tq/FlSv YCIhfXSNmjybUh1RUk+SN0dRJOWek5G/C/maz/5k= Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4PxZSf0qWCz110h; Wed, 12 Apr 2023 20:44:18 +0000 (UTC) Date: Wed, 12 Apr 2023 22:44:02 +0200 Message-Id: <20230412204402.14774-2-goodoldpaul@autistici.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230412204402.14774-1-goodoldpaul@autistici.org> References: <20230412204402.14774-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-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681332331; a=rsa-sha256; cv=none; b=feWq3XyQYMZsdZybdAbDNhBsHICyuF7JFs/cCBm9+dgw+cUQ4ASmkDdbndHifHanVEuhAq +oQnffqV5onDAMETaWNujg/iV+BwfDF7U2/62lyzP5+l7F/qDXYbppAWJBZdgMgEaJ1O57 2auL/MlpkbKWzyHNiQQDV+XeOuelPtvg7w8RqPzN8sbVir9/yH2RZVQ0tzrjO/Nx1bAnHl B4EU5wpq5vHSxHTfrfYhaLFXoYX6iHIPbylr7KhOkB4hmgZ9/ilBfHU6N2IfHzPFAYxYyo 6U8ESRgJuDhnqLyTX435LTO2pJ1bozyiYfBzbexsVsEQ6p7E1zYCxAGG5W/bJg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=RdfUtaWm; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681332331; 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=R7aBhXIXNIyVQ6HscR/C+47OtpD06hP4mG9HsTmADL4=; b=l8ezL4We+8tsaNKKicB4Y8abiC2UOQVInklIyHp5CK87QKHFyYMDZdarx4vlz168VrtcGv xZRrPRGYKul2uz4VrcBHTXtHZqy1tYT4vpfu9LovLbq9x93xD7PIhxZpIPNTSEml/Ns8Vw UroxNFLL/rHnPJR62B/fwTrDZe1bE0qIWdBGWRrr63fcRYC+//mPnsuyo5bpSMy8nuSVZU 2PVXylhgce2clfH2ZL/D6XJs+ewpHPYYr0yfEEbMV6h+R9D1p+Fxa50cP+zahBQWdUiEye J96VhNbiQriITJx4AfefiqRryC4CW3QSoGqFIv7z/u3FM5M7cAXjyilqCeBnpQ== X-Migadu-Queue-Id: A83FD310B7 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=RdfUtaWm; 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: scn0.migadu.com X-Migadu-Spam-Score: -2.52 X-Spam-Score: -2.52 X-TUID: IE0pCFSn90ZK * 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