From patchwork Thu Mar 17 22:27:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Higino X-Patchwork-Id: 37910 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 89A7F27BBE9; Thu, 17 Mar 2022 22:29:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8B8D927BBEA for ; Thu, 17 Mar 2022 22:29:13 +0000 (GMT) Received: from localhost ([::1]:38916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nUycK-0007jr-KM for patchwork@mira.cbaines.net; Thu, 17 Mar 2022 18:29:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUycA-0007jO-GS for guix-patches@gnu.org; Thu, 17 Mar 2022 18:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nUycA-00020e-64 for guix-patches@gnu.org; Thu, 17 Mar 2022 18:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nUycA-0007so-34 for guix-patches@gnu.org; Thu, 17 Mar 2022 18:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#53523] [PATCH v6 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 22:29:02 +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.164755609430227 (code B ref 53523); Thu, 17 Mar 2022 22:29:02 +0000 Received: (at 53523) by debbugs.gnu.org; 17 Mar 2022 22:28:14 +0000 Received: from localhost ([127.0.0.1]:55533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUybO-0007rS-Br for submit@debbugs.gnu.org; Thu, 17 Mar 2022 18:28:14 -0400 Received: from mail-oi1-f170.google.com ([209.85.167.170]:37706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUybM-0007rD-7f for 53523@debbugs.gnu.org; Thu, 17 Mar 2022 18:28:12 -0400 Received: by mail-oi1-f170.google.com with SMTP id q129so5131277oif.4 for <53523@debbugs.gnu.org>; Thu, 17 Mar 2022 15:28:12 -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=R74i4R1nK/8Ij7tK50medCLsS2v7dAZyjmv4Kz9MLj/5Ra6zenFN+tpl/tHc2gdRca zOv6AevzjQtBWXamc9jBgmNY1ykYtyq5YCSBjHA3Ah0W3OBlCNi61q4MZpsdhMcjx0+w EkVnLlTPdl0vDV6LCTegvu9VVfPCLxaSnxrykjmtAItvBe/PrNrGUITy+50C2bXduhwj KLqD9BCIPv3E8EIP79VfUm9aLu0v2HmdCgIwyigM/w9mBHyzp2ewz4nUOTjYTeK/HpCG tCVM9YeWXmE9ToknnxazaYeD/6arOQyTNfc4zti8UkBDxGcr81P+22oftq8qLNE/CkMS SS4g== 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=OM2wOtvYk+ijrqozY8Q+sh5ZrcRDibLicFkuj/CQ8sOxhGqOdh3jzit0WAvjuxlPjU s1D17i/krtZbewBF1Ea1AI9x3l1zEiZ/eJY8VZ33c3oISMRZ1b8nG9u7cX6lyvnuvPpm 2HkFK+tLRvD9+jZ2Yacljf/WvHJ0lDyaW0DRTtXFrIYx157Rl6aOZVVevuxSa/sKMIYc wFFtHO+eBCMzuoN8HgKwA0FpZc0cWrgMyI59I/ETaMQBLrLxJLTY2+R3Kpm25/tCLPST DK594Rg32gpI8+Sxn2EY6X7IRer1Rjmf3Z0kohbA5m/m+AW5kWc+kYoRrQioPgdxfkrW ZBBA== X-Gm-Message-State: AOAM530vhM8p/t7m8ZlV1/cfGHLn5qQVff/hj8p4xKe2synRkNqXQ3Mf LcCYSaZEIJE4HEFxT2FMaqd9PRp4wPHuFQ== X-Google-Smtp-Source: ABdhPJw+MYLyQRQ+dNsnk2D1oiYDQ1/nQkVI5TV1EcoYRVKA+N9njvBQzbYEY4H+7GITl5Zm6Wh62Q== X-Received: by 2002:a54:4099:0:b0:2ec:d31c:481d with SMTP id i25-20020a544099000000b002ecd31c481dmr3073309oii.7.1647556086199; Thu, 17 Mar 2022 15:28:06 -0700 (PDT) Received: from localhost.localdomain ([2804:7f2:2785:9515:6317:5895:57ed:345b]) by smtp.gmail.com with ESMTPSA id kx3-20020a056871400300b000ddca3b6a95sm667476oab.4.2022.03.17.15.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 15:28:05 -0700 (PDT) From: Luis Henrique Gomes Higino Date: Thu, 17 Mar 2022 19:27:54 -0300 Message-Id: <1e4edd37cfd4e6724ef6b65547da01efdf023d71.1647556069.git.luishenriquegh2701@gmail.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/text-editors.scm (tree-sitter): New variable. --- gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) base-commit: bae2201a8ddf789dff3f625327f5b2d0a686bc77 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)))