nitrokey-app2: pin cryptography

This commit is contained in:
Robert Schütz 2024-02-19 09:54:02 -08:00
parent 607a7c79aa
commit 9e37aaffb6
2 changed files with 30 additions and 12 deletions

View File

@ -1,20 +1,38 @@
{ lib { lib
, buildPythonApplication , python3
, fetchPypi
, rustPlatform
, fetchFromGitHub , fetchFromGitHub
, pythonOlder
, pyside6
, poetry-core
, pynitrokey
, pyudev
, qt-material
}: }:
buildPythonApplication rec { let
python = python3.override {
packageOverrides = self: super: {
# https://github.com/nxp-mcuxpresso/spsdk/issues/64
cryptography = super.cryptography.overridePythonAttrs (old: rec {
version = "41.0.7";
src = fetchPypi {
inherit (old) pname;
inherit version;
hash = "sha256-E/k86b6oAWwlOzSvxr1qdZk+XEBnLtVAWpyDLw1KALw=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
sourceRoot = "${old.pname}-${version}/${old.cargoRoot}";
name = "${old.pname}-${version}";
hash = "sha256-VeZhKisCPDRvmSjGNwCgJJeVj65BZ0Ge+yvXbZw86Rw=";
};
patches = [ ];
doCheck = false; # would require overriding cryptography-vectors
});
};
};
in python.pkgs.buildPythonApplication rec {
pname = "nitrokey-app2"; pname = "nitrokey-app2";
version = "2.1.5"; version = "2.1.5";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = python.pythonOlder "3.9";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Nitrokey"; owner = "Nitrokey";
@ -31,11 +49,11 @@ buildPythonApplication rec {
substituteInPlace pyproject.toml --replace 'pynitrokey = "' 'pynitrokey = ">=' substituteInPlace pyproject.toml --replace 'pynitrokey = "' 'pynitrokey = ">='
''; '';
nativeBuildInputs = [ nativeBuildInputs = with python.pkgs; [
poetry-core poetry-core
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = with python.pkgs; [
pynitrokey pynitrokey
pyudev pyudev
pyside6 pyside6

View File

@ -41481,7 +41481,7 @@ with pkgs;
nitrokey-app = libsForQt5.callPackage ../tools/security/nitrokey-app { }; nitrokey-app = libsForQt5.callPackage ../tools/security/nitrokey-app { };
nitrokey-app2 = python3Packages.callPackage ../tools/security/nitrokey-app2 { }; nitrokey-app2 = callPackage ../tools/security/nitrokey-app2 { };
fpm2 = callPackage ../tools/security/fpm2 { }; fpm2 = callPackage ../tools/security/fpm2 { };