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 ms5.migadu.com with LMTPS id YPNBKdZIgWIKFgAAbAwnHQ (envelope-from ) for ; Sun, 15 May 2022 20:39:18 +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 6L8+KNZIgWIeeAEAG6o9tA (envelope-from ) for ; Sun, 15 May 2022 20:39:18 +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 72723A6EB for ; Sun, 15 May 2022 20:39:18 +0200 (CEST) Received: from localhost ([::1]:41346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqJ9B-0001W2-KH for larch@yhetil.org; Sun, 15 May 2022 14:39:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqJ8w-0001TH-IC for guix-patches@gnu.org; Sun, 15 May 2022 14:39:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nqJ8w-0008TT-9V for guix-patches@gnu.org; Sun, 15 May 2022 14:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nqJ8w-0006bH-6o for guix-patches@gnu.org; Sun, 15 May 2022 14:39:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v6 04/27] gnu: Add tree-sitter-c. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 May 2022 18:39:02 +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.165263992925288 (code B ref 49946); Sun, 15 May 2022 18:39:02 +0000 Received: (at 49946) by debbugs.gnu.org; 15 May 2022 18:38:49 +0000 Received: from localhost ([127.0.0.1]:50654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqJ8j-0006Zc-Dv for submit@debbugs.gnu.org; Sun, 15 May 2022 14:38:49 -0400 Received: from mout.gmx.net ([212.227.17.21]:38473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqJ8d-0006XP-AG for 49946@debbugs.gnu.org; Sun, 15 May 2022 14:38:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1652639917; bh=8WsVgaFG9psJpDlUuVTWUW56iFN1qD/HZdMdQMvL8TI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=M/VeLYPEzULLhywawVL4va5R6rtf14HQUlgIEHpT/RbBpsO09XzKiwgeycFYPDefg z1sqRVje6tt9pLCmstzQP12Avu8WHylacu7RAf2KTWnWzssk2TJYa7UiUXy2KhGCHL CylLdYj5CyMkvn7NyxwPetAxWc/fsZlnJR6g0r98= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1M9nxt-1nvYT21zXh-005sUD; Sun, 15 May 2022 20:38:37 +0200 From: Pierre Langlois Date: Sun, 15 May 2022 19:38:11 +0100 Message-Id: <20220515183834.18771-4-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220515183834.18771-1-pierre.langlois@gmx.com> References: <87mtfi63ut.fsf@gmx.com> <20220515183834.18771-1-pierre.langlois@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:RmBoKgBUYC7Bt/VFmo0MvxL/0O+Qmil2fxjx9IVPfDhltmZw1Os P5PmiduqCJZpWsyUPIZKAUsEfJVqh9qrn8Hcpz48wXRDkRYvUPRMIfjpojJDp2h2aeVQ8tO cWAGwCa5HVC2Bmdveya2zrmM19bUcG2PER3zVS7z60Hi6Bxp8b54n0Px5dRPNgAVXR+F1zH PbOTjWSZWJ68eOyrC76NQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:5KsNEAH5nIU=:I+3HQAL2ZFtGucWyJxJzck Mkons3GAjTXkFIXL9MYyKp3KnRrfJNyVf+X5m8Fw+ZgD8P2SLM75dsceb5Be3SS58fFWkyvDC ZlJqIt8EXgaXp0JRZr1tn4/H7m+hE5hIGtBvXiFTx5cb1RyfkW0FYzHbOIptpkyTBnSs1gffH 0J9lD8XBaNMgG85r1gwSzcaaqv62zcSzGDoGV9i4+Qb5N6ToUvTpw4yBMm7bKsawmKD7fKhHI 966zLhgnItZ3JxmN59nsYzT34L6ZsutIFFNGBE5MrwONAbhnvVNYS251KBTq8Jz3Q39gWXBy8 I8n9D+8ufk/S1QuDDrglJAxJA9rVNQ9KpxlyPEhQciVs/oGIlni+rUEV16kr5nVWgwi/pjNin zHpeeTORegqc6uZku6hkp2RYljAWhcNXc65Gsn3TiHlp6CSBWOj25o60c2G7+dBIIQgrmuinB dNiZcnN7olVwbOEDr6D3r0EKow3ZN/kBbljiyGSjv/UZj688X3BaEwRUxF7vrFG5UAC9V819i vVJAOZThcQ0i//2AhM4AMq2k1cKbPQSNMkqRNFWnI/IeUbtgjpbRs4nqrjciQywvfe0opzkeX 4EQqPEYYewTWoOlFjPS14XQIHjZK/amu6TlVYtyvXu9N7OAV2lXHNZj4yfs4ryAXRbwGFQNvK gsv3yc4La0RHSuIv0TjSZGEQ3otpI2Demv4Ozu0hO1Ebc+qhxHqqCbgChW+OrEBB4up9W1Vm7 9pllQER97ST8r0HpPtuoMWMSUHXHB8SaWlgZoVxC8fqc+dmpNjQ9coZZy695I09pz7rpCwKy5 Ub1GRIlqFxonSD0E2LmfNa0lgtSzFWHCvgk/cGbrCcLAugFaMa4+hSGYyn8RI+sqmbHj3OimO w9Tv71TXYwhfQB0AnXf0Gif23BW004I/UfhJjYlwf/8VXjc4bMBOYG10Cu3T1QCWu9ECLl7UP 2oWoTxKTDXags6DbRqXM5lzJ8DuiwKhl0FYfNSFRdlC10CdxpUY4SLMK+F1iiyTbgMR0wxagE HZDy3T3T+KasnNRqljiaeua1HU4MGIJPOxfhJMOJOACkwf3Y0eT2cy76vLiLHUI14VJD8mkJB bJQndr31r+31tY= 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=1652639958; 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:dkim-signature; bh=FI+YTAUhruEPROcGNkjU1uQvAg+RcKFw3bbcukuvx14=; b=VATsnzSwGgThhqlH1JtwP3Z8WjVg2ONdb/AvamPLAMD1Zt1cXd7f9z6bG1qtFzxKY0tgQL gRRG6J+dGG3G8SmTCKxReQprH60XON8N2V97gMqxLtq6e3WTC8zKXwMvC2qnZDej8A+OYh SnWlWS+eqVmr15X7PwNv5RH7N3KBpnGEimzxigcbXl90x0gu29XfVeWnzdwCt5qA5U0ZJv GgW034Mv/3+EvFQKqEOakbZr3iLtv8yUX663Jlh/xtB7vbqFkNkV8QedhN/uHQakI1NZ+n 1wPbEXTEq5nBV7X/YW0x/PAL9kckTz9IVCg1weusYgAuQ3OVvTs+RHIRy3cOqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652639958; a=rsa-sha256; cv=none; b=oQFayyvPeanBBW5l10HCNbv5aRPfVWBF4V4mdedOezBD3fAUfnm+y3Tuyp1RVOuePDILo0 omPULEpJH/X41RoVHXA2AZIL+3nzYMOTe354RYWxJZl2vPT8Fm69xdEHtopcA40k7Tmysz zIbLb9LoOMBWLOn4iktiH3tqHCaoGE4pHqJpO9k9ebPwXKERcLPwgTaB31d/iVetb23xwE Hzu/8M4wtxeiG3ldYpxs4Godavd2Lb4tKlYWup6qNxzAQ3jmWK5pI/DmGesANSMMmewERq WBFbZzyXdUkzCLxiofEOvgzkXWiNUZaCe2SADJmLroxmjI4Q6JFgofEO/eCEGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="M/VeLYPE"; dmarc=fail reason="SPF not aligned (relaxed)" 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: 7.37 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="M/VeLYPE"; dmarc=fail reason="SPF not aligned (relaxed)" 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: 72723A6EB X-Spam-Score: 7.37 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9m2OmYYtr+RI * gnu/packages/tree-sitter.scm (tree-sitter-c): New variable. =2D-- 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 18c9fe0844..3f07b2d91c 100644 =2D-- 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) @@ -155,3 +156,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.1") + (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 + "0454jziys33i4kbwnvi9xcck0fzya792ghy32ahgk1hhv96xga9w")) + (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))) =2D- 2.36.0