unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: John Kehayias via Guix-patches via <guix-patches@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: "53270@debbugs.gnu.org" <53270@debbugs.gnu.org>
Subject: [bug#53270] [PATCH v2] gnu: Add yubikey-oath-dmenu.
Date: Sat, 15 Jan 2022 19:52:50 +0000	[thread overview]
Message-ID: <yRBE6e16uCuEAOldGd4aeAX3gbO0Mov_uPv6kc1FWvaGkXEWtwG_orESE6otwe_tm66HusJC9fOe99DGAvbwFIPOJMGvJejPwWt-7Iiq4C4=@protonmail.com> (raw)
In-Reply-To: <3d5ccfc962993cc5d5af18e49feb23e3c14765ca.camel@telenet.be>

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

Hi Maxime,

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

On Saturday, January 15th, 2022 at 6:27 AM, Maxime Devos wrote:

> Guix doesn't do staged installation
> (https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html),
> so I would avoid (ab)using DESTDIR here. Instead of this phase,
> maybe do
> [...]
> (string-append "PREFIX=" #$output)))))))
> instead (untested)?
>

No idea why I had DESTDIR there (there are some old packages I made, live and learn!) but your suggestion has the same result.

Attached is v3 of the patch with just this adjustment.

Thanks!
John

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-yubikey-oath-dmenu.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-yubikey-oath-dmenu.patch, Size: 4138 bytes --]

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.
---
 gnu/packages/security-token.scm | 64 +++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 79afdcee47..56b1552349 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2021 Sergey Trofimov <sarg@sarg.org.ru>
 ;;; Copyright © 2021 Dhruvin Gandhi <contact@dhruvin.dev>
 ;;; Copyright © 2021 Ahmad Jarara <git@ajarara.io>
+;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -53,6 +54,7 @@ (define-module (gnu packages security-token)
   #:use-module (gnu packages dns)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libbsd)
@@ -72,7 +74,9 @@ (define-module (gnu packages security-token)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages swig)
+  #:use-module (gnu packages suckless)
   #:use-module (gnu packages web)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml))
 
 (define-public ccid
@@ -443,6 +447,66 @@ (define-public python-pyscard
 (define-public python2-pyscard
   (package-with-python2 python-pyscard))
 
+(define-public yubikey-oath-dmenu
+  (package
+    (name "yubikey-oath-dmenu")
+    (version "0.13.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/emlun/yubikey-oath-dmenu")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1h6dr4l0gzgdg8zn2c39kx9cx1bgvwqxkz3z95qz9r70xfsghgwk"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:tests? #f ; there are no tests
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure) ; no configure script
+          (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"))))
+          (replace 'install
+            (lambda _
+              (invoke "make" "install"
+                      (string-append "PREFIX=" #$output)))))))
+    (inputs
+     (list dmenu
+           libnotify
+           python-click
+           python-yubikey-manager
+           ;; TODO add wtype, once packaged, for type support for Wayland
+           wl-clipboard ; optional clipboard support for Wayland
+           xclip        ; optional clipboard support for X11
+           xdotool))    ; optional type support for X11
+    (home-page
+     "https://github.com/emlun/yubikey-oath-dmenu/")
+    (synopsis "Interface for getting OATH codes from a YubiKey using dmenu")
+    (description
+     "Yubikey-oath-demenu lets you pick an OATH credential from your YubiKey using
+dmenu, and copies the corresponding OTP to the clipboard.  Alternatively, it
+can \"type\" the OTP using @code{xdotool} on X11.
+
+Notable features:
+
+@itemize
+@item Pick between all credentials on all connected YubiKeys
+@item No mouse interaction required
+@end itemize\n")
+    (license license:gpl3+)))
+
 (define-public libu2f-host
   (package
     (name "libu2f-host")
-- 
2.34.0


  reply	other threads:[~2022-01-15 19:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 21:15 [bug#53270] [PATCH] gnu: Add yubikey-oath-dmenu John Kehayias via Guix-patches via
2022-01-14 23:01 ` [bug#53270] [PATCH v2] " John Kehayias via Guix-patches via
2022-01-15 11:27   ` Maxime Devos
2022-01-15 19:52     ` John Kehayias via Guix-patches via [this message]
2022-01-24  6:15       ` [bug#53270] [PATCH v3] " John Kehayias via Guix-patches via
2022-01-24  9:10       ` bug#53270: [PATCH] " Ludovic Courtès
2022-01-24 15:46         ` [bug#53270] " John Kehayias via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='yRBE6e16uCuEAOldGd4aeAX3gbO0Mov_uPv6kc1FWvaGkXEWtwG_orESE6otwe_tm66HusJC9fOe99DGAvbwFIPOJMGvJejPwWt-7Iiq4C4=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=53270@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).