python3Packages.ctap-keyring-device: fix build override fido2 dependency

This commit is contained in:
JB Gosselin 2024-08-28 15:17:48 -04:00
parent 945fe9d494
commit 422d5611d1
No known key found for this signature in database

View File

@ -4,28 +4,40 @@
fetchPypi,
setuptools-scm,
# install requirements
six,
fido2,
keyring,
cryptography,
# test requirements
pytestCheckHook,
unittestCheckHook,
mock,
}:
let
fido2_0 = fido2.overridePythonAttrs (oldAttrs: rec {
version = "0.9.3";
format = "setuptools";
src = fetchPypi {
inherit (oldAttrs) pname;
inherit version;
hash = "sha256-tF6JphCc/Lfxu1E3dqotZAjpXEgi+DolORi5RAg0Zuw=";
};
postPatch = ''
substituteInPlace setup.py test/test_attestation.py \
--replace-fail "distutils.version" "setuptools._distutils.version"
'';
build-system = [ setuptools-scm ];
dependencies = oldAttrs.dependencies ++ [ six ];
nativeCheckInputs = [
unittestCheckHook
mock
];
});
in
buildPythonPackage rec {
pname = "ctap-keyring-device";
version = "1.0.6";
format = "setuptools";
pyproject = true;
src = fetchPypi {
inherit version pname;
@ -38,16 +50,14 @@ buildPythonPackage rec {
--replace "--flake8 --black --cov" ""
'';
nativeBuildInputs = [
setuptools-scm
];
pythonRemoveDeps = [
# This is a darwin requirement missing pyobjc
"pyobjc-framework-LocalAuthentication"
];
propagatedBuildInputs = [
build-system = [ setuptools-scm ];
dependencies = [
keyring
fido2_0
cryptography
@ -55,7 +65,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "ctap_keyring_device" ];
checkInputs = [ pytestCheckHook ];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# Disabled tests that needs pyobjc or windows