From patchwork Wed Jun 4 07:49:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 42996 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7EF1E27BC49; Wed, 4 Jun 2025 08:51:44 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C16ED27BC4A for ; Wed, 4 Jun 2025 08:51:43 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uMitw-0002ls-GT; Wed, 04 Jun 2025 03:51:08 -0400 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 1uMitq-0002kh-Gq for guix-patches@gnu.org; Wed, 04 Jun 2025 03:51:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uMitq-0002ll-7R for guix-patches@gnu.org; Wed, 04 Jun 2025 03:51:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=w9Gr794SLplmypS1yziPvOPIrLOxhw/YzH1z/YjRcZc=; b=U1DeubH6ngwMSN3EYk9KoUQyCJw4gENEW+Mmgqh1/yOAkzx3O6Kc78S53b+SwDy/sTbp76MiKY58b4XQHtXortX+V6dI+7fMOTtTV8mG91qMICNG1V5S1K6YXTRGZ9iiCoAwsmkWxbSzU7+NEkJDvpQQ8yivn1MnSiUBIY/7sk0zlOaibnWauOy8qzB/A/L2v1rnwZveB5ID99kieT/JNVXEg80aTvsEBdtNMps0jve9vMDuYE20rHg7WqnD8M20PhFvx1pHqLZqwdAaWiJJY0k8aZZPsn/c2v8cGe5TiWMg+7TTVsLFhQakM2YLWdZGLVAnHuiPqiW8mjSfCaN3SA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uMitq-0001jD-3R for guix-patches@gnu.org; Wed, 04 Jun 2025 03:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78691] [PATCH 2/3] gnu: rbw: Improve style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Jun 2025 07:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78691 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78691@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78691-submit@debbugs.gnu.org id=B78691.17490234066095 (code B ref 78691); Wed, 04 Jun 2025 07:51:02 +0000 Received: (at 78691) by debbugs.gnu.org; 4 Jun 2025 07:50:06 +0000 Received: from localhost ([127.0.0.1]:46573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uMisv-0001aE-PI for submit@debbugs.gnu.org; Wed, 04 Jun 2025 03:50:06 -0400 Received: from 7.mo563.mail-out.ovh.net ([46.105.59.58]:37133) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uMisr-0001ZG-Le for 78691@debbugs.gnu.org; Wed, 04 Jun 2025 03:50:03 -0400 Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net [152.228.215.222]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4bC09M6KPpz1kPn; Wed, 4 Jun 2025 07:49:59 +0000 (UTC) Received: from director3.derp.mail-out.ovh.net (director3.derp.mail-out.ovh.net. [127.0.0.1]) by director3.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78691@debbugs.gnu.org>; Wed, 4 Jun 2025 07:49:59 +0000 (UTC) Received: from mta2.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.168.213]) by director3.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4bC09M3Qnbz5xK0; Wed, 4 Jun 2025 07:49:59 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.6]) by mta2.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 1ADDBBA4134; Wed, 4 Jun 2025 07:49:59 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-104R0050b38ff94-d105-4e8d-94d3-cdeb08b389ea, 55D8CD9FCCBE2A40DC556E1A8E1799EDAA20BDE9) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 Date: Wed, 4 Jun 2025 09:49:53 +0200 Message-ID: <20250604074956.9603-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250604074956.9603-1-ngraves@ngraves.fr> References: <20250604074956.9603-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 18061404833353687778 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddujeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepieelhfffteevgeelgeetfedtfffhgeduhfehvdduudfghfffieeutdefhefhvddvnecuffhomhgrihhnpehtohiithdrnhgvthenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeekieeludesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeifegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=w9Gr794SLplmypS1yziPvOPIrLOxhw/YzH1z/YjRcZc=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1749023400; v=1; b=izc1XrLdu5AymR+Wm4BCfqcRCOjkpg2kLcF4xvcPHyJcz/u07iBlKhF8NoIHxm8MaybYeCdT QtDS6q+3oI7HM4QTuxuUEm025cO/dk1uHani1twQVwl99hbI/Ul6i24bNpO3s70q+BUO5LtjMmq lD1l64gLd/mQdU1X0E4dXywUwizXqifrjpVpogQDePmAPF1wQylXRJ8dkfNx6CDTvToLM3sFxxY qKOBVjvkZBh3zHAs39gk/4FcMnoqJiQkCU0HEpDHM4Hk5Irc9BFlDOPq8qkv4EskraJMosb7Ngr ryDRFRzsHzS1NOPrOBuAyh8WHBUVqMG058f/cYRvfcj1w== 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: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/rust-apps.scm (rbw)[arguments]: Improve cargo-inputs and phases style. Use gexps. --- gnu/packages/rust-apps.scm | 191 ++++++++++++++++++------------------- 1 file changed, 95 insertions(+), 96 deletions(-) diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index ce01f6ed2c..8db5f48b41 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -3824,109 +3824,108 @@ (define-public rbw (string-append "\"^" version))))))) (build-system cargo-build-system) (arguments - `(#:install-source? #f - #:cargo-inputs - (("rust-aes" ,rust-aes-0.8) - ("rust-anyhow" ,rust-anyhow-1) - ("rust-argon2" ,rust-argon2-0.5) - ("rust-arrayvec" ,rust-arrayvec-0.7) - ("rust-axum" ,rust-axum-0.7) - ("rust-base32" ,rust-base32-0.5) - ("rust-base64" ,rust-base64-0.22) - ("rust-block-padding" ,rust-block-padding-0.3) - ("rust-cbc" ,rust-cbc-0.1) - ("rust-clap" ,rust-clap-4) - ("rust-clap-complete" ,rust-clap-complete-4) - ("rust-cli-clipboard" ,rust-cli-clipboard-0.4) - ("rust-daemonize" ,rust-daemonize-0.5) - ("rust-directories" ,rust-directories-5) - ("rust-env-logger" ,rust-env-logger-0.11) - ("rust-futures" ,rust-futures-0.3) - ("rust-futures-channel" ,rust-futures-channel-0.3) - ("rust-futures-util" ,rust-futures-util-0.3) - ("rust-hkdf" ,rust-hkdf-0.12) - ("rust-hmac" ,rust-hmac-0.12) - ("rust-humantime" ,rust-humantime-2) - ("rust-is-terminal" ,rust-is-terminal-0.4) - ("rust-libc" ,rust-libc-0.2) - ("rust-log" ,rust-log-0.4) - ("rust-open" ,rust-open-5) - ("rust-pbkdf2" ,rust-pbkdf2-0.12) - ("rust-percent-encoding" ,rust-percent-encoding-2) - ("rust-pkcs8" ,rust-pkcs8-0.10) - ("rust-rand" ,rust-rand-0.8) - ("rust-regex" ,rust-regex-1) - ("rust-region" ,rust-region-3) - ("rust-reqwest" ,rust-reqwest-0.12) - ("rust-rmpv" ,rust-rmpv-1) - ("rust-rsa" ,rust-rsa-0.9) - ("rust-rustix" ,rust-rustix-0.38) - ("rust-serde" ,rust-serde-1) - ("rust-serde-json" ,rust-serde-json-1) - ("rust-serde-path-to-error" ,rust-serde-path-to-error-0.1) - ("rust-serde-repr" ,rust-serde-repr-0.1) - ("rust-sha1" ,rust-sha1-0.10) - ("rust-sha2" ,rust-sha2-0.10) - ("rust-tempfile" ,rust-tempfile-3) - ("rust-terminal-size" ,rust-terminal-size-0.4) - ("rust-textwrap" ,rust-textwrap-0.16) - ("rust-thiserror" ,rust-thiserror-1) - ("rust-tokio" ,rust-tokio-1) - ("rust-tokio-stream" ,rust-tokio-stream-0.1) - ("rust-tokio-tungstenite" ,rust-tokio-tungstenite-0.24) - ("rust-totp-lite" ,rust-totp-lite-2) - ("rust-url" ,rust-url-2) - ("rust-urlencoding" ,rust-urlencoding-2) - ("rust-uuid" ,rust-uuid-1) - ("rust-zeroize" ,rust-zeroize-1)) - #:phases - (modify-phases %standard-phases - (add-after 'install 'install-completions - (lambda* (#:key native-inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (share (string-append out "/share")) - (rbw (if ,(%current-target-system) - (search-input-file native-inputs "/bin/rbw") - (string-append out "/bin/rbw")))) - (mkdir-p (string-append out "/etc/bash_completion.d")) - (with-output-to-file - (string-append out "/etc/bash_completion.d/rbw") - (lambda _ (invoke rbw "gen-completions" "bash"))) - (mkdir-p (string-append share "/fish/vendor_completions.d")) - (with-output-to-file - (string-append share "/fish/vendor_completions.d/rbw.fish") - (lambda _ (invoke rbw "gen-completions" "fish"))) - (mkdir-p (string-append share "/zsh/site-functions")) - (with-output-to-file - (string-append share "/zsh/site-functions/_rbw") - (lambda _ (invoke rbw "gen-completions" "zsh"))) - (mkdir-p (string-append share "/elvish/lib")) - (with-output-to-file - (string-append share "/elvish/lib/rbw") - (lambda _ (invoke rbw "gen-completions" "elvish")))))) - (add-after 'install 'install-scripts - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (scripts (assoc-ref outputs "scripts"))) - (for-each (lambda (file) - (install-file file (string-append scripts "/bin"))) - (find-files "bin")) - (for-each (lambda (file) - (wrap-script file - ;; TODO: Do we want to wrap these with more programs? - ;; pass git fzf libsecret xclip rofi - `("PATH" prefix - (,(string-append out "/bin") + (list + #:install-source? #f + #:cargo-inputs + (list rust-aes-0.8 + rust-anyhow-1 + rust-argon2-0.5 + rust-arrayvec-0.7 + rust-axum-0.7 + rust-base32-0.5 + rust-base64-0.22 + rust-block-padding-0.3 + rust-cbc-0.1 + rust-clap-4 + rust-clap-complete-4 + rust-cli-clipboard-0.4 + rust-daemonize-0.5 + rust-directories-5 + rust-env-logger-0.11 + rust-futures-0.3 + rust-futures-channel-0.3 + rust-futures-util-0.3 + rust-hkdf-0.12 + rust-hmac-0.12 + rust-humantime-2 + rust-is-terminal-0.4 + rust-libc-0.2 + rust-log-0.4 + rust-open-5 + rust-pbkdf2-0.12 + rust-percent-encoding-2 + rust-pkcs8-0.10 + rust-rand-0.8 + rust-regex-1 + rust-region-3 + rust-reqwest-0.12 + rust-rmpv-1 + rust-rsa-0.9 + rust-rustix-0.38 + rust-serde-1 + rust-serde-json-1 + rust-serde-path-to-error-0.1 + rust-serde-repr-0.1 + rust-sha1-0.10 + rust-sha2-0.10 + rust-tempfile-3 + rust-terminal-size-0.4 + rust-textwrap-0.16 + rust-thiserror-1 + rust-tokio-1 + rust-tokio-stream-0.1 + rust-tokio-tungstenite-0.24 + rust-totp-lite-2 + rust-url-2 + rust-urlencoding-2 + rust-uuid-1 + rust-zeroize-1) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-completions + (lambda* (#:key native-inputs #:allow-other-keys) + (let ((share (string-append #$output "/share")) + (rbw (if #$(%current-target-system) + (search-input-file native-inputs "/bin/rbw") + (string-append #$output "/bin/rbw")))) + (mkdir-p (string-append #$output "/etc/bash_completion.d")) + (with-output-to-file + (string-append #$output "/etc/bash_completion.d/rbw") + (lambda _ (invoke rbw "gen-completions" "bash"))) + (mkdir-p (string-append share "/fish/vendor_completions.d")) + (with-output-to-file + (string-append share "/fish/vendor_completions.d/rbw.fish") + (lambda _ (invoke rbw "gen-completions" "fish"))) + (mkdir-p (string-append share "/zsh/site-functions")) + (with-output-to-file + (string-append share "/zsh/site-functions/_rbw") + (lambda _ (invoke rbw "gen-completions" "zsh"))) + (mkdir-p (string-append share "/elvish/lib")) + (with-output-to-file + (string-append share "/elvish/lib/rbw") + (lambda _ (invoke rbw "gen-completions" "elvish")))))) + (add-after 'install 'install-scripts + (lambda* (#:key inputs #:allow-other-keys) + (let ((scripts #$output:scripts)) + (for-each (lambda (file) + (install-file file (string-append scripts "/bin"))) + (find-files "bin")) + (for-each (lambda (file) + (wrap-script file + ;; TODO: Do we want to wrap these with more programs? + ;; pass git fzf libsecret xclip rofi + `("PATH" prefix + (,(string-append #$output "/bin") ,(dirname (search-input-file inputs "/bin/grep")) ,(dirname (search-input-file inputs "/bin/sed")) ,(dirname (search-input-file inputs "/bin/perl")) ,(dirname (search-input-file inputs "/bin/xargs")) ,(dirname (search-input-file inputs "/bin/sort")))))) - (find-files (string-append scripts "/bin"))))))))) + (find-files (string-append scripts "/bin"))))))))) (native-inputs (cons* perl (if (%current-target-system) - (list this-package) - '()))) + (list this-package) + '()))) (inputs (list coreutils-minimal findutils grep perl sed)) (home-page "https://git.tozt.net/rbw")