New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New package for yubikey-manager-qt
#55587
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a quick first review pass -- I don't know anything about Qt or Python packaging in Nix, so mostly addressing the low hanging fruits :-)
version = "1.1.0"; | ||
|
||
src = fetchurl { | ||
url = "https://developers.yubico.com/yubikey-manager-qt/Releases/yubikey-manager-qt-${version}.tar.gz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just ${name}.tar.gz?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
]; | ||
|
||
in stdenv.mkDerivation rec { | ||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem like pname is used anywhere else, just inline it in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems to be a standard attribute, given what @Ma27 said about the name
attribute. So, I am removing name
assignment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I obviously didn't explain this well enough: you can either use pname
(and version
) which is concatenated to ${pname}-${version}
or simply use a name
attribute. The first option has been implemented for convenience reasons, the latter is more commonly used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution. Unfortunately I get the following error when starting ./result/bin/ykman-gui
(after removing the duplicated homepage
entry from meta
):
QQmlApplicationEngine failed to load component
qrc:/qml/main.qml:1 module "QtQuick" is not installed
qrc:/qml/main.qml:6 module "QtQuick.Controls.Material" is not installed
qrc:/qml/main.qml:4 module "Qt.labs.settings" is not installed
qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/qml/main.qml:7 module "QtQuick.Window" is not installed
qrc:/qml/main.qml:3 module "QtQuick.Layouts" is not installed
qrc:/qml/main.qml:5 module "Qt.labs.platform" is not installed
qrc:/qml/main.qml:1 module "QtQuick" is not installed
qrc:/qml/main.qml:6 module "QtQuick.Controls.Material" is not installed
qrc:/qml/main.qml:4 module "Qt.labs.settings" is not installed
qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/qml/main.qml:7 module "QtQuick.Window" is not installed
qrc:/qml/main.qml:3 module "QtQuick.Layouts" is not installed
qrc:/qml/main.qml:5 module "Qt.labs.platform" is not installed
qrc:/qml/main.qml:1 module "QtQuick" is not installed
qrc:/qml/main.qml:6 module "QtQuick.Controls.Material" is not installed
qrc:/qml/main.qml:4 module "Qt.labs.settings" is not installed
qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/qml/main.qml:7 module "QtQuick.Window" is not installed
qrc:/qml/main.qml:3 module "QtQuick.Layouts" is not installed
qrc:/qml/main.qml:5 module "Qt.labs.platform" is not installed
qrc:/qml/main.qml:1 module "QtQuick" is not installed
qrc:/qml/main.qml:6 module "QtQuick.Controls.Material" is not installed
qrc:/qml/main.qml:4 module "Qt.labs.settings" is not installed
qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/qml/main.qml:7 module "QtQuick.Window" is not installed
qrc:/qml/main.qml:3 module "QtQuick.Layouts" is not installed
qrc:/qml/main.qml:5 module "Qt.labs.platform" is not installed
qrc:/qml/main.qml:1 module "QtQuick" is not installed
qrc:/qml/main.qml:6 module "QtQuick.Controls.Material" is not installed
qrc:/qml/main.qml:4 module "Qt.labs.settings" is not installed
qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/qml/main.qml:7 module "QtQuick.Window" is not installed
qrc:/qml/main.qml:3 module "QtQuick.Layouts" is not installed
qrc:/qml/main.qml:5 module "Qt.labs.platform" is not installed
qrc:/qml/main.qml:1 module "QtQuick" is not installed
qrc:/qml/main.qml:6 module "QtQuick.Controls.Material" is not installed
qrc:/qml/main.qml:4 module "Qt.labs.settings" is not installed
qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/qml/main.qml:7 module "QtQuick.Window" is not installed
qrc:/qml/main.qml:3 module "QtQuick.Layouts" is not installed
qrc:/qml/main.qml:5 module "Qt.labs.platform" is not installed
qrc:/qml/main.qml:1 module "QtQuick" is not installed
qrc:/qml/main.qml:6 module "QtQuick.Controls.Material" is not installed
qrc:/qml/main.qml:4 module "Qt.labs.settings" is not installed
qrc:/qml/main.qml:2 module "QtQuick.Controls" is not installed
qrc:/qml/main.qml:7 module "QtQuick.Window" is not installed
qrc:/qml/main.qml:3 module "QtQuick.Layouts" is not installed
qrc:/qml/main.qml:5 module "Qt.labs.platform" is not installed
[1] 24343 segmentation fault ./result/bin/ykman-gui
wrapProgram $out/bin/ykman-gui \ | ||
--prefix PYTHONPATH : "$program_PYTHONPATH" \ | ||
--prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so" \ | ||
--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually an appropriate ELF header is produced during the build. But I need to recheck this as soon as we got this working properly :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, isn't pcsclite
a dependency (and shouldn't be added using LD_LIBRARY_PATH
)? Also I'm not sure if LD_PRELOAD
is actually needed.
...and @delroth was slightly faster than me 😅 |
Thanks a lot for stepping through the feedback. Although the program starts for me, it doesn't detect a YubiKey for me ( |
I also had a hard time to figure this out... You need to have the pcscd service (from pcsclite) configured for the program to work. ( And you need the udev rules from update: This is the configuration I have in place:
I think |
The service you're reffering to is called |
Works here too, thanks! |
* Explicitly specify all QT dependencies rather than import from the `qt5` attr set. This makes overrides of a single library easier. * Drop the superfluous `with stdenv` expression and reference lib or stdenv itself where possible. * Don't manually configure shared libraries to load. This is mostly done automatically during the build steps.
I pushed a second commit onto your branch (that can be easily removed if needed) that does some minor cleanup as explained in the commit message. If the commit is fine for you and with it the package remains functional for you, I'd approve and merge :) |
@Ma27 LGTM, and still works for me, thank you! |
@avdv thanks! |
Motivation for this change
I own a few Yubikeys, USB keys for FIDO2 U2F auth. There is a new graphical manager appliation based on Qt5 (similar to yubikey-manager-neo) from Yubico.
This is my first try writing a Nix expression for a new package, a probably made some mistakes. Please advice.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)