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 SLtLKWZ172PYkAAAbAwnHQ (envelope-from ) for ; Fri, 17 Feb 2023 13:39:02 +0100 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 KIEeKWZ172P7TgAAauVa8A (envelope-from ) for ; Fri, 17 Feb 2023 13:39:02 +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 7EDD229B95 for ; Fri, 17 Feb 2023 13:39:02 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmx.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676637542; a=rsa-sha256; cv=none; b=sGRQj6nSkWX4menohuER2dRGzOaujRgrayBb/scwkAH4DwmMdc6NC49hlFoCmhfynzO8jh g/tjOT69M8/3K7gG52S0uegfLuzneKI7bKv1/cYp1EsOCBaY54e7rgG+BRL5oS8s6KLZfJ ynShlcuuYoqSkFmB08goBgOsdHZ0JazAJG030UoS98eOtKIwUfXviDQx2qiqNLWWSVqzvp /KJoNeLira42vhOaKKczgw75ArboTj8qcUat7sowNseIY+Azym/xj8lzlSw9XNXgEmoUPE +D4K2iy8VaPAJf/uw0saMKXeAxqht7UOKrqWEB/C1C6MxKyvzAaZ3SxZ+2MdVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmx.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676637542; 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=KQlALT9eZyNZGgaaOubw6EKzFhxsbjp/kOiFz0qkvYE=; b=jBxl9kUncX7SkvqLYhpo3XpvNpTXkNlu2VimF28A46AMbHGJ6ZFV2c3H+W+dEJUdHMJ7dX 1pSHDXeJsZrONI9NwUsGXbnGo0jiAOkyhPEzfhWikc3FHU6y/2QaRDHoNy87mMPRznfWZj DSybSE8m8SNL8Gkw7kljQMmP4OiVE8OtdojswGqzjXSOsRcy7hJPT5W+GnaBrvQkgFgDDE aim7+fd+FftWpqf6xbIfwgwqG/zBBZTFnhso5qh+f6mxap2vDI3R9fx4JQ2pb2mcJFDuQ3 aTX/B7jprwCHXl/yu90E+k5YnKhCgcA5S8QefseHBaRdWPTJth0r5WWcAGjFcA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT005-0003j7-J9; Fri, 17 Feb 2023 07:38:05 -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 1pT002-0003bS-Tg for guix-patches@gnu.org; Fri, 17 Feb 2023 07:38:02 -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 1pT002-0000zS-JY for guix-patches@gnu.org; Fri, 17 Feb 2023 07:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT002-0001I7-Fn for guix-patches@gnu.org; Fri, 17 Feb 2023 07:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v8 3/7] gnu: Add rust-tree-sitter. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 12:38: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.16766374594872 (code B ref 49946); Fri, 17 Feb 2023 12:38:02 +0000 Received: (at 49946) by debbugs.gnu.org; 17 Feb 2023 12:37:39 +0000 Received: from localhost ([127.0.0.1]:38699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSzze-0001GV-Ug for submit@debbugs.gnu.org; Fri, 17 Feb 2023 07:37:39 -0500 Received: from mout.gmx.net ([212.227.17.22]:54169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSzzW-0001FG-Vf for 49946@debbugs.gnu.org; Fri, 17 Feb 2023 07:37:32 -0500 Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MiaYJ-1owOSw0TsF-00fgM1; Fri, 17 Feb 2023 13:37:25 +0100 From: Pierre Langlois Date: Fri, 17 Feb 2023 12:37:18 +0000 Message-Id: <20230217123722.15143-4-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230217123722.15143-1-pierre.langlois@gmx.com> References: <20221125012142.22579-1-pierre.langlois@gmx.com> <20230217123722.15143-1-pierre.langlois@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:e4UooE3z0hKF7C3PBzeLAEk9J3Vy2iQD3b158aKcD4zMjWFris0 kS3lOhr1M/8kTUL9rkZZSB/kt0DX3J20SOwTmxNl024m7Bg6xPr/twvhTmPZ+pRyQ/gOJ2z 6bRq21JikO7HEpHf35HdaWUuLRpFwMC8Aqa9YYFVeRXIIKXXfzlnD7xCKA8YXc4vILZuD85 UprH3PDiu2rMDbZx+oC3g== UI-OutboundReport: notjunk:1;M01:P0:L2brBKzZK94=;SepAJ0ra2X2GHxhVkqD47DinbFE 0jnVLBeill7a8RfhrVq8AWGLZ0V9Wnu/x9fCQTzx2ICBb4yMBiD4japligdL/qB4skVsA6ISg wsBjnD8ooozLCwVEudPNW8xqma7k6sAa8YDlpVwmaooLWiSXd7oEF3a7TKNf5YOczJP3n2uGv mdyORolJqQ1EEOfhsmZx9LG0CFMDDCxO3ca0NP6jXpSckgSYSb2L7maus8x4APPvHToB9PAIL 0ih1NJJ0k9wBGz7s93qJAjNlHLPCOKhsLNAqSicLAekljO6u4gsIsBggExjXY7Yvx6XA/+oNu +f5yaLIexDqQTs8nURES+5Ric0mgK53OI77YvVsXd2Sm/kawTkWsBV9EcqGpes/QBFxDJi7S9 hAF3yYERLptbXImRCAFBuO/K6HI7edKeoRukPASwpjjaiDv9uT+cbQBBDanqsErpWABuNGrvt PCcRTJxjRB/vCv84Id2cUlbXBgUoEd+/hGODpoTL0roGsEZFAbfdkn2b3/y7NdbEFVr79H6sC sDdzkvmfXjeIbUKUC8NCm+VdDNig0fNvRymZ6Uc3Mr3T2bbZ6tU2w2d0KvBJVRvFs/V4NAHI8 zi+fd8ooABbuZ65rqeqyP6OpRBXdkk0uFoKl8W1a2QlB0fJ5Yfa6AHSWEEYrL8xdympu8WN49 7wFclmGrnItrOqT6Jurci9Zmjl7u7o6fwloZR0dEOAWV8h5znYqqdAvvW4sjrTCRxkLqI0+1H Ca74EEj9298kDmkBF3ajgubayAmvlQnDOw5i2GAwwsMBmsqLSroe1WGD0lj9hSbvd8kd1D3aT +lfZJlgAcvaMMNdKnnXXIsAHt8Q+qNNJpJlvVaVG+OH5Vl87K+nEfmXo9Z/eMgIMhoFOR/Sq2 LZdP1ROyO9GLH25jaw1d3yvZM6JeNIAKMSl6za5FnlvPYEsYgH9uw8sDdohDIWQffTCVSeMX+ QoBc7X0dSduIMrj49jzWkcpy8SQ= 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: X-Migadu-Queue-Id: 7EDD229B95 X-Spam-Score: -2.83 X-Migadu-Spam-Score: -2.83 X-Migadu-Scanner: scn0.migadu.com 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 X-TUID: 0ZY9gKxcbdZg * gnu/packages/tree-sitter.scm (rust-tree-sitter): New variable. --- gnu/packages/tree-sitter.scm | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm index b202ebf4d3..7256ad02e4 100644 --- a/gnu/packages/tree-sitter.scm +++ b/gnu/packages/tree-sitter.scm @@ -30,6 +30,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 gexp) #:use-module (guix git-download) #:use-module (guix packages) @@ -188,6 +189,42 @@ (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\");~@ + }~%"))))))) + (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 grammar-directories) #~(begin (use-modules (guix build utils)) -- 2.39.1