From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0LkFFkFiQ2KHnwAAgWs5BA (envelope-from ) for ; Tue, 29 Mar 2022 21:47:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aL8LE0FiQ2KOWQEAauVa8A (envelope-from ) for ; Tue, 29 Mar 2022 21:47:13 +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 F2F3018FA9 for ; Tue, 29 Mar 2022 21:47:12 +0200 (CEST) Received: from localhost ([::1]:40178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZHo7-0007hv-SG for larch@yhetil.org; Tue, 29 Mar 2022 15:47:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZHlD-0003kN-86 for guix-patches@gnu.org; Tue, 29 Mar 2022 15:44:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZHlC-0001Eh-Sp for guix-patches@gnu.org; Tue, 29 Mar 2022 15:44:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nZHlC-000506-PF for guix-patches@gnu.org; Tue, 29 Mar 2022 15:44:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v5 23/27] gnu: Add rust-tree-sitter. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Mar 2022 19:44:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49946 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49946@debbugs.gnu.org Cc: Pierre Langlois Received: via spool by 49946-submit@debbugs.gnu.org id=B49946.164858303819034 (code B ref 49946); Tue, 29 Mar 2022 19:44:10 +0000 Received: (at 49946) by debbugs.gnu.org; 29 Mar 2022 19:43:58 +0000 Received: from localhost ([127.0.0.1]:33624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZHl0-0004wp-4S for submit@debbugs.gnu.org; Tue, 29 Mar 2022 15:43:58 -0400 Received: from mout.gmx.net ([212.227.17.21]:55615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZHkt-0004si-H3 for 49946@debbugs.gnu.org; Tue, 29 Mar 2022 15:43:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648583025; bh=RGC+79eN828/yRX8AtkNrEjyCZ96SBdYQtwgDCY5M8I=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=CO26HTMwxRD1QeDXrby0TOpWPPaCrpccPWIN0wwEvlsEP0b0Lpl3x7hanBj8xhJ3H HjSEimlIloCYlX4ugDusyxsxYUFE51F854xLfvMP0t+HEX8x7X9Swo4YVQcAG4J5HQ lCcd2ZAgH3WX5G5dneGYMzSHjWovU4VrvWRPUfNg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Mnpnm-1oNSnr2Pco-00pJUg; Tue, 29 Mar 2022 21:43:45 +0200 From: Pierre Langlois Date: Tue, 29 Mar 2022 20:43:14 +0100 Message-Id: <20220329194318.6106-24-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220329194318.6106-1-pierre.langlois@gmx.com> References: <877d9s2qa9.fsf@gmx.com> <20220329194318.6106-1-pierre.langlois@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:WI9kTdHiKS+zOjd5wtbE2ZLQTenV17Mv/M53F0Qk83uV63WHky5 C1YdfjrJoi4vTisK0fRj2EjkbDQ+/TARyKkcTpjJeq7DMVS3Yxo9NWaHFuRTaCgx3fyuyyT fH9Y4s8nRgf8K5JmgEOM/c+X0IxcpdBv1gCOAP9Tn7oc4R6WHKIinqPIWH1gUeZoAuSFJkH wocmhSA77brPKh67DnALw== X-UI-Out-Filterresults: notjunk:1;V03:K0:ri7HTXmC/vE=:PkgoxUgEaHjsPNtEw2qWle DU6UUimhbH6iKsRhSLuSz94UdB9zhCMm5DCaK9OmHGkV16uzPnpCWxkFy/BY3qo13moSirnEB QPcyrU0fqvFLgdxaDnIcLmD4iasWTrI49OAbkYUdchALD5Zll/WUstooJpYNDpjKqVC3wnLCI 4szAO8PPUTaLlGpBp2GmZ0hwbPqZX80Lh9GWWXZCTCM5/H2nNeO9Z94x+Qz1OLcvMfDOnBWK9 aoFCriX7W4Vlrt+KczyXl9jc/LrV/wGoubZzP+1TX4H5bFV47LsuDe+HL7R6wZo0xwtK1xOiB kaG2q2JrFmLvELCNtZm+xoEHunsWY2YSFxp3xfWFVjtFOi4N8x8iSoY3fbDMlD1m50XXe1iEJ dNxWzjYisWiqRb/8mLDZX1he1y6dRBe3AVDxSzpRXQ6bt8BJIi5cA/xAClLSVen0bEXwaWzNr qaP+e4EYTjzp6MvwH6S5d58kKnJxu82I6josUkf60yu0oUPbnwgESH0/KrBFeURS8bYdybMTN Pj1dLHBcs5cviqWRG7vzwVPqmGnT0pCtGus9wda3hKIRlx4gHZ7ZaWRZQhwYdRe9z/ypkHLzI vNzduJnm/mvkDiqKXAq+N3c30ZaN0bLdgj6G3LKkVvl0vH6DgUrk2bUO8gx86zzRncOeLbilQ Zxh39ccuGdpZYOVC9J3w5fl2xzbRozIZu28Zg51JVv4Ui5abBRr7BUs0oRdV/mCJ0Q9gzJXvk K9cM65ntrfbHfyJtQr5q5/ihsuOALWk3XxxfWoJv73LxDLWUIROaMNuWa6S7ZeQdOOd533Yde Uxtb+9RwjhdB3bhABzPA0DL4SPOkLhWaQ/pu8heyNf2yOH2R6jbKASEo8/WRWrbJf5q7y0LWj Bp+ZoK5qOqQxyL4r1DIwrhEfcKbDgCdkfUDIVSZf5LQ3mv5KGlJlFKpNGFHqVT6QO5Wi0racW 0aCkupum1vRdC0OUGeTFqX7LcymCOAer10MGvL3XYOCijQc+iZZOVFmRtLh4SG7wBWHVMsdo2 /tUmq/abZAVV5IhxVFJunu1bVqtUPnICgdn/4Bl3rluzF2gbe8bbCmZQMKlBLPUqicc9yz17x PV6jJGoVBL15Cc= 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648583233; h=from:from:sender:sender: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=8RMK3LtLnMyk+GVyYTdQQzayoeUAcsjJoNyy1vfOBJM=; b=XojyQt9erOElMMAZN0fVO6aZ+shnXuSBQmeSul24cmcF4XKJ6FUe7p3IHF8lXJj6JUphYQ XxfTxzH5//fBFGyH+iEmws92D29aVKiXxKPMeLrkYFp43P6LVsBZUxPjyOQF5NrR5Xyp7O UYtFgLm92E0r04fKtAYFNhP+FAhs3sJAO4MXrYk8ASWA3C/mm/bYSoP7MIKtkvz3gBUUNx H3MOv69Uydc3ps3MJ4znFR6eiRZtFSlAS9wuoHf4zZCQr0nXQwzz5qAuZbfMrTaydDqnfP R9wobzFrG4AnmuQAKuGbh+qgdE7OnJPR0B17DZt76efXhKmrC+//wMbuv9NVpg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648583233; a=rsa-sha256; cv=none; b=lc2yGu5q56afKdJXjk4wE/ex7UqVSxXhxYxvTJZDXVM+VP5nefahnOuuPxiSHz90aOb2h2 NEht5gnZu7zmykNNn5Li/8SfJ+QCX7h8+iBCoi+tGeF+idC1WDDSVr7ZbqppGgbqgCnKPR ZeoYRcCuktlTSZIIZOvzUhI70JZTwxaJz0A7O5Yu0RFrslbfF+MYOoxd2QriJ2PDweb+iY ORrjKXZcais6suDreGxS+Z3Avo4kSV/78Mb4qDXc46zjxi2X0gPAJiVJrUp5+ardAJ/Ny4 Extoifv8eVrzCShO3iVk6Z74Ak7/Z9bX6WE7qs4ayDg1G17zVUOV9JINzJUnAg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=CO26HTMw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); 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" X-Migadu-Spam-Score: 7.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=CO26HTMw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); 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" X-Migadu-Queue-Id: F2F3018FA9 X-Spam-Score: 7.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: zA40ZAEXGwVT * gnu/packages/tree-sitter.scm (rust-tree-sitter): New variable. =2D-- gnu/packages/tree-sitter.scm | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm index 756dc0d540..389cb944b9 100644 =2D-- a/gnu/packages/tree-sitter.scm +++ b/gnu/packages/tree-sitter.scm @@ -23,6 +23,7 @@ (define-module (gnu packages tree-sitter) #:use-module (guix build-system cargo) #:use-module (guix build-system gnu) #:use-module (guix build-system tree-sitter) + #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) @@ -157,6 +158,44 @@ (define-public tree-sitter-cli This package includes the @command{tree-sitter} command-line tool.") (license license:expat))) +(define-public rust-tree-sitter + (package + (name "rust-tree-sitter") + (version "0.20.6") + (source (origin + (method url-fetch) + (uri (crate-uri "tree-sitter" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0wcvxgnvj7ga1y7xa7wm0pmabkfj8936ifg8jacd4201cj0vgcq9")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove the runtime library code and dynamically link= to + ;; it instead. + (delete-file-recursively "src") + (delete-file "binding_rust/build.rs") + (with-output-to-file "binding_rust/build.rs" + (lambda _ + (format #t "fn main() {~@ + println!(\"cargo:rustc-link-lib=3Dtree-sitt= er\");~@ + }~%"))) + #t)))) + (build-system cargo-build-system) + (inputs (list tree-sitter)) + (arguments + `(#:cargo-inputs + (("rust-cc" ,rust-cc-1) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-regex" ,rust-regex-1) + ("rust-spin" ,rust-spin-0.7)))) + (home-page "https://tree-sitter.github.io/tree-sitter/") + (synopsis "Rust bindings to the Tree-sitter parsing library") + (description "This package provides Rust bindings to the Tree-sitter +parsing library.") + (license license:expat))) + (define tree-sitter-delete-generated-files '(begin (delete-file "binding.gyp") =2D- 2.34.0