mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
python3Packages.ctap-keyring-device: fix build override fido2 dependency
This commit is contained in:
parent
945fe9d494
commit
422d5611d1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user