From 42d1ad0b9f28dd8794831300c0ae792513ec05ba Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Tue, 5 Dec 2023 16:50:35 +0100 Subject: [PATCH] pynitrokey: convert to Python package Make pynitrokey a Python package, so that it can be used from different Python versions. --- .../python-modules}/pynitrokey/default.nix | 4 ++-- pkgs/tools/security/nitrokey-app2/default.nix | 1 - pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 2 ++ 4 files changed, 5 insertions(+), 4 deletions(-) rename pkgs/{tools/security => development/python-modules}/pynitrokey/default.nix (97%) diff --git a/pkgs/tools/security/pynitrokey/default.nix b/pkgs/development/python-modules/pynitrokey/default.nix similarity index 97% rename from pkgs/tools/security/pynitrokey/default.nix rename to pkgs/development/python-modules/pynitrokey/default.nix index 2d1979c1b0c1..4d91dc586c19 100644 --- a/pkgs/tools/security/pynitrokey/default.nix +++ b/pkgs/development/python-modules/pynitrokey/default.nix @@ -1,5 +1,5 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchPypi , pythonRelaxDepsHook , installShellFiles @@ -34,7 +34,7 @@ let mainProgram = "nitropy"; in -buildPythonApplication { +buildPythonPackage { inherit pname version; pyproject = true; diff --git a/pkgs/tools/security/nitrokey-app2/default.nix b/pkgs/tools/security/nitrokey-app2/default.nix index a3e3a82ec234..15e756a7053b 100644 --- a/pkgs/tools/security/nitrokey-app2/default.nix +++ b/pkgs/tools/security/nitrokey-app2/default.nix @@ -1,7 +1,6 @@ { lib , python3 , fetchFromGitHub -, pynitrokey , wrapQtAppsHook }: diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 187435820708..ff7e10037251 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -41698,7 +41698,7 @@ with pkgs; xrq = callPackage ../applications/misc/xrq { }; - pynitrokey = python3Packages.callPackage ../tools/security/pynitrokey { }; + pynitrokey = with python3Packages; toPythonApplication pynitrokey; nitrokey-app = libsForQt5.callPackage ../tools/security/nitrokey-app { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e965fe2441f2..4eb7a74997a2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9312,6 +9312,8 @@ self: super: with self; { pyngrok = callPackage ../development/python-modules/pyngrok { }; + pynitrokey = callPackage ../development/python-modules/pynitrokey { }; + pynndescent = callPackage ../development/python-modules/pynndescent { }; pynobo = callPackage ../development/python-modules/pynobo { };