From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gJWCHPs6smNbQgEAbAwnHQ (envelope-from ) for ; Mon, 02 Jan 2023 03:01:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qK1vHPs6smN1WAAA9RJhRA (envelope-from ) for ; Mon, 02 Jan 2023 03:01:31 +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 F3BD63C419 for ; Mon, 2 Jan 2023 03:01:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCA8P-0003vr-00; Sun, 01 Jan 2023 21:01:05 -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 1pCA8M-0003vI-UE for guix-patches@gnu.org; Sun, 01 Jan 2023 21:01: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 1pCA8M-0002Tj-Ik for guix-patches@gnu.org; Sun, 01 Jan 2023 21:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCA8M-0000mC-Dd for guix-patches@gnu.org; Sun, 01 Jan 2023 21:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60286] [PATCHv2 2/2] gnu: Add guile-scheme-lsp-server. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Jan 2023 02:01: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.16726248532955 (code B ref 60286); Mon, 02 Jan 2023 02:01:02 +0000 Received: (at 60286) by debbugs.gnu.org; 2 Jan 2023 02:00:53 +0000 Received: from localhost ([127.0.0.1]:42145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCA8C-0000la-Lp for submit@debbugs.gnu.org; Sun, 01 Jan 2023 21:00:53 -0500 Received: from confino.investici.org ([93.190.126.19]:29415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCA89-0000lF-Oy for 60286@debbugs.gnu.org; Sun, 01 Jan 2023 21:00:50 -0500 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4NlfGS6Tbhz10vf; Mon, 2 Jan 2023 02:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1672624848; bh=EOMH+XkjCSK0Gr/PPLjjjvDeOPZv850tIv/kTirctNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JYSTyDYjB9raYMeqVMVjRvDWuIZwFoEYlHBid1nqGWwb/aih5icVwOb+9Vn/KK/nh t7f5PGejkTlcSrekOgwxvLifJ/fcIV6ju9fbP5VAKpFGn+DaUmXhhNqoq7PBiJdhOz RZnwinh67gC2y3Gmm92iTZBCI773IGg2/J/eQepg= Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4NlfGS5x8cz10vS; Mon, 2 Jan 2023 02:00:48 +0000 (UTC) Date: Mon, 2 Jan 2023 03:00:24 +0100 Message-Id: <20230102020024.27498-2-goodoldpaul@autistici.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230102020024.27498-1-goodoldpaul@autistici.org> References: <20230102020024.27498-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=1672624891; 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=EOMH+XkjCSK0Gr/PPLjjjvDeOPZv850tIv/kTirctNk=; b=TpVK+ipjdUW1hQwjrmbS/kHrbcRMhlSqPWktIU/MVoSgvM1zhs9yfke9Kxpq1+CzVXrG0O oad9JmFQloBhQhuZl64ELSXixfcKMDy988kyoWaL1AekjaWplAOotscorJ/K53qOsTQNeN XvFvG6nQbTaOIPvFGqx0T+7qLqZs3rUCSkTs+WS0eoFQQgJsEi/sYb7ormBzA1u2A6435l xJTcPpSaCDTpYjHiiVa1lur4ZUmzjsSATOqnjNOI0jil8+K7y7zD6AB3r6HyKHqojVHf2O 6QR9F8k/dETc0b0cKzw1KYmCuHEtPZRyG47UGLWH2P3BhirTPdQx/pkaHwwAYA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=JYSTyDYj; 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=1672624891; a=rsa-sha256; cv=none; b=DI6t0zB1iRMCr3lV9beMCZsFIlf+9bmsGvVAYm9dAem2UK8Coh/fpYMAmFqPlsNgubeOt4 tTTAz3Rzi7/OzD42ThHn/wmNqvx+8OHMiN+QxF8zcqYaGzku9LyjRmXETCUnMVyvthWqBd 9z28/s3G+Z5ycB31dD/7xQOZw6VDZQiYM4i2A0gr6KVemOcAM/vC9lE/gDFRSLUR+yh+oM ZU0H/tnpbnvO3zktymAjKW7+QcLyS405CRhUDz2UDTCHnXExN+0eNVvga8/IWV/M0ku8kb TRMWhCWl8W8yyoqjmV0bkHEYYEg+Ps6w/OyeRGb41w5DAbLRzDK+F4DbxYZGDA== X-Spam-Score: -3.05 X-Migadu-Queue-Id: F3BD63C419 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b=JYSTyDYj; 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: -3.05 X-TUID: wkaW8pXuteH+ * 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