From 246013fb25376a2f8131779319123c2fbc5d283b Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Tue, 18 Jul 2023 21:30:54 +0200 Subject: [PATCH] nitrokey-app2: init at 2.1.2 --- pkgs/tools/security/nitrokey-app2/default.nix | 51 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/tools/security/nitrokey-app2/default.nix diff --git a/pkgs/tools/security/nitrokey-app2/default.nix b/pkgs/tools/security/nitrokey-app2/default.nix new file mode 100644 index 000000000000..935838a5d60a --- /dev/null +++ b/pkgs/tools/security/nitrokey-app2/default.nix @@ -0,0 +1,51 @@ +{ lib +, python3 +, fetchFromGitHub +, pynitrokey +, wrapQtAppsHook +}: + +python3.pkgs.buildPythonApplication rec { + pname = "nitrokey-app2"; + version = "2.1.2"; + format = "flit"; + + src = fetchFromGitHub { + owner = "Nitrokey"; + repo = "nitrokey-app2"; + rev = "v${version}"; + hash = "sha256-VyhIFNXxH/FohgjhBeZXoQYppP7PEz+ei0qzsWz1xhk="; + }; + + preBuild = '' + make build-ui + ''; + + nativeBuildInputs = with python3.pkgs; [ + pyqt5 + wrapQtAppsHook + ]; + + dontWrapQtApps = true; + + propagatedBuildInputs = with python3.pkgs; [ + pynitrokey + pyudev + pyqt5 + pyqt5-stubs + qt-material + ]; + + preFixup = '' + wrapQtApp "$out/bin/nitrokeyapp" \ + --set-default CRYPTOGRAPHY_OPENSSL_NO_LEGACY 1 + ''; + + meta = with lib; { + description = "This application allows to manage Nitrokey 3 devices"; + homepage = "https://github.com/Nitrokey/nitrokey-app2"; + license = licenses.asl20; + maintainers = with maintainers; [ _999eagle ]; + mainProgram = "nitrokeyapp"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc3904692e41..375d5de0022e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40922,6 +40922,8 @@ with pkgs; nitrokey-app = libsForQt5.callPackage ../tools/security/nitrokey-app { }; + nitrokey-app2 = libsForQt5.callPackage ../tools/security/nitrokey-app2 { }; + fpm2 = callPackage ../tools/security/fpm2 { }; simplenote = callPackage ../applications/misc/simplenote { };