2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, certifi
|
|
|
|
, cryptography
|
|
|
|
, ecdsa
|
|
|
|
, pyaes
|
|
|
|
, pyopenssl
|
|
|
|
, pyscard
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysatochip";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.14.2";
|
2021-04-12 18:23:04 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "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"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cryptography ecdsa pyaes pyopenssl pyscard ];
|
|
|
|
|
|
|
|
checkInputs = [ 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 ];
|
|
|
|
};
|
|
|
|
}
|