2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
certifi,
|
|
|
|
cryptography,
|
|
|
|
ecdsa,
|
|
|
|
pyaes,
|
|
|
|
pyopenssl,
|
|
|
|
pyscard,
|
|
|
|
pythonOlder,
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysatochip";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.14.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-04-12 18:23:04 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-+Z3D6ITZouhLbEotvJ9MDfg6QOhjGVKrLi1QL1kOdkE=";
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "cryptography==3.3.2" "cryptography" \
|
|
|
|
--replace "ecdsa==0.15" "ecdsa" \
|
|
|
|
--replace "pyopenssl==20.0.0" "pyopenssl"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
ecdsa
|
|
|
|
pyaes
|
|
|
|
pyopenssl
|
|
|
|
pyscard
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ certifi ];
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "pysatochip" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple python library to communicate with a Satochip hardware wallet";
|
|
|
|
homepage = "https://github.com/Toporin/pysatochip";
|
|
|
|
license = licenses.lgpl3Only;
|
|
|
|
maintainers = with maintainers; [ oxalica ];
|
|
|
|
};
|
|
|
|
}
|