From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8GK+G5I7M2JPGAEAgWs5BA (envelope-from ) for ; Thu, 17 Mar 2022 14:45:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eL5fFJI7M2ILXgEAG6o9tA (envelope-from ) for ; Thu, 17 Mar 2022 14:45:54 +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 BC17E346B6 for ; Thu, 17 Mar 2022 14:45:53 +0100 (CET) Received: from localhost ([::1]:39896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nUqRj-0004Bc-HH for larch@yhetil.org; Thu, 17 Mar 2022 09:45:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUqR4-0004BI-2H for guix-patches@gnu.org; Thu, 17 Mar 2022 09:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59592) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nUqR3-0001cH-PE for guix-patches@gnu.org; Thu, 17 Mar 2022 09:45:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nUqR3-0002QJ-LG for guix-patches@gnu.org; Thu, 17 Mar 2022 09:45:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#53523] [PATCH v4 1/2] gnu: Add tree-sitter. References: <98a6180737981490316bca8c03c787289dbddcb6.1643120885.git.luishenriquegh2701@gmail.com> In-Reply-To: <98a6180737981490316bca8c03c787289dbddcb6.1643120885.git.luishenriquegh2701@gmail.com> Resent-From: Luis Henrique Gomes Higino Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 17 Mar 2022 13:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53523 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53523@debbugs.gnu.org Cc: Luis Henrique Gomes Higino Received: via spool by 53523-submit@debbugs.gnu.org id=B53523.16475246809268 (code B ref 53523); Thu, 17 Mar 2022 13:45:01 +0000 Received: (at 53523) by debbugs.gnu.org; 17 Mar 2022 13:44:40 +0000 Received: from localhost ([127.0.0.1]:53487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUqQh-0002PL-Km for submit@debbugs.gnu.org; Thu, 17 Mar 2022 09:44:40 -0400 Received: from mail-oo1-f53.google.com ([209.85.161.53]:40577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUqQe-0002P3-Oy for 53523@debbugs.gnu.org; Thu, 17 Mar 2022 09:44:38 -0400 Received: by mail-oo1-f53.google.com with SMTP id h16-20020a4a6f10000000b00320507b9ccfso6448674ooc.7 for <53523@debbugs.gnu.org>; Thu, 17 Mar 2022 06:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d/ul6yUK4kgv7utX0UOMnNntNl+tdop8zNGTfL8t6H0=; b=VkbF6p5UpP/j903hRZguCCRR6glej96FgUTPcpVy+wXoxtdHjlJ8HNFRAp9zWnLea2 O0bepxOY9l9St3ZKdKs/CJeERBcrz2GGaTiKn84vNDcPUWa3ksUr/Tsjzy4h4VNt1xHR D5FpoN8hP62KVs2zS6GB1865QDkZzvJRyAsC2dQv1zNEED+i9xQNdyT5ZZa6RBu6DS3r OA4BEtukWlZ79QgwNADfkWXhfTbCzMozVGTXLp6kel3noeVS6Hv/b3i1gGI+IGVZ2nHy 1y2ntZh0BAykkTkjQDk9YPJsApLeccjw4fWFvxSkiH97ptzvtvuReyJlg3/cBTZjPSpQ WGTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d/ul6yUK4kgv7utX0UOMnNntNl+tdop8zNGTfL8t6H0=; b=HEcR2T0834Zihm6sEoz6AL0XOd4veJTyLTCDaL3HEtsVT/7s5tEq36S4SvxFQGlcVq cU2t3HUmOBhGd3pvHmVcDAh6pidXPI1cyjWs5TYJEjPcuF6PGA5YAon0wme14CEaJss2 E1emu/ODiOM8rU/fclALXiQYuxah7HUqmcrmT8mnGtJkL9rEX84VYcojsVXP924H/LxO oTFMtsFlmA2bBAj+sgHCCRWwJqqc3BL7HgvfTs1tKoyOPeMn7avwZAq5y8kdCXxscr7i gosiI7APMxkK0OWf0ITvyxycww9NXa55YslvJIPIAdVDFK8Zur7C1W0Co2HtW7Byjr/4 xSBA== X-Gm-Message-State: AOAM530lMJXCBd/D97AV0OVuWgi1CrK2iptwnQpW9parcUxim6jEBG/l YMs91kM4AKDUMfyDuTBM5RVPdELmGdHVmg== X-Google-Smtp-Source: ABdhPJxIaLzsGfLq+msONk9MBrUz1BzWSEtRDXvtS2ycIFIG86AHFuG5NqimXzgfnpO0n2KGiAdLAw== X-Received: by 2002:a05:6870:e997:b0:ce:c0c9:61d with SMTP id r23-20020a056870e99700b000cec0c9061dmr5290634oao.111.1647524670692; Thu, 17 Mar 2022 06:44:30 -0700 (PDT) Received: from localhost.localdomain ([2804:7f2:2785:9515:6317:5895:57ed:345b]) by smtp.gmail.com with ESMTPSA id d2-20020a05683025c200b005c93d78e1f6sm2517706otu.29.2022.03.17.06.44.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 06:44:30 -0700 (PDT) From: Luis Henrique Gomes Higino Date: Thu, 17 Mar 2022 10:44:13 -0300 Message-Id: <1e4edd37cfd4e6724ef6b65547da01efdf023d71.1647524617.git.luishenriquegh2701@gmail.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=1647524754; 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=d/ul6yUK4kgv7utX0UOMnNntNl+tdop8zNGTfL8t6H0=; b=m849EDFjQUts75+hq3FwbfmGl05i+E1cGvYZypT/tL6uyttaIUB2Y5RKNk5rysTDikuJFV zjLA15qMXv2VwybvuQ3ABFZ2pLGEVnpI+AsaLgBLusxWpB0LYjRmRca0hrh+JEa1jIEHCI NJoRmEVuESOIYSnC9Qh26VLHvI6tzG56/3xGrfQBVK5Fq9Vo9syl6/6a4523WxPnzRoVBg T3BJVzzxRAbK1HYLGn7wvuvSmRPxuFYbmWqfSbB9jsL2KgL7s9W+ZDNhBgCiVKQW+QEKI3 gm7Q0hbkSz7caVplnzwkfZ0RfDlOuqQCSMnIaI70M6gfRv/JFMdOYdxhg6sjBA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647524754; a=rsa-sha256; cv=none; b=ssobXVXag1262wwRNU1a/xQfjWgQ1SUdqAMWiR2F1FBGFS7vH3O8gEofPJpv7mmNOehRNl 4hSgp0x7ARF9IHwk4VW5u91OdQazYkxkFFyD/azHQdBz/OKY8fQohjXRzLwWOv3ny9dXO2 DosMdpDsifbn+hH1nstEVrsN+mfRP0m/GAp/9TguKdjRtJyO7F0alHG7rJMfAIbsfkQSYk Gxf/Pq+bXdrhciuIZLdpsdChmGy3m8hvy/ziumjwaOGgCFfTg5Ey2m4G2voi5eLwvcx4WJ fnxVmaSqX7ml4W5yPq5KeKfbt8cQ00paNN1tXzfxJzntN5oe9DbmPzcNOmzuFQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VkbF6p5U; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.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.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VkbF6p5U; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.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: BC17E346B6 X-Spam-Score: 6.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: muK5hNG6pfbU * gnu/packages/text-editors.scm (tree-sitter): New variable. --- gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 45cc61765a..d6ec000dc6 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021 Leo Famulari ;;; Copyright © 2021 Pierre Langlois ;;; Copyright © 2021 Calum Irwin +;;; Copyright © 2022 Luis Henrique Gomes Higino ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,7 @@ (define-module (gnu packages text-editors) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix build utils) #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) @@ -62,6 +64,7 @@ (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) @@ -1165,3 +1168,54 @@ (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=" + #$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))) base-commit: bae2201a8ddf789dff3f625327f5b2d0a686bc77 -- 2.34.0