From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 UGpXL8NhQ2JbkwAAgWs5BA (envelope-from ) for ; Tue, 29 Mar 2022 21:45:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id yKr2J8NhQ2LrXgEAG6o9tA (envelope-from ) for ; Tue, 29 Mar 2022 21:45:07 +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 3083A29731 for ; Tue, 29 Mar 2022 21:45:07 +0200 (CEST) Received: from localhost ([::1]:36372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZHm6-0004nw-BE for larch@yhetil.org; Tue, 29 Mar 2022 15:45:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZHl5-0003QK-09 for guix-patches@gnu.org; Tue, 29 Mar 2022 15:44:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZHl4-0001Al-OA for guix-patches@gnu.org; Tue, 29 Mar 2022 15:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nZHl4-0004xf-Lb for guix-patches@gnu.org; Tue, 29 Mar 2022 15:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v5 01/27] gnu: tree-sitter: Move to its own module. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Mar 2022 19:44: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.164858303018861 (code B ref 49946); Tue, 29 Mar 2022 19:44:02 +0000 Received: (at 49946) by debbugs.gnu.org; 29 Mar 2022 19:43:50 +0000 Received: from localhost ([127.0.0.1]:33567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZHko-0004sp-Kq for submit@debbugs.gnu.org; Tue, 29 Mar 2022 15:43:50 -0400 Received: from mout.gmx.net ([212.227.17.20]:60219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZHkm-0004ro-Pr for 49946@debbugs.gnu.org; Tue, 29 Mar 2022 15:43:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648583018; bh=1uN7yqkLMJFSJMce8g4LmU+W/9vHzsYy5Cqr3mTmdoo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=e0pRO3BGM/it6WjEtOVHsgUIma1GT0QanKdomkrDy9ZVmJI7KpcVtCfypMO92ed1e tL64Rt36p98VhGoB6akKk7dQfT7+n2WLNyrZebqqXrKUAZ89+ZHf4buSiPFYdBEAeZ DW3Bz1XtnrSpAt9v/O0On05edVV5s2AYv9t1UZXU= 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 1MJE27-1nJ0BV2Tet-00KgvP; Tue, 29 Mar 2022 21:43:38 +0200 From: Pierre Langlois Date: Tue, 29 Mar 2022 20:42:52 +0100 Message-Id: <20220329194318.6106-2-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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Wq7OxtBNypThL7aFJcyBghZvD/JOv3lNqu3KNdUc8YFZ1sSpdfs olDezGEsenX+AyEGYNtsSQNb1eCp+WMhsX9QhQAbCocao0Bj0wKD42OmhW/yLH3otMhVmH2 Ik0M56rg6TVsbdUCKeVcJ1Lm2L1LTVGHzRPkUKCnds9RfbN01koX+oXC8MScK7pqrFnOajt QFLFw4UnPuB5Ca8hmMB/w== X-UI-Out-Filterresults: notjunk:1;V03:K0:C28bLHJpfYY=:uvB+wsf6OMHOCxfwIttSQl U0qfL8P8SH5oLBSFriev3m2ANRG7580X0U8iWJ9KRACPazpzRUqZad3e7V0Wl/M05HYJhArZ5 kvh72UYvpT3wdGORzdFc7tTQt9oYiB/01lpi6zTja9QcYPsn7VEzDlAFNyU857xqOpNceNTaB P4HJyi6hnO1g3RzRRPK+YmrFBXE2VX6ULcJKhO+lUYsxkCzxWk+Wr3MJk2MYH5V1HJEHB5dh1 v3gNyqIa/iAb8bARmlUFhhM2SZnVfdE+JFFC6fOmlHvzhDwmXXgBZz1dgVFQyMQ5/zydfQ5/k yH9zN3nOwxwSyyTSiEJ+PkYT0dT3qb04/hD08q+hKCH/Dlq/tkNyf4MkpLGDK5BINBJAkrWsJ 9uWuXDarCDyZJanroBBa3TAEiIbA6jfSHdOyaVu1acmKE/vs2v5j66fmKfM9tiq5ew9Kyb1gE 98242Gpbw5E+kgcQZS93TmE8oniiAo7dmh0bNyTmb7xwmCIfyKMEB/2qeOHm4+Z2HVfDX4IYM MZXITlqCZVDLZOEJXUerBX+jKO7LAgXKtVx0oP+5yTsgq43Cv2tH0XYrd2sNM0MkWb1X/Iuh6 lWBWeJ6V6UmCLeAg7/TtmKkmPPFQnX+jR3JJJDVBD5ib7eTMw9BeGz5VYHCde5ag0qbsMLR1n mdivp1MlonHPiIu/Hz1pFFI0430GFHxNxY/iat8Xm5U9iDv710NLWgRgIYkwDzcPZJyjZQDL2 IO3utJzVqP09yurkRKj7ZafxyxBqbOjbxuMIctoSyUxHBvx7q4gDVEhhvTQITeoZCoTmcwNJs Rn+SoUXtW1jfIjc0VBHIfOGdDKl9AyHlfwfyR+8ewA0Gkfkf4TTs++Z44UCY1sxMNU6zMWiD5 xOx5SJRY6VEBWZ7T3N7tuL9zKZ/+e/QPG1zBIQHM4XASXmmbhFNW6C4wmI/YBsun27QErNUal y5gP0GABceWji0q+Um+an+SeLrvCsyAKcpQ6sRPBMn1Tr6GNgWX11kQv7o+Kgw4/1Hm7QndOI 4+YWfuhDpmLLmbI6hneO5FoCosISwi+z0xyQXhiP3LZyeBtjRvWD9N8XwycwLpSj0yReFVT3D d1zQ0mgQq98YC4= 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=1648583107; 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=gsA8EZtJ2/lx0DkTnV7e2Hh9TGk6jTmv2xbLNFtUn+o=; b=piY/n4JaDZ9WV0c/uvohh2qNfkMSxKucYtQqBvyE2oU/KL/QUpsnIARRsAp3u2befqoopT 0PfW1ho+LCzQMtjQYVoUPtkmFJIvHlf7I/xoE1DWz7QpuwOT92bvJMif+oAPnXjo3aLmfg KtzxDN8jh03a96pK7izmTuDW5MxOs4YFdthkvg3DYEys5WaPbk4Pm4G435OfTQ5/uiTeNR eRo/HrxMPyHdUdwwdlGEucGUPG+6PVH0YXa7lIuU+0+cLwNnv2jTSOMccmm+PZGFpetnta pEsb+fzYGoTGankFhqvzaiwxPms70WSs6iKU3xdpru/6DjDY/wyJz3VksT+nwA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648583107; a=rsa-sha256; cv=none; b=S7O53BwHt4Y64/hzrGp62RS859iFD4z3SUxecJVMeXyps1CIEEQ5aMXJnfsHhZMAy5JmtJ 8hFwm00h4+0paHqutC0jeP0jz/y1sx9BCNA1tIgXY1xrRR8rEr+e6QTJ8qGFDjsj7idJaZ VTV20S3Ict5PQEJGob1z1e72CB3vAx3wB4OCHtx+aEL8ku6EqMJEZ4pfYej+9DsPrdGCsp W4+HmqvH3l/p97GIwAcMAX0UaPk5b5ufd+83Ca741L0798xlGlksLh/vxwokhQx3UQUKOy cVW8aW16UnpwvKY6Qvifnlw6mUkWck/ArErCKK1BK+UFJaQgfVanTQFdzf4LWQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=e0pRO3BG; 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: 6.13 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=e0pRO3BG; 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: 3083A29731 X-Spam-Score: 6.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: rZu07NQjhshc * gnu/packages/text-editors.scm (tree-sitter): Move to ... * gnu/packages/tree-sitter.scm: ... here, a new module. * gnu/packages/vim.scm: Use (gnu packages tree-sitter). * gnu/local.mk (GNU_SYSTEM_MODULES): Register tree-sitter.scm new module. =2D-- gnu/local.mk | 1 + gnu/packages/text-editors.scm | 52 ----------------------- gnu/packages/tree-sitter.scm | 78 +++++++++++++++++++++++++++++++++++ gnu/packages/vim.scm | 1 + 4 files changed, 80 insertions(+), 52 deletions(-) create mode 100644 gnu/packages/tree-sitter.scm diff --git a/gnu/local.mk b/gnu/local.mk index a704161abc..03972441e6 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -587,6 +587,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/text-editors.scm b/gnu/packages/text-editors.scm index 7cbad042c9..ddbfef3e77 100644 =2D-- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -63,7 +63,6 @@ (define-module (gnu packages text-editors) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages haskell-xyz) - #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages libbsd) #:use-module (gnu packages libreoffice) @@ -1167,54 +1166,3 @@ (define-public virtaal provided by the Translate Toolkit, including XLIFF and PO.") (home-page "https://virtaal.translatehouse.org/") (license license:gpl2+))) - -(define-public tree-sitter - (package - (name "tree-sitter") - (version "0.20.6") - (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 - "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d")) - (modules '((guix build utils))) - (snippet '(begin - ;; Remove bundled ICU parts - (delete-file-recursively "lib/src/unicode") - #t)))) - (build-system gnu-build-system) - (inputs (list icu4c)) - (arguments - (list #:phases - '(modify-phases %standard-phases - (delete 'configure)) - #:tests? #f ; there are no tests for the runtime library - #:make-flags - #~(list (string-append "PREFIX=3D" - #$output) - (string-append "CC=3D" - #$(cc-for-target))))) - (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 and effic= iently -update the syntax tree as the source file is edited. - -Tree-sitter aims to be: - -@itemize -@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 itemize - -This package includes the @code{libtree-sitter} runtime library. -") - (license license:expat))) diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm new file mode 100644 index 0000000000..7116a10ed7 =2D-- /dev/null +++ b/gnu/packages/tree-sitter.scm @@ -0,0 +1,78 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2022 Luis Henrique Gomes Higino +;;; 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) + #:use-module (gnu packages icu4c)) + +(define-public tree-sitter + (package + (name "tree-sitter") + (version "0.20.6") + (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 + "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d")) + (modules '((guix build utils))) + (snippet '(begin + ;; Remove bundled ICU parts + (delete-file-recursively "lib/src/unicode") + #t)))) + (build-system gnu-build-system) + (inputs (list icu4c)) + (arguments + (list #:phases + '(modify-phases %standard-phases + (delete 'configure)) + #:tests? #f ; there are no tests for the runtime library + #:make-flags + #~(list (string-append "PREFIX=3D" + #$output) + (string-append "CC=3D" + #$(cc-for-target))))) + (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 and effic= iently +update the syntax tree as the source file is edited. + +Tree-sitter aims to be: + +@itemize +@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 itemize + +This package includes the @code{libtree-sitter} runtime library. +") + (license license:expat))) diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index bc5e36c6f2..f2fc39586e 100644 =2D-- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -71,6 +71,7 @@ (define-module (gnu packages vim) #:use-module (gnu packages tcl) #:use-module (gnu packages text-editors) #:use-module (gnu packages terminals) + #:use-module (gnu packages tree-sitter) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg)) =2D- 2.34.0