nixpkgs/pkgs/tools/security/nitrokey-app2/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.4 KiB
Nix
Raw Normal View History

2023-07-18 20:30:54 +01:00
{ lib
, stdenv
2024-02-19 17:54:02 +00:00
, python3
2023-07-18 20:30:54 +01:00
, fetchFromGitHub
, wrapQtAppsHook
, qtbase
, qtwayland
, qtsvg
2023-07-18 20:30:54 +01:00
}:
python3.pkgs.buildPythonApplication rec {
2023-07-18 20:30:54 +01:00
pname = "nitrokey-app2";
version = "2.3.2";
pyproject = true;
disabled = python3.pythonOlder "3.9";
2023-07-18 20:30:54 +01:00
src = fetchFromGitHub {
owner = "Nitrokey";
repo = "nitrokey-app2";
2024-07-28 09:20:17 +01:00
rev = "refs/tags/v${version}";
hash = "sha256-ekVf9ZuLqx7SuiD21iV5c60r7E8kk4jKoYM/T02ETrI=";
2023-07-18 20:30:54 +01:00
};
nativeBuildInputs = with python3.pkgs; [
poetry-core
wrapQtAppsHook
];
buildInputs = [ qtbase ] ++ lib.optionals stdenv.hostPlatform.isLinux [
qtwayland qtsvg
2023-07-18 20:30:54 +01:00
];
propagatedBuildInputs = with python3.pkgs; [
nitrokey
pyside6
2023-07-18 20:30:54 +01:00
qt-material
usb-monitor
2023-07-18 20:30:54 +01:00
];
2024-07-18 15:50:33 +01:00
pythonRelaxDeps = [ "pynitrokey" ];
pythonImportsCheck = [
"nitrokeyapp"
];
postInstall = ''
install -Dm755 meta/com.nitrokey.nitrokey-app2.desktop $out/share/applications/com.nitrokey.nitrokey-app2.desktop
install -Dm755 meta/nk-app2.png $out/share/icons/hicolor/128x128/apps/com.nitrokey.nitrokey-app2.png
'';
2023-07-18 20:30:54 +01:00
meta = with lib; {
description = "This application allows to manage Nitrokey 3 devices";
homepage = "https://github.com/Nitrokey/nitrokey-app2";
changelog = "https://github.com/Nitrokey/nitrokey-app2/releases/tag/v${version}";
2023-07-18 20:30:54 +01:00
license = licenses.asl20;
maintainers = with maintainers; [ _999eagle panicgh ];
2023-07-18 20:30:54 +01:00
mainProgram = "nitrokeyapp";
};
}