Skip to content

Commit

Permalink
yubikey-manager-qt: Fix detecting inserted yubikey
Browse files Browse the repository at this point in the history
Fixes #353582

The upload functionality was removed in an upstream dependency, so importing the
types failed and caused an error.

See Yubico/yubikey-manager-qt#364 (comment)
  • Loading branch information
avdv committed Jan 8, 2025
1 parent 6b773a1 commit 937f91d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/tools/misc/yubikey-manager-qt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ mkDerivation rec {
hash = "sha256-6bKeR3UX2DhXGcKJ1bxvT1aLTgCfc+aNo6ckE89NV+I=";
};

patches = [ ./remove-upload-import.diff ];

nativeBuildInputs = [
python3.pkgs.wrapPython
qmake
Expand Down
15 changes: 15 additions & 0 deletions pkgs/tools/misc/yubikey-manager-qt/remove-upload-import.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- a/ykman-gui/py/yubikey.py 2025-01-08 19:42:20.058393985 +0100
+++ b/ykman-gui/py/yubikey.py 2025-01-08 19:44:12.520364702 +0100
@@ -50,12 +50,8 @@
if int(ykman_v.split(".")[0] ) > 4:
from yubikit.support import get_name
from ykman.device import list_all_devices, scan_devices
- from ykman.otp import (
- _PrepareUploadFailed as PrepareUploadFailed
- , _prepare_upload_key as prepare_upload_key, generate_static_pw)
else:
from ykman import connect_to_device, scan_devices, get_name
- from ykman.otp import PrepareUploadFailed, prepare_upload_key, generate_static_pw

from fido2.ctap2 import Ctap2, ClientPin

0 comments on commit 937f91d

Please sign in to comment.