diff mbox series

[bug#49342,1/1] gnu: python-yubikey-manager: Fix libykpers reference.

Message ID 20210702212159.27440-1-contact@dhruvin.dev
State Accepted
Headers show
Series Fix libykpers reference in python-yubikey-manager | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Dhruvin Gandhi July 2, 2021, 9:21 p.m. UTC
* gnu/packages/security-token.scm (python-yubikey-manager): Fix libykpers reference.
---
 gnu/packages/security-token.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Dhruvin Gandhi July 8, 2021, 6:12 a.m. UTC | #1
Dhruvin Gandhi <contact@dhruvin.dev> writes:

> I missed updating the copyright in last patch. Here's v2.
>
> Dhruvin Gandhi (1):
>   gnu: python-yubikey-manager: Fix libykpers reference.
>
>  gnu/packages/security-token.scm | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
>
> base-commit: eef099a2e1648032c571567c6da29ccd86e72058
> -- 
> 2.32.0

Are there any updates on the patch? It'd be great if we can merge it.
The patch only adds (links) a missing library at runtime. It can be
verified by running `ykman -v` before and after the patch.
Thanks.
diff mbox series

Patch

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 49ca1dc01e..3c2f336497 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -657,6 +657,23 @@  implementing a Relying Party.")
                (base32
                 "11rsmcaj60k3y5m5gdhr2nbbz0w5dm3m04klyxz0fh5hnpcmr7fm"))))
     (build-system python-build-system)
+    (arguments
+     '(#:modules ((srfi srfi-1)
+                  (guix build utils)
+                  (guix build python-build-system))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-libykpers-reference
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "ykman/driver_otp.py"
+               (("Ykpers\\('ykpers-1', '1'\\)")
+                (string-append
+                 "Ykpers('"
+                 (find (negate symbolic-link?)
+                       (find-files (assoc-ref inputs "yubikey-personalization")
+                                   "^libykpers-.*\\.so\\..*"))
+                 "')")))
+             #t)))))
     (propagated-inputs
      `(("python-six" ,python-six)
        ("python-pyscard" ,python-pyscard)