From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QL3ZD/XlQGIpugAAgWs5BA (envelope-from ) for ; Mon, 28 Mar 2022 00:32:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MLKrCPXlQGLpAwEAG6o9tA (envelope-from ) for ; Mon, 28 Mar 2022 00:32:21 +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 9A49C2AF3A for ; Mon, 28 Mar 2022 00:32:20 +0200 (CEST) Received: from localhost ([::1]:44196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYbQp-0006hB-QX for larch@yhetil.org; Sun, 27 Mar 2022 18:32:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYbQZ-0006h1-2U for guix-patches@gnu.org; Sun, 27 Mar 2022 18:32:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYbQY-0003tm-PM for guix-patches@gnu.org; Sun, 27 Mar 2022 18:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nYbQY-0005ol-MH for guix-patches@gnu.org; Sun, 27 Mar 2022 18:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#53523] [PATCH v8 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: Sun, 27 Mar 2022 22:32: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.164842031122338 (code B ref 53523); Sun, 27 Mar 2022 22:32:02 +0000 Received: (at 53523) by debbugs.gnu.org; 27 Mar 2022 22:31:51 +0000 Received: from localhost ([127.0.0.1]:56748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYbQN-0005o8-7I for submit@debbugs.gnu.org; Sun, 27 Mar 2022 18:31:51 -0400 Received: from mail-oi1-f182.google.com ([209.85.167.182]:44819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYbQH-0005nk-J5 for 53523@debbugs.gnu.org; Sun, 27 Mar 2022 18:31:49 -0400 Received: by mail-oi1-f182.google.com with SMTP id t21so8984925oie.11 for <53523@debbugs.gnu.org>; Sun, 27 Mar 2022 15:31:45 -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=N8USuAszhxkEE/z+nynZRoKFjdWkOjTa2xpeYqmOu/A=; b=ivAptKIOVJ4r+GX5J4ZhqnvrzqDed3XpT35SaOJCYD9B0lT6h+VwxD8zs3dWUJqHuN DEdnxh+XAnGO0/Z5ZJc4mctySEz1/NUKu7CUxPUz8bb/Eyb0/T5Ay3TJFX55qZfFuSV/ IL9jUFGhA+YruwXYqmaNclFH+E5NhH8TH+ObjrrSFQVEHp1C47xH7FsNriAcMpO0Z+Vz NCsJrwSuZ+lnU/lQm+MvXhhSD0vd1R0wLTjk40sOc+rUlRUTmJzivRs0YRTDyimLEABb f8PSVkdfCJOlCQu4k12j7j8V1NJ3TUSsNQbMd5hcTEn5KGZ62yXvP0FwbHl6CRIUvL3M AozQ== 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=N8USuAszhxkEE/z+nynZRoKFjdWkOjTa2xpeYqmOu/A=; b=Nra00X4zAa5bmr+kxCNqLIPGyaX3Qobg6+WNeh8Nz6Cx36cQFRUXkIsKWpr5ZN+pvD eWRzebZBlpR4UBtOTFwZFGY5bcEcAYiIr92zydvdyGXseMtFH5lst1XhCLBMtSJPlX01 vUaM28hpTIh4asySJ9r9ssXPUw3308DLEwTwbLjO20EOorX2pWZ/LhlMjXiwxQTEAqSF 9xQtHnwWQX2XH+Y1l1nQi/evkkpsh7hqiLyKV4bNQiECPtArEceUrqlelNhiDm+kbZw+ NKKDPmR7XgaacCmYXEsN3WIKl1lL0a5r8bsh/PpMdJ7Tu4HqIJcAvOtKizHMXVEUTaf6 EEXQ== X-Gm-Message-State: AOAM530gfUOsXpwVkd+HACMRGnDUPmolzDo242Nguzb8QaKu8hBZ7K5R CYKYDCp0liUXAKl3Igk5EbvDQYkbXIg= X-Google-Smtp-Source: ABdhPJxQpBf0tp8qiPRObCIDzIXMN6Fy/BDFDgxOstqiHNZ+OlS4omwJmmQ+kqnbFm8MJhh8JaULEw== X-Received: by 2002:a05:6808:1496:b0:2da:8662:4346 with SMTP id e22-20020a056808149600b002da86624346mr10832799oiw.9.1648420299484; Sun, 27 Mar 2022 15:31:39 -0700 (PDT) Received: from localhost.localdomain ([2804:7f2:2785:9515:a639:8340:7381:f0d5]) by smtp.gmail.com with ESMTPSA id 11-20020a05687013cb00b000dd9b5dd71csm5707890oat.56.2022.03.27.15.31.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 15:31:39 -0700 (PDT) From: Luis Henrique Gomes Higino Date: Sun, 27 Mar 2022 19:31:27 -0300 Message-Id: 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=1648420340; 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=N8USuAszhxkEE/z+nynZRoKFjdWkOjTa2xpeYqmOu/A=; b=h+q5P6cYhcQMUY/0KG+Qr4Q8wPTt3nuHs7/sNf5203FHgJwJMfkD2Hn63GJK9lRot0igzv hmjAVasMi9ZCi/kSg4F4AUVcdK/omRuwvVhnhceJWJ2BRhy7gBTSV3gCLZ4GWxB/wcGdmE AO9zEuTedWLW6kOsSDgXoN0goVk51MWidWWMr6WAobfvqEyQJ6n1HwB2mNO6aBuFRmslc4 17otemsxjC4Bd7VCVs4qbrDocG9k5eti8th0kCoItk8DBPVsNO97fxjFyXoofwlpyM4ACd cuRjHPH6Uwdiwz3fldLR3fOMuFL8lCLasG/oYRxXK1N7gmkWpbia+TkIJXwDlQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648420340; a=rsa-sha256; cv=none; b=DMqHNUjw8VIR/y7ddpE+ZdmwYvrhWNl8kuFDw5Cp597kBV5I+Ju/RqIzXPV9NT7GnrfKom G5I9zJmb//1ltkCC7chdLi2efP26MiSSmFmAsno06JHJ/wcISdGj5NvRwJnwtGFjg5nID7 Ziy2e89dkauoB6L4vrm+VYFoEuvoVj9yplm4S572B68SXW0hpGiCt5ci7e7SYcSKdLOsIS seSef+gfUriyevwDx0EhSU/IJw64ZjmUNmteJfT1vc5/Ssndvg2Li5uovUnTKsfuuDmH3O Q82F0CxlpcrU5oV2gmSux8YsY6e3fR6kbvGxZIGo0B2QvbpR6ioWwX26FC0sSg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ivAptKIO; 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.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ivAptKIO; 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: 9A49C2AF3A X-Spam-Score: 6.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: mvTxjUQCvrtw * gnu/packages/text-editors.scm (tree-sitter): New variable. --- gnu/packages/text-editors.scm | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 45cc61765a..7cbad042c9 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. ;;; @@ -62,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 +1167,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: 2344fb10972a4cefead8e7aa3e0b807da4cf4570 -- 2.34.0