From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +GKQHl4ZgGMaTwEAbAwnHQ (envelope-from ) for ; Fri, 25 Nov 2022 02:24:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MMWMHl4ZgGO+dgAAauVa8A (envelope-from ) for ; Fri, 25 Nov 2022 02:24:46 +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 5023712ED7 for ; Fri, 25 Nov 2022 02:24:46 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyNQp-0005mE-4P; Thu, 24 Nov 2022 20:23:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyNQo-0005lg-9G for guix-patches@gnu.org; Thu, 24 Nov 2022 20:23:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyNQo-0004TG-0n for guix-patches@gnu.org; Thu, 24 Nov 2022 20:23:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyNQn-0000On-TO for guix-patches@gnu.org; Thu, 24 Nov 2022 20:23:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v7 07/32] gnu: Add tree-sitter-c. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Nov 2022 01:23:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49946 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49946@debbugs.gnu.org Cc: Pierre Langlois Received: via spool by 49946-submit@debbugs.gnu.org id=B49946.16693393481298 (code B ref 49946); Fri, 25 Nov 2022 01:23:05 +0000 Received: (at 49946) by debbugs.gnu.org; 25 Nov 2022 01:22:28 +0000 Received: from localhost ([127.0.0.1]:60800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyNQB-0000Kf-Id for submit@debbugs.gnu.org; Thu, 24 Nov 2022 20:22:28 -0500 Received: from mout.gmx.net ([212.227.17.21]:53837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyNQ5-0000Ht-J8 for 49946@debbugs.gnu.org; Thu, 24 Nov 2022 20:22:22 -0500 Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Ma24y-1pUMgF3MsW-00W1Wq; Fri, 25 Nov 2022 02:22:15 +0100 From: Pierre Langlois Date: Fri, 25 Nov 2022 01:21:17 +0000 Message-Id: <20221125012142.22579-8-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221125012142.22579-1-pierre.langlois@gmx.com> References: <87mtfi63ut.fsf@gmx.com> <20221125012142.22579-1-pierre.langlois@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:YTmjXcfBOD5hKsLZWQ41th0dIBMkDBJ8yroL7TCbkim0PhN9L+b FjqaC9tG2G86VaneE/USCF7vvNxAB4kiwiQj9Y/PaRmM6auYgmKzZNJgWkwaZc8+TpQA2bQ 60+4KfYZ4YhMpV+olSoak7pYPzZIk/tl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D0Sa8 n+qWcR6D+hzOOw8UHmCZj6qHtzg= 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669339486; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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; bh=dlYNduH3VYOrAc4KtD3HHKHDER/PMXg5FthezeUOqrc=; b=Ktni8nibx0iGGKQQ0l5r1ttYbp5s5qpC5sFY1U+kx6GA0gIlpFwaNkKMEDud8oVGjrBIag MNurvbAAO74DnlShDSzp/0YXaIsHGTNOTDDggpGsJtxrS2WciGp7T7Fch+9q8zaTe8W12C 9BHHKahxqr081nQAQKJjvDrosEVlacCWnHrqnLXWHX4GOCQuD7xSobMF2Sc0aN2UgjUSgf Mn+YLhc2xLbGryoaocqE9LtdSCwCLdMsw31DMJmKfJd8bItd2ZF0pLXR5ODqPGgMSefnav 9Yt4aEJRoUawQS/NeqxuA2H3h2lek+mYuBKSnI+fYak5eooX+5/ReufPZJZs+g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669339486; a=rsa-sha256; cv=none; b=c532wt3gE8vEpYazWRv2qZbTtRdHitwY5XIsfQ1F+8dYiGJO/zeG7h1g0w8qdt1gW03T/3 Lcrx2qGYEoEOzeTbFXZ+pvgx9vSefTHwWAM+4HxuGen4CviP6zqs+oeBPwIbjaTX+hEq/6 3UHWUW8JLN3tyS3bxyf2IwyLZuP7dGw3Y1+8EoVXSQBa/DbZmTgyk6yoYaf07RzOnK353+ cvg5XLXGFyjufGFxHMJz1yWW/tukBRHEfZKIDHvecBu1GDIxvZzemZ9n+ooD6x7H8h8H1i CEhw7qzAoWQrsYfTagJUqggKTYjpweNxQxHT3Wub1/g4yjuSrHAILNoe7MGm2g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmx.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: 3.00 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmx.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: 5023712ED7 X-Spam-Score: 3.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: cHNxsNpC8+sY * gnu/packages/tree-sitter.scm (tree-sitter-c): New variable. --- gnu/packages/tree-sitter.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm index 30bf17b79b..4f75b0251a 100644 --- a/gnu/packages/tree-sitter.scm +++ b/gnu/packages/tree-sitter.scm @@ -22,6 +22,7 @@ (define-module (gnu packages tree-sitter) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cargo) #:use-module (guix build-system gnu) + #:use-module (guix build-system tree-sitter) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) @@ -156,3 +157,35 @@ (define-public tree-sitter-cli This package includes the @command{tree-sitter} command-line tool.") (license license:expat))) + +(define tree-sitter-delete-generated-files + '(begin + (delete-file "binding.gyp") + (delete-file-recursively "bindings") + (delete-file "src/grammar.json") + (delete-file "src/node-types.json") + (delete-file "src/parser.c") + (delete-file-recursively "src/tree_sitter") + #t)) + +(define-public tree-sitter-c + (package + (name "tree-sitter-c") + (version "0.20.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tree-sitter/tree-sitter-c") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1w03r4l773ki4iq2xxsc2pqxf3pjsbybq3xq4glmnsihgylibn8v")) + (modules '((guix build utils))) + (snippet tree-sitter-delete-generated-files))) + (build-system tree-sitter-build-system) + (home-page "https://github.com/tree-sitter/tree-sitter-c") + (synopsis "Tree-sitter C grammar") + (description + "This package provides a C grammar for the Tree-sitter library.") + (license license:expat))) -- 2.38.1