From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id F6clBedzFmFVLwAAgWs5BA (envelope-from ) for ; Fri, 13 Aug 2021 15:30:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iOZFAOdzFmHhawAAbx9fmQ (envelope-from ) for ; Fri, 13 Aug 2021 13:30:15 +0000 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 5C70E18A7C for ; Fri, 13 Aug 2021 15:30:14 +0200 (CEST) Received: from localhost ([::1]:51882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEXGG-0005xg-QB for larch@yhetil.org; Fri, 13 Aug 2021 09:30:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEXG7-0005xT-Ct for guix-patches@gnu.org; Fri, 13 Aug 2021 09:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEXG7-0007GC-5e for guix-patches@gnu.org; Fri, 13 Aug 2021 09:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mEXG6-0007zZ-SS for guix-patches@gnu.org; Fri, 13 Aug 2021 09:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH 07/31] gnu: Add tree-sitter. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 13 Aug 2021 13:30:02 +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.162886139430680 (code B ref 49946); Fri, 13 Aug 2021 13:30:02 +0000 Received: (at 49946) by debbugs.gnu.org; 13 Aug 2021 13:29:54 +0000 Received: from localhost ([127.0.0.1]:40907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEXFt-0007yd-Vv for submit@debbugs.gnu.org; Fri, 13 Aug 2021 09:29:54 -0400 Received: from mout.gmx.net ([212.227.17.22]:32911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEXFn-0007yJ-P4 for 49946@debbugs.gnu.org; Fri, 13 Aug 2021 09:29:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1628861377; bh=rut1xBNsP20UzKa7f1cV/TybAuAVKWDX/YbHU4iS28U=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=Q+w3jXKBfbfAPb6j/w9w5fxJbY7ExUipKNa+oF3YKJl+GHTAmQ8bImtUydi0QFpEV dXfgBrQWRSE0064h2+lM5oGj4yOXb3N05S0dQIz6oGmLOTZEy+AfNAjLEJ+gs7FC73 ts7Mmhk3wA8ZoIU9vJdLD0IXzkwe0Lg0LXzrokQQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MJE27-1mXzmU0l6R-00KhFj; Fri, 13 Aug 2021 15:29:37 +0200 References: <87h7fztt60.fsf@gmx.com> <20210808233354.6745-1-pierre.langlois@gmx.com> <20210808233354.6745-7-pierre.langlois@gmx.com> User-agent: mu4e 1.6.2; emacs 27.2 From: Pierre Langlois Date: Fri, 13 Aug 2021 14:17:17 +0100 In-reply-to: <20210808233354.6745-7-pierre.langlois@gmx.com> Message-ID: <87zgtla2x0.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:kMMAkOASWTi9YcP/+yUCA/NB+Gw/qnmog2NjDNh5H/RjsFOPFm7 5AR05jl7Ke7bfLQViXpq1bf2PTEStOwcn8FOH/W+Pnlcx3Q47fMCftRf5Uh88emjs+ffG+X O+7+SdJDqVVxTI8vSt/gpO6LdBVeFKr5/nZh+yysQNlzFrXBtia22HKB3PJTf5XATtLvLM8 ku6r62+/YJTRjMo+P5mag== X-UI-Out-Filterresults: notjunk:1;V03:K0:XrGJofsdRkk=:/g8ZDRmD2FbJs9YK20yrfH bmqmZG3ZzVgRi1SsAEnbxTrMXMWGYBTa8EvZ/GMi6a46G2b2D7Tr+5YFPRVCag2C54jgLE5iT rVzieXYVFWiaLTkj6NF+6COrFWHCq3wMnCJMoK4KoH7ZkwRohEbYsFmtZVCG8KoDq+TAADTPY t8EqfdXqpIJcqKpjmMbhaV/rUp2UjU8EWhTAC8m3c+59QgtphtYwyxM15YGbCanIeyUd8QowM jw3UayEwh/VnWfgFoRaQO0P7hVPATkQpL/7KViY5YI/p02xeUfFEfFO5tfQASgfR4tePQlPOI nKstHOyoqUlwoLI96G4nEl29gI4NhzEQTJxXVkn0uZG/lcwXnQMhMRy0dr73PpHDa6R+L8kLP 60emo6H2fGTOml57VKltTQzC3N7p5Q55HGPaYUv40H5v8srxpM05ogUBIe3geh8xxfhMDA0ef D0SXPLvFtXC4Sa60DZP6od9KjYB0ZL1tVvIAO7mL4QXtvrwDcO1SNBt9eKo/KBDTAHQ24EV27 YCe6okFyZIA2nYCZkYfy4wZAZ9YKUZ4W+nYZf0S9ayg+U5xl6fXv9/g8gO55IEjuCys17yd20 +ENdQmGwtqXzf0j4dOAqlF9r+0zpbUdhnrft4nLsMGLBG3k/oME22YEUG1DLLfclihCA/t5D5 oJZWdblZKIVAhd+R4zqPYMxAdOQMJw5ERUwdD8N1jwCrBBEuZE+jsOXrZkX3JxzSPwbOtWULH 1Gvnhm2MsyMNygh7V+oNxJpfBgnPLtyZ4jf1fTklpsh3xI2zFsW6wHNBbWYKibrutY7uh52Rr 24CUhyep91Fg/oKoWMqpXwyPRFQa5YzcRcynsgviKcaQxuSdFSurxD+bqd6ryigSyBJfDhJeG G2BcdeWa+/fWwpqvsokGls7mVa2jwBW57C8EfcflXgzNaqAkMCgeEIkUcXmZ/tvOtvyTM4AQI ZUEa+feXQPIzxjfH8haALI1QW9ihDbmTzGW7ImuVEKY3EYyXJdwxgmIzNFGjRP1/D4W9mA44A X6vPgEqBtU1d1uQLsMgM3FWF1rMEOO4XEFuodLXBzCPXAfmiLdSvTlIMXFylrEi+HEjpGXX6o RZO5WvkHonh18vkeHDR6M64euWX54eJ3wMdoqH9kdXqxTamwv1mE124sA== 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628861414; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=XOnCgjM0wd333e3pRP5sMsquNUcZ1FBbzP1gPJy2lfs=; b=S4nmAGewjN4vDxdyJs9mANTd7Up4ykE4bmnY6WlD2AoLzHYfXzy9tisM2zDlzWDNHzp6AR snnIgY417e85PlG0mYajkn+wC/J7G9Dmhpw0RtijozPIhYUgpdhP6+oLW1IDYWjmOwWGXU dauam//6lyqOiBB/2Fvx1+22Ppce36CyH/hxMASKTRFiqMC8S3ogxIBz6dK7Mq+h4WYMgB 2jlZx13RxMJaE5pGGO+stRba1RWVOAvkh8pTmob9BOf2cnC1YbFPy6Jo+alMedD2xJBGdt h3E2k19oc32gKPseEIEjciTX9SsLsOpXYovx7PvOJAAPV64KZbioM45RXs/LYQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628861414; a=rsa-sha256; cv=none; b=LqWJ1OLIXrWV9GgrP7JbecmD4ydlR1DFxURpkFNadWRWhKkkklzhxNIz8vOj+mujzUcW+X wXEgOrQPIl3c+sUg0MEej1lL8idIRNa1yP1u18ZGtrMhI8j4BZxcrxfJz0G6C1zaUA/W7c wmnKGO0eC0h4mYg6raedS2SvcbaIFeHptsQoZOkdYO/sjQsZwfrtGLIBjkcWqkPOsjwgNu Bkf7RwkPcQxGUGj+YpOuncTfZkWo0t9DxC9rKro3XgcSuGEsSnda1ORdkb9tbdeFZ/D+tJ PpTwTu+FxpQm+PSfG9FoyIBh6vfbHoXxbmt6YNns/TFxSPYreQsb0n4lhhweHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=Q+w3jXKB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=Q+w3jXKB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 5C70E18A7C X-Spam-Score: -3.41 X-Migadu-Scanner: scn1.migadu.com X-TUID: VMq48c2LoEO+ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Pierre Langlois writes: > * gnu/packages/tree-sitter.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Register it. > --- > gnu/local.mk | 1 + > gnu/packages/tree-sitter.scm | 98 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 99 insertions(+) > create mode 100644 gnu/packages/tree-sitter.scm > > diff --git a/gnu/local.mk b/gnu/local.mk > index 3f09b167b1..3763df0821 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -559,6 +559,7 @@ GNU_SYSTEM_MODULES =3D \ > %D%/packages/tls.scm \ > %D%/packages/tmux.scm \ > %D%/packages/tor.scm \ > + %D%/packages/tree-sitter.scm \ > %D%/packages/tv.scm \ > %D%/packages/uglifyjs.scm \ > %D%/packages/uml.scm \ > diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm > new file mode 100644 > index 0000000000..2c749dc0a8 > --- /dev/null > +++ b/gnu/packages/tree-sitter.scm > @@ -0,0 +1,98 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2021 Pierre Langlois > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (at > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see . > + > +(define-module (gnu packages tree-sitter) > + #:use-module ((guix licenses) #:prefix license:) > + #:use-module (guix build-system cargo) > + #:use-module (guix git-download) > + #:use-module (guix packages) > + #:use-module (gnu packages crates-io) > + #:use-module (gnu packages crates-graphics)) > + > +(define-public tree-sitter > + (package > + (name "tree-sitter") > + (version "0.19.5") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/tree-sitter/tree-sitter") > + (commit (string-append "v" version)))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "1qmb0sva28zv6r3c3j7xs9pc8bpwwhkb9vxxndw2zbdn9wkvmbmn")))) > + (build-system cargo-build-system) The tree-sitter package here both ships the `tree-sitter' command-line program, written in Rust, and the runtime library, written in C. I think it would be better to split this into two packages, `tree-sitter' for the runtime and `tree-sitter-cli` for the Rust program. That way, a potential future Emacs will be able to link against libtree-sitter *without* bringing in Rust as a hard dependency. I saw that native tree-sitter support was being worked on on emacs-devel list. One would still need Rust to actually use it, but at least it remains an optional dependency. Thanks, Pierre --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmEWc7sYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31ULTwH/R+uDT5j6mrUlYW6Q39UKilQ WzzPPUVLns8eSZmvDX4hJOxO6+qG3X1lprUOVNgRC4DKncMVW36ntYLqJDin+eFo Smh87p+1K0itjMuriiOU+foMfUxPlZ7oeHbrQD6y3cBmfUAy8J7G/UtZ+ZBb677b jycusQGkWXaahi6Llh81g+pZuFAp0+pYo33fhlsabAgI1HzuEUsHDXEWUgfJM2Zx G+vuyAmGyX3jpA/RXHtXXifB+dnhD4NbUsSb+edCLWUG2OcoW9PNakBhloo3O82O eHibETllS3pAV66m7gFrZ0pM5V3LdW7o4x0qzQXtYgFAbtPiJjNOqf2Gc4y+Zig= =hY4u -----END PGP SIGNATURE----- --=-=-=--