From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 29 06:47:06 2021 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 To: 49946@debbugs.gnu.org Subject: [PATCH v2 07/33] gnu: Add tree-sitter. 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-Spam-Flag: NO 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49946 Cc: Pierre Langlois X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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