From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 wHeONJpmgGMmiQAAbAwnHQ (envelope-from ) for ; Fri, 25 Nov 2022 07:54:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uK93NJpmgGOULQEA9RJhRA (envelope-from ) for ; Fri, 25 Nov 2022 07:54:18 +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 9E0B8381DA for ; Fri, 25 Nov 2022 07:54:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oySbE-0006zL-FI; Fri, 25 Nov 2022 01:54:12 -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 1oySb5-0006yx-GC for guix-patches@gnu.org; Fri, 25 Nov 2022 01:54:03 -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 1oySb4-00025U-HQ for guix-patches@gnu.org; Fri, 25 Nov 2022 01:54:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oySb4-0002zc-6v for guix-patches@gnu.org; Fri, 25 Nov 2022 01:54:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH v7 05/32] gnu: Add tree-sitter-cli. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Nov 2022 06:54: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: "Pierre Langlois" , <49946@debbugs.gnu.org> Received: via spool by 49946-submit@debbugs.gnu.org id=B49946.166935918511438 (code B ref 49946); Fri, 25 Nov 2022 06:54:02 +0000 Received: (at 49946) by debbugs.gnu.org; 25 Nov 2022 06:53:05 +0000 Received: from localhost ([127.0.0.1]:33161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oySa8-0002yP-P5 for submit@debbugs.gnu.org; Fri, 25 Nov 2022 01:53:05 -0500 Received: from knopi.disroot.org ([178.21.23.139]:47060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oySa7-0002yI-Lg for 49946@debbugs.gnu.org; Fri, 25 Nov 2022 01:53:04 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id F16074140F; Fri, 25 Nov 2022 07:53:02 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id kFDDUeYk1-VL; Fri, 25 Nov 2022 07:53:01 +0100 (CET) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1669359181; bh=KMiHfwq8joCUkP4qQ9Aqwsfy98axxj3CyO39F2wVSSo=; h=Date:Subject:From:To:References:In-Reply-To:From; b=dSskhdaqSfEN6HoKpaurxbkDFugP8UA/nsdYMThj4GP1yoD3u8BOWQ3Rs/pI3xPSR 2qodYWJHOvggQtiwioW4M4o64W2vYgh+AOT9AgJgoG1K+AfjSj4LJkKMirtqDOtEbe Lj45aPUm2PHhBobEQf3QnLtetu+ZPNh53+xD4YU4M4amj7tWG2ONgSlDdsz13dhZtS 4nbBGLRLgOCrTJLxB35dt6OFjyzNdqDbAJg2aGOuuEsrATp6XoNeP3Oz2qzShgjN37 8P5G8wshW1+oKrLzbZH5k9JWtWlfdhs5TN87TLlkA1PDQlOiMvzRpiOzLEsUaY1uxl Gbn2cEcixQASw== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 25 Nov 2022 06:52:59 +0000 Message-Id: References: <87mtfi63ut.fsf@gmx.com> <20221125012142.22579-1-pierre.langlois@gmx.com> <20221125012142.22579-6-pierre.langlois@gmx.com> In-Reply-To: <20221125012142.22579-6-pierre.langlois@gmx.com> 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: , Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" From: "\( via Guix-patches" via 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=1669359258; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: 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=5YL6O0mRKowUZS9WDPUDTYTbE7BP0NVCABwCR/SKHs4=; b=YkHGJGyefaqXpNu7ItBjAoOW9qN19L7qCCpDgpLGgfS+CLE/JEoBN/90USmQ3hSMelMRhW iS1ESlq06yaNTCkmS3J+Xp4y9jcNOuO3Y+LsiCWvPci1nNwdOjt8TMplHdMQXhzSz53cBA 3ZgUOemjHJBk0Fx2lD7aTCDiIwin4cuzAnjfTjSMrjFlA+JGZqjhVGB3ygVwAvFQ6tkkfd ZY4jVke0zfSwJfNBSp+La+y5MAcAefWBjNapi/x1goCniuw2klKKIkwvHANqzs534GgQUU YRsLa8CcwCEMWb8wRs8BdSfWiXtSqtG3Ps98MLNw+xf1xOpILaZ1uQTGNSd5YA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669359258; a=rsa-sha256; cv=none; b=lq9A41bcWxt5K8LC5BqR7MwEAbDriNkX/dnkMtjlGZoqvEiaLSr9uqyar02GgU7uuSRkzv 3vwnUsx7EKXGUXz3t6+Ff/XgeWJh/wMc4rG3yx9LRf0zRpZb5wVv3IZNgh8n3ABoSiWqg0 K6uVxcr8yOgZnJNaJoBNsJlM/HaQiUL3D7/1cuxWg2v/RsaLc5ySzQNwWmf9tYmRuqhxv3 RubwSBBOx0sJoueoEKuiVbCSs9NG6FMJ3RdXj7vqGVS2X3ijTkaJnD9BsM1D9u9oeX4Qcr BGwTuUcVpfED5ZKR4E0cg9sxXjf2GY/nuWVps8ZbLnv5Rpb3yPEv3EKm7auD+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=dSskhdaq; dmarc=pass (policy=none) header.from=gnu.org; 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.58 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=dSskhdaq; dmarc=pass (policy=none) header.from=gnu.org; 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: 9E0B8381DA X-Spam-Score: -3.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: ihdqc0qjodA0 On Fri Nov 25, 2022 at 1:21 AM GMT, Pierre Langlois wrote: > * gnu/packages/tree-sitter.scm (tree-sitter-cli): New variable. > --- a/gnu/packages/tree-sitter.scm > +++ b/gnu/packages/tree-sitter.scm > @@ -76,3 +79,80 @@ (define-public tree-sitter > + (snippet > + '(begin Please use a gexp here. > + (with-output-to-file "lib/binding_rust/build.rs" > + (lambda _ > + (format #t "fn main() {~@ > + println!(\"cargo:rustc-link-lib=3Dtree-sit= ter\");~@ > + }~%"))) > + #t)))) The #T is redundant. > + (arguments > + `(;; Running test requires downloading fixtures, see the Please use LIST. > + ;; script/fetch-fixtures script. > + #:tests? #f Couldn't we fetch the fixtures ourselves with a secondary origin, like I did here? > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'delete-cargo.lock > + (lambda _ (delete-file "Cargo.lock"))) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (bin (string-append out "/bin")) > + (lib (string-append out "/lib"))) > + (mkdir-p bin) > + (install-file "target/release/tree-sitter" bin))))))) Update this to modern Guix style, please: #~(modify-phases %standard-phases (add-after 'unpack 'delete-cargo-lock (lambda _ (delete-file "Cargo.lock"))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((bin (string-append #$output "/bin"))) (mkdir-p bin) (install-file "target/release/tree-sitter" bin))))) -- (