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 CAs2NLbQL2KWtQAAgWs5BA (envelope-from ) for ; Tue, 15 Mar 2022 00:33:10 +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 ONPqLLbQL2L6NAAAG6o9tA (envelope-from ) for ; Tue, 15 Mar 2022 00:33:10 +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 D919C49B9B for ; Tue, 15 Mar 2022 00:33:09 +0100 (CET) Received: from localhost ([::1]:49624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTuBX-0001mL-1v for larch@yhetil.org; Mon, 14 Mar 2022 19:33:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTuBS-0001lx-Mt for guix-patches@gnu.org; Mon, 14 Mar 2022 19:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTuBS-0002FV-5z for guix-patches@gnu.org; Mon, 14 Mar 2022 19:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nTuBR-0008Ca-T2 for guix-patches@gnu.org; Mon, 14 Mar 2022 19:33:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#53523] [PATCH v3 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: Mon, 14 Mar 2022 23:33: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.164730073631451 (code B ref 53523); Mon, 14 Mar 2022 23:33:01 +0000 Received: (at 53523) by debbugs.gnu.org; 14 Mar 2022 23:32:16 +0000 Received: from localhost ([127.0.0.1]:46959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTuAi-0008BD-Dx for submit@debbugs.gnu.org; Mon, 14 Mar 2022 19:32:16 -0400 Received: from mail-oi1-f175.google.com ([209.85.167.175]:37677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTuAg-0008B0-U0 for 53523@debbugs.gnu.org; Mon, 14 Mar 2022 19:32:15 -0400 Received: by mail-oi1-f175.google.com with SMTP id h10so19172513oia.4 for <53523@debbugs.gnu.org>; Mon, 14 Mar 2022 16:32:14 -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=NVpI4IpEY2/xoG3L5WRsptvdKGQCVRWDcu38Lzz9LXA=; b=Bp6qt77lG/YiIpBZz3/QSaNVtR00VVBrcClq8psKg6fWEBmFs0acrWfbNsijCGSbTa Hqke5peF35j/RP+RvL6ygli6QuWX0hgBFOuth5gtWGhINBHu/xsCLIwvyHXjBwFJl+nU t+zNf6aEuVPEFtUiJslxOQkj4OoOkR4buEdXMXuSunQGDgeLRiZoGL2AkMpdZKehBt15 pea1R1UTB2Pr2IaqYF52vx3wOCSwf+rRYGBz98D6tEcsmFlBzS3cptLjYhGqx0OgUkBX TPLEpZWQkE66hWe2law+cnjtOpyzOEJVf3923n4u2oF4v+mn3T9ZY5SfzfUZ2B7dkrwi ZNTg== 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=NVpI4IpEY2/xoG3L5WRsptvdKGQCVRWDcu38Lzz9LXA=; b=nQ2zlvDwETHmCBsveuru5AWWmcwr9Ai5jZ6jLSsm+QkkGVXinsjCybxiQnAyXVmKj6 iKlw9V0TBv/baIJWRZSdOZsWfc6NXSs89tw2ZTIWCnDj3T9JIVfOHWr0X/+OIAsE+t9l 8WnESntWd8+Q3X6X8f3ePwphB2b0irHBYU9+2QOZlpHwMH9v8RDX2QbSEhiyf2n6vJxK 0gZ1d69uuX2MeaqOG+hW31c411DxsPgiqG6+T6GPKHtN+wUhESoM8hoXrmMaPB/5oVJ6 MBh0mNP6lSA6ps1Fret6yMCJcnwaDFKdZ+yHeQcDdVx6AVzh0SYVmgVewUb57UA79l3p tqOg== X-Gm-Message-State: AOAM5323cSm2tXRU94Fu1CF2ucylfq+CcncQg06eedIa4OHql+EElIzO SKdnkIRQUJMdVULni7z81HXL9yM10HSuZw== X-Google-Smtp-Source: ABdhPJydiUBfVUa8sASUp9w0HSfrPxeSvnieFnYvG4D8Y9JV45t6egebu84GD603eeEWcVbvQQnw4g== X-Received: by 2002:a05:6808:16aa:b0:2d9:ca2f:8445 with SMTP id bb42-20020a05680816aa00b002d9ca2f8445mr695730oib.66.1647300729020; Mon, 14 Mar 2022 16:32:09 -0700 (PDT) Received: from localhost.localdomain ([2804:7f2:2785:9515:6317:5895:57ed:345b]) by smtp.gmail.com with ESMTPSA id o10-20020aca410a000000b002ecf2a4fda5sm2074240oia.10.2022.03.14.16.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Mar 2022 16:32:08 -0700 (PDT) From: Luis Henrique Gomes Higino Date: Mon, 14 Mar 2022 20:31:45 -0300 Message-Id: <78ed09339d88b859d34798faff950ea7a2d4d6c9.1647300645.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=1647300790; 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=NVpI4IpEY2/xoG3L5WRsptvdKGQCVRWDcu38Lzz9LXA=; b=JkwjNr79BVpQVdiGvpe6g0G4trPt1eSRwWB6FmXlTDelw2fNJQ3GhmGjh08b9U4FE+Ypeq NC4H7NthR2/1njB0jntWMkn9mIqjPsrf2lKo64ExzuaDUsgZC+kLeb1O6VA7VA5UBQrg6r 9HtL3h7Yf3ytMtGKIH1wyHNDx1MVCdPWLURKsN8YUsH7EvzR0UgEjVVotxk8pck0e8zUYa FQnkW8heNk2O1z3xTxv+32B4ozb/9vthuP9LE47asX9J14VLED6WHbYsQYVzm5OujbQ8Mv M4AfYR0Fp4eDAMkbdtmvs1T1SMV9UbpvSAove/CcSM/Hyb4EB9SYfjC6o+/b+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647300790; a=rsa-sha256; cv=none; b=tELukZ6DsIPAjG5JB38b5vO9kLsmtv73Fgomc/J111eqNfbFGM44tpmO76B0f2gYwlFZTB 8IjD0Xd//gLL6fg1CweEQHK6IN8Zcp3xZ7Nzw6DmSkFTyA4WcOWDBNaTqIW5qNrLu0AXFB 7TfrqlWoE/MVflqHSrY1Af/aLgeMCZAkiGZJnWfY2GyFMalF3TtscHktSJeXR9FT96zX+K QCfSp6jghOQz3Y6Wb+pVGmuboElVLdvA95BpNyoFwub33QrEDM03as3KadtGoOukkKnfS7 ky21W1jahIlx5CzbDAycK4F9M/Egy889K6PGjVFvwUggLCn27+cmz+tpGEcYDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Bp6qt77l; 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.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Bp6qt77l; 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: D919C49B9B X-Spam-Score: 6.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: rxr3H+/K1v8w * 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 2c5f5de719..d333d78e22 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) @@ -61,6 +63,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 + #: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))) -- 2.34.0