base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12 (#356361)
[NixPkgs.git] / pkgs / tools / security / nitrokey-app2 / default.nix
blobcf35d606189a8a3a4cb09557469cf112abe6fcd0
1 { lib
2 , stdenv
3 , python3
4 , fetchFromGitHub
5 , wrapQtAppsHook
6 , qtbase
7 , qtwayland
8 , qtsvg
9 }:
11 python3.pkgs.buildPythonApplication rec {
12   pname = "nitrokey-app2";
13   version = "2.3.2";
14   pyproject = true;
16   disabled = python3.pythonOlder "3.9";
18   src = fetchFromGitHub {
19     owner = "Nitrokey";
20     repo = "nitrokey-app2";
21     rev = "refs/tags/v${version}";
22     hash = "sha256-ekVf9ZuLqx7SuiD21iV5c60r7E8kk4jKoYM/T02ETrI=";
23   };
25   nativeBuildInputs = with python3.pkgs; [
26     poetry-core
27     wrapQtAppsHook
28   ];
30   buildInputs = [ qtbase ] ++ lib.optionals stdenv.hostPlatform.isLinux [
31     qtwayland qtsvg
32   ];
34   propagatedBuildInputs = with python3.pkgs; [
35     nitrokey
36     pyside6
37     qt-material
38     usb-monitor
39   ];
41   pythonRelaxDeps = [ "pynitrokey" ];
43   pythonImportsCheck = [
44     "nitrokeyapp"
45   ];
47   postInstall = ''
48     install -Dm755 meta/com.nitrokey.nitrokey-app2.desktop $out/share/applications/com.nitrokey.nitrokey-app2.desktop
49     install -Dm755 meta/nk-app2.png $out/share/icons/hicolor/128x128/apps/com.nitrokey.nitrokey-app2.png
50   '';
52   meta = with lib; {
53     description = "This application allows to manage Nitrokey 3 devices";
54     homepage = "https://github.com/Nitrokey/nitrokey-app2";
55     changelog = "https://github.com/Nitrokey/nitrokey-app2/releases/tag/v${version}";
56     license = licenses.asl20;
57     maintainers = with maintainers; [ _999eagle panicgh ];
58     mainProgram = "nitrokeyapp";
59   };