From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 17 19:04:33 2022 Received: (at 53523) by debbugs.gnu.org; 17 Mar 2022 23:04:33 +0000 Received: from localhost ([127.0.0.1]:55615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUzAW-0000P1-Lr for submit@debbugs.gnu.org; Thu, 17 Mar 2022 19:04:33 -0400 Received: from mail-oo1-f46.google.com ([209.85.161.46]:37425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUzAU-0000Ok-BP for 53523@debbugs.gnu.org; Thu, 17 Mar 2022 19:04:30 -0400 Received: by mail-oo1-f46.google.com with SMTP id p10-20020a056820044a00b00320d7d4af22so8322933oou.4 for <53523@debbugs.gnu.org>; Thu, 17 Mar 2022 16:04:30 -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=nlILLPkOfjbAhItWNuaF798Cz2bIU2xJ90nauoz+G6+wkAT7mVPv7Lyv0XBL8QFP3K HrdHawDJ0id+SYkikJ8rK48JPh2rYSIASAGhtAZitjXEF7KWgws92iQr6T0u5nK42CbR Db8Dt7CQjWGw4P+xLkWQC2+r+fh4BB+wXUfM3vB8kVny8Ze6KD+KBI+Z4u7Pdnf02ldx lRmN5sKi5d+196o4HDjlbtAToY+M3qeCNoLbUtxBT7Q3Bb5Noh9r1k/tHNqgucIgC9Ip lcGTt4+h0wtgzKm3ASHU746hwgc9FQDdfsHNT8RUD0fjhzQZWtsYAo4LZir7GDfs4LHU OwWA== 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=yeQxjq3Pou8Jht2FWYWWBZ+DnTajnKfPz3pQGlwLZ9cTN1QrgltFh5s3wavGT3JUFV Xw6VrQtjG51l7869S5gQqoNU+IHTLaLiyK3x9fmrjuMmynMg3hJ/qQR69Q5zftKh96h1 tJrI7c65ov2ntjvtYHS/fZ9qNnd//k8Ufou1xpoQGcr/KU2s28sO88ViQHPLAjpziWJN JYv4eyl2UFnmFB4mmDmPquj0LhqxxbebgJ+O5LJAD3I0Ta16RnZhKiO6fB5FC6wlvZUA tfzS6Abgyw1V7FDo76hW6Vq5Tr35SLOo/0CwXN/dQa/vCyL0N7G52VpaM6nzdR5eGKyg jY/Q== X-Gm-Message-State: AOAM531GobTh5DsC1lzswChOC+JqdMf+fC6KVXl1QGjPTw6xUQQC0bMJ IdlCy8+cUVxishCVW1dOyzB/c4dGaselyg== X-Google-Smtp-Source: ABdhPJzEJXn7eMmrgB8vo9tCwcmWlGkupfxbhoOK0KHwc+/E5fzpmV2PntIMl+HXHOUyVRo4OBJfuQ== X-Received: by 2002:a05:6870:a78f:b0:dd:d5a3:767f with SMTP id x15-20020a056870a78f00b000ddd5a3767fmr89781oao.283.1647558264389; Thu, 17 Mar 2022 16:04:24 -0700 (PDT) Received: from localhost.localdomain ([2804:7f2:2785:9515:6317:5895:57ed:345b]) by smtp.gmail.com with ESMTPSA id m17-20020a0568301e7100b005b256697d7csm2977849otr.72.2022.03.17.16.04.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 16:04:24 -0700 (PDT) From: Luis Henrique Gomes Higino To: 53523@debbugs.gnu.org Subject: [PATCH v7 1/2] gnu: Add tree-sitter. Date: Thu, 17 Mar 2022 20:04:10 -0300 Message-Id: <1e4edd37cfd4e6724ef6b65547da01efdf023d71.1647558246.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-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 53523 Cc: Luis Henrique Gomes Higino X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) * 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