Skip to content
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

Nitrokey-app2 building from source issues, instructions outdated, no binary, macOS #327

Open
Anhsirkz opened this issue Feb 25, 2025 · 1 comment

Comments

@Anhsirkz
Copy link

Expected behaviour: Compile Nitrokey-app2 (GUI) from source for macOS
Current behaviour: I cannot compile the Nitrokey-app2; One needs to edit the make file due to being outdated. The official Nitrokey compilation instructions are way too outdated and need to be adapted. brew tap homebrew/cask-drivers is deprecated as Nitrokey/nitrokey-app#496 (comment) points out for the Nitrokey-app. This is tedious and confusing. Why are there two different applications? The software of other vendors works without any hassle...

Steps to reproduce:

brew install -s poetry
git clone https://github.com/Nitrokey/nitrokey-app2.git
cd nitrokey-app2
<!--- edit makefile PYTHON=python3.13--->
make init
make build
poetry update
poetry env activate
pip install trove-classifiers
pipx inject poetry poetry-plugin-shell
poetry env activate
nitrokeyapp

poetry shell is deprecated and not used anymore. trove-classifiers need to be installed separately.
The last command nitrokeyapp results in zsh: command not found: nitrokeyapp . What am I doing wrong? Where does the compiled binary output get saved to?
macOS
24.3.0 Darwin Kernel Version 24.3.0 arm arm64

@mmerklinger
Copy link
Collaborator

Hi, thanks for the issue.

| One needs to edit the make file due to being outdated

You can change the used Python version by passing this variable on the commandline with make PYTHON="python3.13" <target>. The Makefile value is just the best default for us, as it works on Linux distributions.

| Why are there two different applications?

The old Nitrokey App supports the Nitrokeys before version 3 and Passkey. The Nitrokey App 2 is for the newer devices.

In case you're not aware of it. The Nitrokey App2 releases have macOS PKG installer files. These aren't signed but should work on macOS. We are working on it to also sign them.

The documentation also describes another method to install the application.

Now to your question about how to compile the application from source.

  1. Install Python, at least version 3.9.
  2. Install Poetry.
  3. Clone the repository.
  4. Change to the repository directory.
  5. make PYTHON="python3.13" init
  6. Either, make build, make build-pyinstaller-onefile, or make build-pyinstaller-onedir.
    • make build builds a Python wheel.
    • make build-pyinstaller-onefile builds a Pyinstaller executable containing all dependencies in one binary.
    • make build-pyinstaller-onedir builds a Pyinstaller executable containing all dependencies in a directory.

You can find the build artifacts in ./dist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants