From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 OLsdOkYZgGO5nAAAbAwnHQ (envelope-from ) for ; Fri, 25 Nov 2022 02:24:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mEYZOkYZgGN9PAAA9RJhRA (envelope-from ) for ; Fri, 25 Nov 2022 02:24:22 +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 B2A858A2F for ; Fri, 25 Nov 2022 02:24:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyNQw-0005uG-Fv; Thu, 24 Nov 2022 20:23:14 -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 1oyNQv-0005sw-4Y for guix-patches@gnu.org; Thu, 24 Nov 2022 20:23:13 -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 1oyNQu-0004Xc-S3 for guix-patches@gnu.org; Thu, 24 Nov 2022 20:23:12 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyNQu-0000Qq-OT for guix-patches@gnu.org; Thu, 24 Nov 2022 20:23:12 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v7 28/32] gnu: Add rust-tree-sitter. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Nov 2022 01:23:12 +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.16693393851533 (code B ref 49946); Fri, 25 Nov 2022 01:23:12 +0000 Received: (at 49946) by debbugs.gnu.org; 25 Nov 2022 01:23:05 +0000 Received: from localhost ([127.0.0.1]:60840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyNQn-0000OT-2d for submit@debbugs.gnu.org; Thu, 24 Nov 2022 20:23:05 -0500 Received: from mout.gmx.net ([212.227.17.21]:41133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyNQC-0000J0-4t for 49946@debbugs.gnu.org; Thu, 24 Nov 2022 20:22:28 -0500 Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MCKFu-1p7lM41SiI-009ODc; Fri, 25 Nov 2022 02:22:22 +0100 From: Pierre Langlois Date: Fri, 25 Nov 2022 01:21:38 +0000 Message-Id: <20221125012142.22579-29-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:K6NNQKSI5eb1L3RyajbjxzZs47J4EpkU81GvhyJhHQ8Z32QnulZ KonoZMR6P0JqLk6vk5xfFtoYfelS8NMEJsVWWecqihANM8t6mGbFJNj4//NjQ/3mUtMAAGI +sxUpR/9CpxyvYQSmIh3YJRfNgJpZnRSuUux7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ACyZt5Nbu MqKFkBrMHEvhHcWsfgLkbTFr5Wk= 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=1669339462; 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=PJd2Ujkp92tlB1SN52vh4VT0ZQPVFM4tYaQ5SczRlQc=; b=CeIDbZBXFAUBiCKTP1YR/clUuxlQ3y+c2HsbolG4wCkWxOyQ4KI3tfKxJI7CBYSBroWiis YcfujtM+w+ShWlrxflsCQaJ8EaLHN5H1KWokmSaBvFCBjVk3IFAAgtAIdPXLUGcAyBaciJ YB7G0Frk1Mdkq1UAof1rc2vDbdUcJIK9KgBLGwGLOc17R1o8pvKQjM+xkg/NFUnZpMKD23 nB7V0tEaslixmt05J3aKdMjxNULlW3+HvERzjO9ts/OCC5SZqD+pNxDfy6As+dy9BipkTM 9/yEkqUkOh1QD1LFN6akVm+GlvggSY4XvS/w05KbeaUpSDNFZTExF5UaVJTjow== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669339462; a=rsa-sha256; cv=none; b=cYgl+or6OYh8U57d5fJcaDD1zBoYtsq4n1ijSHQ2G1/vEgX2CShHl17lsIb+pws3Ix0vMB 8VXwl7O+dKRTKS9GZ01paq14ocTwrKW586dduGgEl1Cr4SK72Es3r6EzUy8oKzSLIaa7zc ID91yKZl19FTwGy6l85ckVwBM2WHrSJNjGv2QSvXYpnYv+rWiU3qilPVH5znz/ZRbHtyWL ekH1jNnnctj1iw7rPEZt5aEpyi9BL1GUQQx4dtactLR/wUQdU/OMzfVAHHBWyFP4ta8NMC ShRVr0h1SqN2GZtd9Esc/5sX4J2T/XkoyODD1qpIHyPDNqi90gw/0Q0vH3GD1Q== 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: B2A858A2F X-Spam-Score: 3.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: WvDaOMDWuvEB * gnu/packages/tree-sitter.scm (rust-tree-sitter): New variable. --- gnu/packages/tree-sitter.scm | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm index 7cf9a41105..ca92fccfd6 100644 --- 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) @@ -158,6 +159,43 @@ (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.7") + (source (origin + (method url-fetch) + (uri (crate-uri "tree-sitter" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "183niy9malzr4dm81swcgl05xkwqamim6ck0gw5xb6k78nprz6jl")) + (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=tree-sitter\");~@ + }~%"))) + #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)))) + (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") -- 2.38.1