diff mbox series

bug#53270: [PATCH] gnu: Add yubikey-oath-dmenu.

Message ID 8735ldxzx3.fsf_-_@gnu.org
State Accepted
Headers show
Series bug#53270: [PATCH] gnu: Add yubikey-oath-dmenu. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Ludovic Courtès Jan. 24, 2022, 9:10 a.m. UTC
Hi,

John Kehayias <john.kehayias@protonmail.com> skribis:

> From a5958b588cebd23012d7d9cbeb8f1e22a3802ea2 Mon Sep 17 00:00:00 2001
> From: John Kehayias <john.kehayias@protonmail.com>
> Date: Fri, 14 Jan 2022 16:11:47 -0500
> Subject: [PATCH] gnu: Add yubikey-oath-dmenu.
>
> * gnu/packages/security-token.scm (yubikey-oath-dmenu): New variable.

Applied.  I took the liberty to make the change below, to avoid using a
non-literal string as the ‘substitute*’ pattern (it’s possible to use a
non-literal string but more error prone).

Thanks John and Maxime!

Ludo’.

Comments

John Kehayias Jan. 24, 2022, 3:46 p.m. UTC | #1
Hi,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Monday, January 24th, 2022 at 4:10 AM, Ludovic Courtès wrote:

> > Subject: [PATCH] gnu: Add yubikey-oath-dmenu.
> > -   gnu/packages/security-token.scm (yubikey-oath-dmenu): New variable.
>
> Applied. I took the liberty to make the change below, to avoid using a
> non-literal string as the ‘substitute*’ pattern (it’s possible to use a
> non-literal string but more error prone).
>
> Thanks John and Maxime!
>

Ah, that's how you do that, I'll add that to my virtual packaging toolbox.

Thanks for pushing and thanks for the review Maxime!

John
diff mbox series

Patch

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index b2f9f83ba2..8190e1e1e2 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -471,14 +471,12 @@  (define-public yubikey-oath-dmenu
           (delete 'build)     ; or build
           (add-after 'unpack 'fix-paths
             (lambda* (#:key inputs #:allow-other-keys)
-              (for-each (lambda (tool)
-                          (substitute* "yubikey-oath-dmenu.py"
-                            (((string-append "'" tool))
-                             (string-append
-                              "'"
-                              (search-input-file inputs
-                                                 (string-append "/bin/" tool))))))
-                        (list "dmenu" "notify-send" "wl-copy" "xclip" "xdotool"))))
+              (substitute* "yubikey-oath-dmenu.py"
+                (("'(dmenu|notify-send|wl-copy|xclip|xdotool)" _ tool)
+                 (string-append
+                  "'"
+                  (search-input-file inputs
+                                     (string-append "/bin/" tool)))))))
           (replace 'install
             (lambda _
               (invoke "make" "install"