From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 aGo/JdVIgWLzQQEAbAwnHQ (envelope-from ) for ; Sun, 15 May 2022 20:39:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SF8fJdVIgWI5PQEAauVa8A (envelope-from ) for ; Sun, 15 May 2022 20:39:17 +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 36D6228432 for ; Sun, 15 May 2022 20:39:17 +0200 (CEST) Received: from localhost ([::1]:41286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqJ9A-0001Ta-65 for larch@yhetil.org; Sun, 15 May 2022 14:39:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqJ8w-0001TA-6g for guix-patches@gnu.org; Sun, 15 May 2022 14:39:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nqJ8v-0008TO-UO for guix-patches@gnu.org; Sun, 15 May 2022 14:39:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nqJ8v-0006b8-Qz for guix-patches@gnu.org; Sun, 15 May 2022 14:39:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v6 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: Sun, 15 May 2022 18:39:01 +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.165263992925275 (code B ref 49946); Sun, 15 May 2022 18:39:01 +0000 Received: (at 49946) by debbugs.gnu.org; 15 May 2022 18:38:49 +0000 Received: from localhost ([127.0.0.1]:50641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqJ8f-0006YK-AN for submit@debbugs.gnu.org; Sun, 15 May 2022 14:38:49 -0400 Received: from mout.gmx.net ([212.227.17.21]:54667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqJ8c-0006XN-Oi for 49946@debbugs.gnu.org; Sun, 15 May 2022 14:38:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1652639916; bh=FzqA3+dMOhc4Ql/C843wbq8n9u0a78NLSKacSKwkmDw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=idqm0ituAU5fIJjMNO0Xoqmxo+cPpR3ag6+x5cJL30ZAQ43YmAgQwtdNToEYokuhv NGOXp30o6izb7Nmuou54Ixz5X/Hyd7YnP4ePV591WSlLTzGwxThUQcnCo2ryyLrZbM Ilj6inIxmLU7l7vVHHbn1qJPduKWkU4ArJfFssEU= 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 1MbzuB-1nKovz2WCt-00dakV; Sun, 15 May 2022 20:38:36 +0200 From: Pierre Langlois Date: Sun, 15 May 2022 19:38:08 +0100 Message-Id: <20220515183834.18771-1-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <87mtfi63ut.fsf@gmx.com> References: <87mtfi63ut.fsf@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:XGTi3hdyBKWFDA5EzNRIN43iZYijCej8aPmPUR5YndNj7Z9rHpT wp0DM3vVOxQWDGbPmC006ym7fgJyTYfWiMyzQLTihE5ARNt+9FAkiApQm0wbacX+DlMM5ZA zyJ/eM8nY8eumG4vthehhe6O3DfmK7KvBBsdlWR0EawaW3uhSU03/7d0hFkBQUwIUUK5pP1 +iE2LNSrJuPXLVBtAPRew== X-UI-Out-Filterresults: notjunk:1;V03:K0:tuiHZGxcMA0=:AT5AdGClpxX5bCRkVcbEUx 8h4oj3MObfDOK0MglvDOWxj2TzgqrJ2hlGA/74dLsae/bqcpJgqqEGhfhjvhxwPUhnYrZ4FQE riv2JwfRzcVts127VrY8RlxYlxRpWN7nBIS0sa5u/Mm1rQ3sc/kOvj54BTrBawyvOuhfz/LpT RtDk11ngsosJ4n7dczP1dJzWSx/13CHSNVIpen10JILgXl0qnmo1nwj8hImuWZzp+7Si6Jn8L 4I90OUO9nKJTleYAXXxFEOXFUarwHBsAfNrju9CTeJpACmr9JZGE0EBYjfpNrzEboUndpHesC qFpPtCakUvMtXYjiYuheakUUBjk2RbnnGpEx5Rz1LSz18UYCQCklOzNHpj8Yb1mumb0icLnjQ 5DDibMgLbgG515zEOuaoouoVbR3bkMOfS148+I0C47J4/q8dbmSBcoSuNj4lwRUxfyvr+E2OE 0Wdeh/P6Y1+NpRdBGrYrey8oXB5FsE8ZHUJDp5KwvWkYrVfqEDUPpPkeRLx3mfSus9SmDoCgu rQI9yS5hdg3EwBYoU4VTVKwulgW+r4CatCesXhdRZ3B3sCmRM4QDI7S6WBWgTY2zfWlii9ns1 Svm6Va4QLLHITxFDfgx38PMws6calUrFRogSvSujN8ycX2p3rq9hvgmIMMVkK9NgGQZuNS2Qh dK8LohtS8QL2Hvxs1gRCnjL0tIXk0Yq1nl2LI92rgkT6j5syKtQxijRXDth0/8NajJtTabCw6 YMj05vrAa1QSZj/bvmv9BBzQANHJeP7yDbOpcPfGESpP+YMQN7hF83sp9PHm8G+mUNoTAZHn0 kmJC2eClPiW4RlXCHyy4rSSMkhDTMH7T9/OhkfZR2Pqwm4CmtE/vBUPi95wJ87KESCTZKa7Wq uNzkRGgFj/s3EoTQvXNP4wOcGujrzowrrjfPbrXHYgs5rmsx4d+pnlgcz8fs+coIiWOM+K7B4 DMtyCOxGzfJJg6aF8RM2zNBxQ9xX9TlI7ELVuizLdJOoIpPyWAPCJjmnW51oYmOJ4bIXpy4kU vcXClhoTSfMbcJLzGiRa0P/BPEx1bVeKtgvsPfN4OokTykaB5VG3hbNqKhFJvIkyYNdZ6qryb Mbbh2GTrU3pGQ4= 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=1652639957; 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=YLrx99UQfcu7+tVNesH1h3cr2pSpORrRj18DjAfSSys=; b=ED3MMc+6pg/Q8Eej6feb4zbCd23FbTxHZbCBh9yzL2vJesr0FeMXQcoJ+Fb/NfVCi8b5AA j2+86ybl/Z/4e02AUv8wVI3Bu23Tpp9JszMCuQryvcXn2rXFypGZyQodJp3S/T5A810Zuu HZC/OVQ0ZsUVWul9Dgok35aDNzfEX2o0FarQo57ooFqZQEaAheKbKVhMd1vUNkw/4M5/r5 nsl6feAQcbb5A2kDvO51NlZhZ2kpQXVFYRsJJPKNjO1jU30e9+pY0NKktx50f4T2bfxITU 5E9wOGWUsOMT4pAta1O/JNiH9EVCpMcObhUWGK0WhuGME+f7ece4s8CbkXmlJA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652639957; a=rsa-sha256; cv=none; b=oop2HxFfwD+ANJ7/3taWL9LaA8bNws0UjDqJiig1qwEXKxNzuuPyq/6WdHsi/5AF+NtFD8 cYJUW5Vt07t1kpOBpx755OlJf0KncF4T0X+D4+0YeRhnb6qLnDyI1/BGaPAUFv+rqeDY4p fBAuKdETMCX7P0pqIS7RgrdMv63LcgNTJFw429MxHY+UWue7z3IDy7WrkZt2Y73iC1z9SR 96TzEL+FZNAPfydGxAXDygwQEDKZqGAk0dLawGs7PCjIhgj/+A1J8enOaEiRdtPisGLF+m RoyRaHY1avIfVL966yEmsO8fnFsxKIrwIBFcHxRxoNuoT+NkOLOuF15r1mHyGA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=idqm0itu; 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.57 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=idqm0itu; 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: 36D6228432 X-Spam-Score: 6.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: E73LOktk1SIX * 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 cfb499915a..429a0b577b 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -589,6 +589,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 bb459933b0..c7f7697168 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.36.0