From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2HGyNYpKgWLspwAAbAwnHQ (envelope-from ) for ; Sun, 15 May 2022 20:46:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2LqRNYpKgWJE0AAAauVa8A (envelope-from ) for ; Sun, 15 May 2022 20:46:34 +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 8442328551 for ; Sun, 15 May 2022 20:46:34 +0200 (CEST) Received: from localhost ([::1]:48616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqJGD-0006id-Jk for larch@yhetil.org; Sun, 15 May 2022 14:46:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqJF6-0006hz-CA for guix-patches@gnu.org; Sun, 15 May 2022 14:45:27 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nqJEk-0001P7-JG for guix-patches@gnu.org; Sun, 15 May 2022 14:45:17 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nqJEk-0006qI-Fz for guix-patches@gnu.org; Sun, 15 May 2022 14:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v6 23/27] gnu: Add rust-tree-sitter. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 May 2022 18:45: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.165264024826223 (code B ref 49946); Sun, 15 May 2022 18:45:02 +0000 Received: (at 49946) by debbugs.gnu.org; 15 May 2022 18:44:08 +0000 Received: from localhost ([127.0.0.1]:50747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqJDq-0006or-4S for submit@debbugs.gnu.org; Sun, 15 May 2022 14:44:08 -0400 Received: from mout.gmx.net ([212.227.17.20]:45367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqJDZ-0006nK-Jr for 49946@debbugs.gnu.org; Sun, 15 May 2022 14:44:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1652640223; bh=mYc4QxerQD6CZjWzT2A4030YAAjJX9gDMJigJNV1VaI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=U3ZHxMcR9TkIwtVHrjiPJcZ2abhygqd2chYtaXAQj4hO7Zjc71973uQEJr7HBrLQU Ju/4d+Pko3vuiUciYdfj5TqftrRAtgF6Ki7neLt1VOpM/LzPm10jFSdciEFWzs1gYg F9pkbFwowDW4tWUVLcvvhVQui+WqNB5WJqUOORP0= 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 1MyKHc-1ngUQB1qKy-00ygTe; Sun, 15 May 2022 20:38:43 +0200 From: Pierre Langlois Date: Sun, 15 May 2022 19:38:30 +0100 Message-Id: <20220515183834.18771-23-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:i6vOMFocUJH1mPkdjDl+b4/VhA1bN6Piobd/Ziwg/5UUblr9A+S OmtZOzNHbbA5cGwW7YqncYih8fcy6S6sv46eI2A0NlbFXZHEt4U1jUfBDl6IcReaH5H/ug5 c7+9lmGEGh6Jo+Wcr9sdYXA79xfIDN63t3x9uDeHMPonkdD1C9Ss8vQzH0qdAyQUaiGLMD7 zoCiG2dqTvCo4BD0vOyow== X-UI-Out-Filterresults: notjunk:1;V03:K0:zr5IxEU0PUU=:MNqZbHVQ85dEmn8KTaFGvP JQVyOxa7rUaTUKzDVYsjIDLuJOIW5Sf7Ya67caXJP9ekaNJBMgZQOk5dnPwkqCo8km+fvZuPN rBD2AgePjg9y/bp6+ZZERe/mT/bi9nI8cCLtyp07VQ6gcmzIUG8+XIeCzyIDCu33sCqkVyHjo ruASCxX4s9p16joK9y+YbElxQxzv5sSb2qrWm44cZjaRzquMRYvrFksuv3rt9Qi40f0H6YUmo U9rZ6yxwn/GbBLw/b9aG08nJ6qmGfkpn9HJOefTdyT6Vj5y4lLWW2W9oQEnwA9KE6z/rzrZ+M AcgevSXEDs1FBkOJXPGY7pXr2ZkExR13X/gKb8RGoqdUG5tP7k+aiUxmEbT1ydKRCMwQR6gzM wkbMzgoBfiDATSPRZhWXTVhdMvBB5ec6DV9Zfe6kIMjEo6dVsoSppuTh1Xm4eqFigo30EfQqi jDncw+vHxERpo8bTUuwAuaicsvNWBb0zNvask8k3zcO3cnsrphZGYSk624c7YVFm7y97kWYx/ P2juUJe4FcM0wom3HXBWXkLBuPlet49esB9AYTdT0hsretDEnvePT89G8cmfNpfhKEiFv6d60 3HAd0p1Gds3RmRINK0VLbXf08zw1xpDp9n0gHEVaYfBnevA9LH4KPIRUB4pXOmaiNTib24IMi xuxCD2S50x2klwEhNf9GnFCrtk0T+vcN71A7Q3X7MwFMAXYR1rtMvWIaBDpd3nVki85MnpRpg CX7NK9XyIFRju5ehUuwk8I9r5arxYmdJ/D3SGimpW4ZsSDQu3UwGy5P7Lf309eUmEvOrUDAFR zMPneXPpNufCht1VS/9w6PWw1+1XvXJNhwumGD+cAekqzWbM/Oed3AqKHSWOYDp3b7gDkBQKH vumFYBL17qkrLs4mCuKUQArXe61APgkvS5QTBNz0PsU1/ey9Zp/2e5L3nf191WpRKzTiCcSiJ 2uS8pSUp/1FRz6z0hoCUML80JQE1m5fExFhad0RJKa0A9pw001GVXlW3mwxMS18CQqD1UyzAj wIwhb8vzboXoto8IlUtyizUKM8D40oCLkfNtCca1T+l92ttp6D8bFLfq1hVEvMa9d4V2uALGp 0urdueC2uToVcI= 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=1652640394; 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=e/DeOGGaJD6Tis6YLfHUSAbqQpReHWb9GUYmtHQndO8=; b=VEw9ZIczjsaooKrGOCR0kd8xxYW0jWDZEGuPI0J6EjsufC/N9+fnpH6+38XdP2KvXUoWXs aed1S6fQ0DrYxAbokeeywc2Txxj1huz1uZ5jaiuCwi7oa8wHeZDqNqz3/7RYb5ujacYNXZ geeB++1Hv+ZWAqf+B3iYNd0442iXvElfCHSZBRTOMOfZ+HH8h2HBrikgRLODQZcbd+d6nQ RtclJnt455att8dYT573WeKfBP4YwKn0xb9QDTQ+3lLw92fBFYyvHXKvMYteOPdyONO/Vh 6W692GnrWntX2+2iNwnvuRklZJqteu5oNuqXXi2SWhwynkfxvPC4B4nIzICsdg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652640394; a=rsa-sha256; cv=none; b=cb9zxzaXvjGcEHvfmYHqZ21bwIC6sJVhv4S7WD+VCDHTTcgT9Ccv99EvUBoSlEsJtd/qWV rQ0egreE3S7mVyN4bnKXqa1sgR3Tj042j/R8vnfiKJbCHjGZOObe7+fyOdE0WelSmeTEtZ xkXNxO+MUIVa76lLz69NfpXjogwPXKzKhfsCZIEHqRDe01C7p0+4Ong78CmX/jlyanEEaR 3ucK0i66mCX6pTDE/JV0s9brBkXPpIXhqGcWN86XNzjQ69TXZOW4+T/piqTksbwpdFQAKh kszb2idq9j+Z8P63/woN1QijfMRbG61PIBtENlO1tUsZbvlPZzwj3pVYyFiCBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=U3ZHxMcR; 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.07 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=U3ZHxMcR; 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: 8442328551 X-Spam-Score: 7.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: EQxa7mKkmbOn * gnu/packages/tree-sitter.scm (rust-tree-sitter): New variable. =2D-- gnu/packages/tree-sitter.scm | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm index 04747f47e5..58ecc445a6 100644 =2D-- a/gnu/packages/tree-sitter.scm +++ b/gnu/packages/tree-sitter.scm @@ -23,6 +23,7 @@ (define-module (gnu packages tree-sitter) #:use-module (guix build-system cargo) #:use-module (guix build-system gnu) #:use-module (guix build-system tree-sitter) + #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) @@ -157,6 +158,44 @@ (define-public tree-sitter-cli This package includes the @command{tree-sitter} command-line tool.") (license license:expat))) +(define-public rust-tree-sitter + (package + (name "rust-tree-sitter") + (version "0.20.6") + (source (origin + (method url-fetch) + (uri (crate-uri "tree-sitter" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0wcvxgnvj7ga1y7xa7wm0pmabkfj8936ifg8jacd4201cj0vgcq9")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove the runtime library code and dynamically link= to + ;; it instead. + (delete-file-recursively "src") + (delete-file "binding_rust/build.rs") + (with-output-to-file "binding_rust/build.rs" + (lambda _ + (format #t "fn main() {~@ + println!(\"cargo:rustc-link-lib=3Dtree-sitt= er\");~@ + }~%"))) + #t)))) + (build-system cargo-build-system) + (inputs (list tree-sitter)) + (arguments + `(#:cargo-inputs + (("rust-cc" ,rust-cc-1) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-regex" ,rust-regex-1) + ("rust-spin" ,rust-spin-0.7)))) + (home-page "https://tree-sitter.github.io/tree-sitter/") + (synopsis "Rust bindings to the Tree-sitter parsing library") + (description "This package provides Rust bindings to the Tree-sitter +parsing library.") + (license license:expat))) + (define tree-sitter-delete-generated-files '(begin (delete-file "binding.gyp") =2D- 2.36.0