From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0NBiM8KYBWI6RgEAgWs5BA (envelope-from ) for ; Thu, 10 Feb 2022 23:59:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id bZvUMMKYBWIDNQAA9RJhRA (envelope-from ) for ; Thu, 10 Feb 2022 23:59:14 +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 68ED533C79 for ; Thu, 10 Feb 2022 23:59:14 +0100 (CET) Received: from localhost ([::1]:45726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIIPB-0004YO-Kb for larch@yhetil.org; Thu, 10 Feb 2022 17:59:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIIM8-0007jp-6Z for guix-patches@gnu.org; Thu, 10 Feb 2022 17:56:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIIM7-0006JP-QX for guix-patches@gnu.org; Thu, 10 Feb 2022 17:56:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nIIM7-0000wy-OP for guix-patches@gnu.org; Thu, 10 Feb 2022 17:56:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [WIP PATCH v3 04/26] gnu: Add tree-sitter. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Feb 2022 22:56:03 +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.16445337513540 (code B ref 49946); Thu, 10 Feb 2022 22:56:03 +0000 Received: (at 49946) by debbugs.gnu.org; 10 Feb 2022 22:55:51 +0000 Received: from localhost ([127.0.0.1]:57520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIILu-0000v0-GS for submit@debbugs.gnu.org; Thu, 10 Feb 2022 17:55:51 -0500 Received: from mout.gmx.net ([212.227.17.22]:38107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIILh-0000rv-Vz for 49946@debbugs.gnu.org; Thu, 10 Feb 2022 17:55:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644533732; bh=bEW4VxjCy2q9YzVq85N2wAtsCantmvSwlDdF/UdQWPg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=bThhCvl+MLWNf2DFnAH+V6nVvnRzW8SXEGGpFCvrfNA6rJ0uorlzVtMDze+cmoKWg bPK9VfBh4dE0bT1QQcv/1Q1PvXpBdW/9FX2QC181+zdNZO4Iad66ijKO8p9roXfS3E /ZokyTrwY00nGYL5EaNUTfzJRMxA0s3LlfFQ13YE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MHoRK-1nUxG60FKY-00EtKj; Thu, 10 Feb 2022 23:55:32 +0100 From: Pierre Langlois Date: Thu, 10 Feb 2022 22:55:05 +0000 Message-Id: <20220210225527.25189-4-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220210225527.25189-1-pierre.langlois@gmx.com> References: <87leyinxly.fsf@gmx.com> <20220210225527.25189-1-pierre.langlois@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:oG2glCxYIr3gAB0ZktQkvjI4GpMm6kG9+wRy43lnio7MPqMZ9DU 4rLCa1nEYPkTCc4w0E0vz4SGIim0YY6t+6RPJsGnMdcIpk5DCM8JG2T4z+v1XjH70L+N1hg qoUFJHdK4hjzYjW+K86R7OUjT1uT8Z7CsDSpPWBSL/cewnlHyjV8IHL1y4mXOxTb0GhwQoM ORJo9s5ZLH4IdSHFtDQ6A== X-UI-Out-Filterresults: notjunk:1;V03:K0:h+vv0Pjf1Bs=:xLa1Geg2cMc/JFD1iY/HY3 ggcgWfifTC+3FQrkqnFdxAJsed7cVmsN4dUmL7vflSFIC8Z7kYWoKB6Iaz086GmgYc3baAXua cGDeGyyD4IfDyl36dMKTp4A+u6zGRYPzgCSdfbCg/HqKUFHmS1N/9HuUv7EiOvewZMRSQ2nyw 18Ae6aNvRHCfe/bpznDc+4yzZSSLynISLWWu4Xt5O2N7zvD2NriyjWiYi1NWrT1Fo5KvXV3Qm Lys2KT2liK8Kx6sNQcge0ZAcoKCBu2in1FgnNLWru/qqcznQcIhxnymQD94ozih5GyGDfhW4u nixi3szdUB8pZ3m7Ey7HpnXE1YOacVcfkxPESy6uq0rqKBeDjaEdphv+yenms5E1/iWrc1TTK wXqRiUnL8jOcvxUPgHjpOm5osX/MCK6JZZlKZd2PQBR8MBMnkvT1bUUUeuXMJhjI+qdUxYOLQ IV4oS1q4KfNzZN1SzTUdEPFug+zzrK2IMX4tGEOrDhD+/qYKO/G491V7b9U9R7UPleRZ/uqPb l4C21eFbyMxoxfKpKbrvn8Vnx7EqI3YF5tXH/qK9mUR8GT7MKHqWhqXNHOFqULhM0955KxdKf lTzCI6SHZSuZiss0iSmGKdEf6BBBpetOlQUCH8dryTzWxZbAXNGSgdXgLCzs2w1OBoHaF2Qw/ ldA7uKac/Xke5ZQUfBMCRvGdd8+iI3+Ji7FcROUk2NI6F4NkrFKTm7qGD+p3S3XVKt4F7XPiL Ol0CU7Inf7V53pTSeARMu+39VHRCC42R99bFAGNeRFOGUBaM9/aasBQ0R3A6buafqKLMVa7CG Du+nu0tNdxq01+3rS+BiEGwRZ0x3aFNG6Ct7Njju2foY5u7Q7qXar60YgDSsprq5lrqf774Wb P6LYgDMVwRzO3er33EvT2KX8PgonvgrN/CFmWE7X8PHsr3KSNdCu4hrjRS/sXvltm2YxRKYO1 zEmLwomZaGq81rfrdVjjPKRvTQgZQl/CzV13vBSJ18wnzelQXv4pEHxSPiF33oolU/GXzdEnC 1tXjCr2FyRJ4TYppqlzlxWLZWyVWOrxE3YY/Ug8WgUW16fC/2H7nChL8oiOaVDXcVgvJBSwsI yJkmzj6Ui5zA0w= 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644533954; 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: 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=uX4Ti+aDvvV91UW1ibuFTAjI6EsMsNVsi4MxtmBlgBc=; b=gMyTvqHCwT5jR+IRDyxduGXihGcQRZ7M8IhT8hiZxbhR5cWN+KOFkhuDe708L3o125iizj p5Tc/dcvettywGBPRORGY7Xc7/qdnYR8fLoMt5nmIsNahNQGd99yiH1Iaaf9z88amY7eNJ XMW01iVclGEl4F86EIE9l/YImaSiHNHn+r2MRtz0Z+sY4pGqCXjXM4jtMZZ6ISr/Auk50A dhndUle1ULsQmql109WDmLN22NZFUR2AuWiBeUe2QPDO7kzSiaGfjPRYG/zLeuvJqk1d1U lyB6FjKAJSnf6cWAFNqN2VXLCWb3sVzD/n+2Cqz2rwF+Mpx1aFBGN/5FNl2u9A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644533954; a=rsa-sha256; cv=none; b=bQpkCGePj/PWu8kAl7nx7ulRerdWIp7Qgw0fbOxKirWCjXqrz4Xmq5BgYp0TducYEcfNaz Tw573PHFK3W5/IgoSjiGZG3oGGItjY3PBmbx9mCZn8g9R4zSVD2RnCQmSVYGdm8xKNSgEY QdH5yxU1izAuJpknhjJ2S0TBoIGprWgggpXxctnUG5Flmq+vn1PZWQEtrsEYY3MKiJ2enw IFVYo+0GfkELIewNqi/r3cWqYDPR0tCsy+55v6ACm8kgRL5uZ1kZbqXpFk6T/nXJ3o0Y/X Ox6uDzy91cqPNk/nqxAVhbjfi9Q+x9DF/Gb/p3Sa3o2xOHYxsoozVzDOMiop/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=bThhCvl+; 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: -2.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=bThhCvl+; 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: 68ED533C79 X-Spam-Score: -2.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: mvQI/GHACMPN * gnu/package/tree-sitter.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Register it. =2D-- gnu/local.mk | 1 + gnu/packages/tree-sitter.scm | 76 ++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 gnu/packages/tree-sitter.scm diff --git a/gnu/local.mk b/gnu/local.mk index 198c8f64a6..273d80a9c2 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -584,6 +584,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/packages/tmux.scm \ %D%/packages/toolkits.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..e7d2ce113d =2D-- /dev/null +++ b/gnu/packages/tree-sitter.scm @@ -0,0 +1,76 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2022 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 gexp) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system gnu) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix utils)) + +(define-public tree-sitter + (package + (name "tree-sitter") + (version "0.20.4") + (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 + "1yldgdbf3l5l4ki52abdf81nwkcbvg219gwr3ydcjwfsg7hf7zhz")))= ) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ;No check target. + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'set-cc + (lambda _ + (setenv "CC" + #$(cc-for-target)))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) (lib (string-append + out "/lib"))) + (setenv "PREFIX" out) + (invoke "make" "install"))))))) + (home-page "https://tree-sitter.github.io/tree-sitter/") + (synopsis "Incremental parsing system for programming tools") + (description + "Tree-sitter is a parser generator tool and an incremental +parsing library. It can build a concrete syntax tree for a source file a= nd +efficiently update the syntax tree as the source file is edited. + +Tree-sitter aims to be: + +@enumerate +@item General enough to parse any programming language. +@item Fast enough to parse on every keystroke in a text editor. +@item Robust enough to provide useful results even in the presence of syn= tax +errors. +@item Dependency-free so that the runtime library (which is written in pu= re C) +can be embedded in any application. +@end enumerate + +This package includes the @code{libtree-sitter} runtime library.") + (license license:expat))) =2D- 2.34.0