From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uCTTLHQZgGPdrgAAbAwnHQ (envelope-from ) for ; Fri, 25 Nov 2022 02:25:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OMjdK3QZgGMqVwEAG6o9tA (envelope-from ) for ; Fri, 25 Nov 2022 02:25:08 +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 4F0C62734F for ; Fri, 25 Nov 2022 02:25:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyNQn-0005lT-H6; Thu, 24 Nov 2022 20:23:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyNQm-0005kS-9d for guix-patches@gnu.org; Thu, 24 Nov 2022 20:23:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyNQm-0004SW-1H for guix-patches@gnu.org; Thu, 24 Nov 2022 20:23:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyNQl-0000Nx-Si for guix-patches@gnu.org; Thu, 24 Nov 2022 20:23:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v7 01/32] gnu: tree-sitter: Move to its own module. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Nov 2022 01:23: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.16693393471264 (code B ref 49946); Fri, 25 Nov 2022 01:23:03 +0000 Received: (at 49946) by debbugs.gnu.org; 25 Nov 2022 01:22:27 +0000 Received: from localhost ([127.0.0.1]:60790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyNQ8-0000Jo-S7 for submit@debbugs.gnu.org; Thu, 24 Nov 2022 20:22:26 -0500 Received: from mout.gmx.net ([212.227.17.22]:38713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyNQ4-0000Hk-5C for 49946@debbugs.gnu.org; Thu, 24 Nov 2022 20:22:21 -0500 Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MZkpb-1pVC1h0M4d-00Wqk7; Fri, 25 Nov 2022 02:22:14 +0100 From: Pierre Langlois Date: Fri, 25 Nov 2022 01:21:11 +0000 Message-Id: <20221125012142.22579-2-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221125012142.22579-1-pierre.langlois@gmx.com> References: <87mtfi63ut.fsf@gmx.com> <20221125012142.22579-1-pierre.langlois@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:6WxYIqMF3fwzXWIk77MKVzNKTEVf65VP94CilXoaVldj95zpd0O VZAfcWnGGE4POzbaiKwqGiue2oTUrk2UGQ4/8uGLCKhpS0xJdCBXWNIiKHVa2AH4qfkm8hZ ougV/oCL+56k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wh11Uo0x K5gQXhkmD+AUWVK2BVW+A+9pfeU= 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-bounces+larch=yhetil.org@gnu.org 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=1669339508; 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; bh=O9YRYkUk/sTjZFJEKQy/PkEmG9Dmg2I+UkTI5aIIbGU=; b=Gyj786fFpev09T9VQ1LBSWF+qYGa7sJsC4qbMNaqxP2s7XN+Rs0K0LN/LdN9JWliqbX4LB grg5h9XWfqg+2sqCRRblAgjvpC2j19/xFcdpHUo8bAAJKLOJ9q5zIoxOh4zbVFbXJej/1E q03T68J7Rwf0ZfS8tpD3L8ghyK0R4JbHkrep++CeJKmGdG6+csKb6pMwzL187OO2+sJ89U 70Dwo1FCr2a7ATAoWlNKsWfghJSM4MySbLpqbBNJTHd+4Rd6Y4fclVlEdA82YkyL9G0w8N q6hiSaAJk01SElnHrmDhAuSqORYmyZx+Psvf+DTphlG3AyGQcWXf8gxPD+U6fA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669339508; a=rsa-sha256; cv=none; b=eBmOTnqDwUr7okTWIvcHwtlI4WYXxlFL7CXtLG5lzbxsZ9LhL4t507acS67l5ktnj7IZG3 hXcQGFuBjwXHJRDCZHLZ+vZnDD4SS2U5tjs8kAjccqnKOvfcQXHePy6ROYZMk33ZGdOsrj zdGByZzqrmVQDilQKoagrdb9YpBSRgTHwsorsOASgDqVg9fngxSQqrKT7Zk5upQZlATwzl AxpoSfozK84QOuLMCeye/1JatrUgcasw1Fchf+etqMbJ8qj+9O3PYsmA17XFK7GUVruJ5F l4doJbrajQ0d1ByAo5aSnvR2ij1fvIn50u/BSUXDcYfKS+iFe7u5D3C0k8HXvA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" 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.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" 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: 4F0C62734F X-Spam-Score: 2.92 X-Migadu-Scanner: scn1.migadu.com X-TUID: j79LYf/F0sOF * 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. --- 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 7278c50e4f..7d11f4bb27 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -603,6 +603,7 @@ GNU_SYSTEM_MODULES = \ %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 ed77113726..57178e7b87 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -70,7 +70,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) @@ -1219,57 +1218,6 @@ (define-public edlin FreeDOS as a functional clone of the old MS-DOS program edlin.") (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=" - #$output) - (string-append "CC=" - #$(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 efficiently -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 syntax errors -@item Dependency-free so that the runtime library (which is written in pure C) -can be embedded in any application -@end itemize - -This package includes the @code{libtree-sitter} runtime library. -") - (license license:expat))) - (define-public mle (package (name "mle") diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm new file mode 100644 index 0000000000..7116a10ed7 --- /dev/null +++ b/gnu/packages/tree-sitter.scm @@ -0,0 +1,78 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Luis Henrique Gomes Higino +;;; Copyright © 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=" + #$output) + (string-append "CC=" + #$(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 efficiently +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 syntax errors +@item Dependency-free so that the runtime library (which is written in pure 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 957f00a92e..0c44c3c114 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -72,6 +72,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)) -- 2.38.1