2021-08-22 07:53:02 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, click
|
|
|
|
, ecdsa
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchpatch
|
2021-08-22 07:53:02 +00:00
|
|
|
, fetchPypi
|
|
|
|
, fido2
|
|
|
|
, intelhex
|
|
|
|
, lib
|
|
|
|
, pyserial
|
|
|
|
, pyusb
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "onlykey-solo-python";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.0.32";
|
|
|
|
format = "setuptools";
|
2021-08-22 07:53:02 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-88DuhgX4FCwzIKzw4RqWgMtjRdf5huVlKEHAAEminuQ=";
|
2021-08-22 07:53:02 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "fido2 == 0.9.3" "fido2"
|
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/trustcrypto/onlykey-solo-python/pull/2
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/trustcrypto/onlykey-solo-python/commit/c5a86506f940d4e8fbb670ed665ddca48779cbe9.patch";
|
|
|
|
hash = "sha256-LhCUR5QH9Je/Nr185HgQxfkCtat8W2Huv62zr5Mlrn4=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
propagatedBuildInputs = [ click ecdsa fido2 intelhex pyserial pyusb requests ];
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "solo" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/trustcrypto/onlykey-solo-python";
|
|
|
|
description = "Python library for OnlyKey with Solo FIDO2";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "solo";
|
2021-08-22 07:53:02 +00:00
|
|
|
maintainers = with maintainers; [ kalbasit ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|