From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EALxBpthQ2LTkgAAgWs5BA (envelope-from ) for ; Tue, 29 Mar 2022 21:44:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SJk4O5phQ2LMnQAAG6o9tA (envelope-from ) for ; Tue, 29 Mar 2022 21:44:26 +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 9139318F81 for ; Tue, 29 Mar 2022 21:44:26 +0200 (CEST) Received: from localhost ([::1]:34594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZHlR-0003RL-F6 for larch@yhetil.org; Tue, 29 Mar 2022 15:44:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZHl5-0003Qi-PQ for guix-patches@gnu.org; Tue, 29 Mar 2022 15:44:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39734) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZHl5-0001B3-H7 for guix-patches@gnu.org; Tue, 29 Mar 2022 15:44:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nZHl5-0004xu-E0 for guix-patches@gnu.org; Tue, 29 Mar 2022 15:44:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v5 04/27] gnu: Add tree-sitter-c. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Mar 2022 19:44:03 +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.164858303318903 (code B ref 49946); Tue, 29 Mar 2022 19:44:03 +0000 Received: (at 49946) by debbugs.gnu.org; 29 Mar 2022 19:43:53 +0000 Received: from localhost ([127.0.0.1]:33588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZHkv-0004uj-2j for submit@debbugs.gnu.org; Tue, 29 Mar 2022 15:43:53 -0400 Received: from mout.gmx.net ([212.227.17.22]:60505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZHkn-0004rq-9T for 49946@debbugs.gnu.org; Tue, 29 Mar 2022 15:43:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648583019; bh=T9/TXF6570OCr1ac9Xaul28LZqHM00cwCwib3UGk0xs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=WCwXXJkMxN1xkxTXWg0DrMOD+tWimvkboS5ygk2+4tUxFxVzm4gpw4I3QS2ddQNib hWVoI96DYk8Rp9sDYykil/70O4ptOU0cAQX+kAQr/q91FD6gka5TD1jqxiw6W5T4iq /r0VMMp13EJnOjsxKePsLrHqGzyja0HE9e5v9vW0= 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 1MYeMt-1nTyXY1z6J-00Vd95; Tue, 29 Mar 2022 21:43:39 +0200 From: Pierre Langlois Date: Tue, 29 Mar 2022 20:42:55 +0100 Message-Id: <20220329194318.6106-5-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220329194318.6106-1-pierre.langlois@gmx.com> References: <877d9s2qa9.fsf@gmx.com> <20220329194318.6106-1-pierre.langlois@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Cf/OqxZEM+YL77JaiXVv5VERHfc6eIbZMiTLFIuS0s+yjY9Rc1B /SAW541Yp2UQC5yKK6MKplhPNMzeFXFeRvZu6+PkO8Iauy3kRqN6HLaMUEcako9DX0ly/b6 ei0GFtAMJig2uXULuVsaGN+tLxXSn0ls0VRZuB3LN36aHzDT/VJk0ce8/6KFScxszVM8z5y j2Y4W6UYuNE4FNuK9KbwQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:I/YrQjXrSu0=:g89blG1YBPgqduikIrSuRb A6yishshTYfZrxjTuIIsLeWNqqQ9P66JffwO9pmhEq2LINu0BinvbHZN/ens5Ltdb37at9ZMP 21LNg+Qbc/w0fh0mCn3AWB7V8TDPpbQlhjNRJq/zABDcd0j2i8pm08AGwBUEqarj5v2DTWSMK whWghbOJEYvJjp+RMqAzvdcbEqAQYG5TbhupT4lPHYL+GmQ0v0nbBllhUeVKF9o00XRdYviAY tVIhEYRWbpAzvLz5uAcvZYaDoRa5GSiGRQagfpE9IoQr4/xsdEe4SEH68ZarlsisZYP2Epq5q acBe17ZMd+TcdLr9SMJO0V2UjNC/KEFwrwO8ZulTTdJc6KtJwytXftiEy8jJf3mUkcSrP7Dno GCJ5vrmUzzBCpBKrVVENHXw6CACGObIpGTn6OgTfBYKgKMLF9ucOAvZfWNVHrd+bXHrHGCLOs 7cY4WvhNsKgD62brgiAdsaaZRpmmKdXdEWG4cyQp4MOdUla02CiEBrF5C1ZFWVVDbcANXOTYj O2dLi320jgTth1SzaBzzMAXjkVnBJBOjUPQw5/cW1yJqzSaX7+peutRNHK+ulAK81TkLcxhI4 /43ajr543jCM6B++OOBn3nb1+0cSiV3Zu46l2HpyF95OcRAhWtCzzRSjUgkiyaZqub2lI5/MP SRRKbpgnPHlLf+upq9JTZPSWnNX08obTpPwP0mvAfae5WWEdVjSWM+jBVUc81Z78a5riGKX/A Htkq8hBq2H0tzVMGREpST1USi3yC4TlfzMEb0GdIxf25PY7EzePNDN6rvyS8Dk/QBglxVcHg0 gKE+NIZJ2iCL6jZ3Mw3ezvY8t/khzA29K2sE5+ZL4uwiUAsxFrPc69TJbXv0p5Vz5Af9wjbd3 zJcgg1szNehZeZjhphc17z5TIjfK62pE/fwlg+Falu95C9llh7Bb8EFs2YlkUL6Tcd0fxJLnY ce5W2I7VPTl/QOmjlwSRQa95xBRvSl2JA597OfztGgYGZ/9QNnLB5lwpawzTCMeBwJhefF82K 9Zhx3gnxhtzghLZ/ClhHPG64WCO+6i4WsrbQTw9JHdFsDpqqUn2RzheOuKZYHXBEouv3IMMim Zj5CbmPnLxJ58U= 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=1648583066; 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=seUGHmsINqF7yvSwlFD3Ke8mPmIICBrquVayN07MhKU=; b=V0gFQ0TJnLIzCCOD7kZg7dz+/M6m9FXhQGlJtSjR30q3L7FcFzAVXZwyILO4nLVSvCpFsN pv7frs6jIPjBgzw4YfSZE7+MZs9yFgvgrBfLgTuOFrHPZbFcHUarJFTBby1G3gP+ue80FH /dC11AYl4Sc5P/jTl5ny5A6ssFp3V+yLI+OVhkF2jyE8JMWf69sYR2aXUFzVUk8yj2G8h9 YDNwCj1DsrPNpJWF4o4iwOZu3Zegf21gYRk9SIdgf7Lq1UvfXYeqjTWfMax+9QvptjZFdC f7xOKEKCdR12qHABmQ0XbwAc7MPwaRT65y9njrZfABJDiD6hcGDawpRbzMXy0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648583066; a=rsa-sha256; cv=none; b=jmANRhF315REAML98uW2LnOK4yPrxJWdZYskgXK36j8vZSlXy+XBPFyXgOgxSQFiUZ0C3Q JT0LCULRuH6G5UY7JHUTId7bJ0MH7IH7XbmDAW074QlWH3Z3QquwaiY3eV2YW+5QoOehoT jaRHFPgb5WZ9D6dMllRcBR5UUB6q0uQ/pcoUuGNBPyklv7I2QiPih4Er/4gR9NxTGyMOFa ihAho5ALtNY/9eKs+HbLkj1FkWXdXdOmLEecuQ94338YHd0nFr+KKgeXLeSeg/E2dQYxAY FhE+bKY7v5vJw8wcfxFt4XZtBSvQ7Ux//CJHfp1l+mc23Urg3F7xRfH/WBwijg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=WCwXXJkM; 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.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=WCwXXJkM; 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: 9139318F81 X-Spam-Score: 7.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: zyvFZj+S6xGR * 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.34.0