From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iLdOJkxnK2HacgAAgWs5BA (envelope-from ) for ; Sun, 29 Aug 2021 12:54:04 +0200 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cI8aIkxnK2GGVgAA1q6Kng (envelope-from ) for ; Sun, 29 Aug 2021 10:54:04 +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 aspmx2.migadu.com (Postfix) with ESMTPS id D4EA51D6D9 for ; Sun, 29 Aug 2021 12:54:03 +0200 (CEST) Received: from localhost ([::1]:45224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKIRt-0002Gx-Tb for larch@yhetil.org; Sun, 29 Aug 2021 06:54:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKILJ-00067I-St for guix-patches@gnu.org; Sun, 29 Aug 2021 06:47:17 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44072) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKILJ-0001jA-A9 for guix-patches@gnu.org; Sun, 29 Aug 2021 06:47:13 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKILJ-0000ID-7S for guix-patches@gnu.org; Sun, 29 Aug 2021 06:47:13 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v2 07/33] gnu: Add tree-sitter. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Aug 2021 10:47:13 +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.1630234026994 (code B ref 49946); Sun, 29 Aug 2021 10:47:13 +0000 Received: (at 49946) by debbugs.gnu.org; 29 Aug 2021 10:47:06 +0000 Received: from localhost ([127.0.0.1]:55595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKILB-0000Fd-FN for submit@debbugs.gnu.org; Sun, 29 Aug 2021 06:47:06 -0400 Received: from mout.gmx.net ([212.227.17.20]:38845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKIKj-0000AE-2L for 49946@debbugs.gnu.org; Sun, 29 Aug 2021 06:46:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1630233991; bh=Vgh2eZkelgO2F9SuT/oTcPELfMcCqST1QveMvJpfIWg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=ZZK/GqVPAYj8J2QSZJ4t9C1lkaPi+tDsXhatCF+kLQpQF0H0MC5xzQzZFBEs/gEvR GshQFjLwQT8Uh+SLlsRnU/eEDKGTuMBXCGZ1PktQDv3r2fPKyvdP0iUBBemrdXz0Kp O8XdTDbcZac8+P1lv3j5hsUvkrGcC4tFZmpVGUlM= 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 1MWASY-1mUfYi31Io-00XfOe; Sun, 29 Aug 2021 12:46:30 +0200 From: Pierre Langlois Date: Sun, 29 Aug 2021 11:45:42 +0100 Message-Id: <20210829104608.3103-7-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210829104608.3103-1-pierre.langlois@gmx.com> References: <87czpwzg9e.fsf@gmx.com> <20210829104608.3103-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:R5Z9YDmmELd1123258lwBG5a0DFKovi6jPdYh1czEMFqNEnNu45 3fBkwCGLP2zaDdc5LBXYyX6ZGwm91MZo03lQ3j8OiV5qEOrrHDYUxGeRZaETg9rHrWf0Jbi Nam446eeqv3s9vlbbbpBMD0YV4CJmeZQkWTqzNen7cM4wXa9k1t2vrul8BTPAGSuyV3CwS8 FiDem/kuvi0V+H7DnBz0A== X-UI-Out-Filterresults: notjunk:1;V03:K0:wngC7+KKy94=:o8uEbLr/9Uqgs0Iv2b7jKd 1qB8GlQWxW7JxLicYS10MxKHSojr9fjgnX27DcZDHqW6SjfQdkPFfvo5H+6JHpIt2shOx/IRv 6EMxxKReT3mIj9OrTYBlbVqSwBiA0mvZ+lz+yq4HCLjsecDdVsc4MnWt8BPgMZNrCB8+hyCQ+ jsfF8Z5neYUgTKe1cxTEOZt0mtt9GpjBvulQXRDtBPBN3giW7aKcf5qJJgVgFLXVmhGnmlsSn npBBUJQqa9BDkAjgflwIsVRnbWzB5GTmhAMQ+70DcjMkn4sl6puA8sVPmMy9i7Kogk6SCPgps moSYbSTcvq0ReSY8UOuXXJ6rXTE18rhUO6i9PKxrP/fp18HXnFrybm8uQUwGuJVh/pswvnNzm VT56rUjjm7mAfMN1XqbZ8lP8F9BROwMluDYwwOSO6wtTSSaUvpPjY5S9TUOVDUfLqLf07SyFZ tA/0jWTzHdfKXX9wOge3fcmZAdaKrzebKBFzG5l8KbGBip715gH7iOXZ/3gBx0+r/iz1bQC0a R96Bw5G0Wcows/bl2pPkaRSgTccEXchgMAcxq0ySz5lQPgZDds4PESGulXMQR0TUbN0jAn2yT mC20kr2XmDQxUnadBp714F44PL5JCLHQFPpyJuCUMGuR4Ffo4ORG0sQGy21mgSGehAT8uQzyv aRTUIJZwCJWuSZ0hGjqPPL8oRlU8jp4vR7n9JTbdFBgyXCdeyJor4wRzR124P/vWGytirNRdl il2EkIZDYn+Bo+SOWXosglIsWzqVqdYGlkOYOJebfcQbDxmdpztINMNU59Yo4/8Sf78VGWboL ER+C/RJBexuZylTH5dh9ZUWQ/W7IjS3OpUoiVCLgsxQV44v0O4m1zvvMT9fDKv3qhZluDoner XvRagls9wkWwPy4nmIRZa2CGe/+cYdguzJ72jXzfHTHrAoumhXVd7x5sbtAf7PYXrpL0LOLRT Znn7ZLSkCavbqfYyvQveb1ppeJkCCXkThnyDSm0AQCpQBrN69wZBfgmFIBYYpUL9rP8fm1GWA 2XsC81uW6esQjF/8b8VaAUDKmksanVy2+CTNe/eNdZU56W8zMbrGF4PkXof5CqTCQ4DD9zoEl Qhx8TlMtra5hQM9RDIHRWpofyKbk7igwQjWRZiZ4ucG3guOFuwe6Tqqhw== 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=1630234444; 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=OdPtWBepQXKBoZ4d6RYE5ZPGE8JxSmMU2iuXE6UbRso=; b=Vln4GxS2BDBZRlv7Xnq7syCQcf/nI8kptUaeOb1jhyLrX5Si/WdSjhu3vVm3BMceokkMhl oTuhwXH7GRrkiHRRfG3+qzlhHMkcptldCkKOD1yWhviHRZ9mYV6pw8C+pKwUvIX8YHxzf8 gw/DBh4RqYqOIbwTb5ti8G6LY28nPtOOg8d/JPG23IjUsO/+crMQVn82kzR1VKLGAKKpi9 OYo0yabsyI23LdO0vqOomGb9MK9SnirxGJHs0sk8plQTpvwwl/GUQ1cRrrDvhLjpjGbGx9 bVNV8c3cigYQmD3gyFiOSgFHTq2Rdk9fU7pZl/8JXxICbLsviGBx+FO9OyeSfw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630234444; a=rsa-sha256; cv=none; b=k+3y1ucDNAcDybZbwCX2coBgmZZ9mgq6F9ZePtlE5kZh3JJYuQrqLhRxZnjN7Icxu7Sa7q dYiSe26UrEMYRq1dCDhMS74893dNrZbazFcZFkN6X7Q+yoOLCsRaaGscnzDFJf4bbpIE/X rIupPQn8NBUW+uoXu2ggeuXjZghoLbdW6vyfx71pbYmuGhCKnJQjODnvncGTAPXZVO+bEc phavtlKYpfLezbneFeH+tv83STBYyrf3vjjw5i6vJN8zmPli4QJwOR0hcY3ZZqnZJqXek8 uypnwqi2d6b8nIsCLFsVveQq4IqTQQDaN9KK5tjojuX6GUu4AqCJeMCjRF3DJg== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="ZZK/GqVP"; spf=pass (aspmx2.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: -0.33 Authentication-Results: aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="ZZK/GqVP"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx2.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: D4EA51D6D9 X-Spam-Score: -0.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: KKMlhaZozxvf * 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 | 73 ++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 gnu/packages/tree-sitter.scm diff --git a/gnu/local.mk b/gnu/local.mk index a0da1a96d8..0315106c30 100644 =2D-- 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..e6e66cd447 =2D-- /dev/null +++ b/gnu/packages/tree-sitter.scm @@ -0,0 +1,73 @@ +;;; 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 gnu) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix utils)) + +(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 gnu-build-system) + (arguments + `(#: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 increment= al +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.33.0