1{ lib 2, buildPythonPackage 3, fetchPypi 4, certifi 5, cryptography 6, ecdsa 7, pyaes 8, pyopenssl 9, pyscard 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "pysatochip"; 15 version = "0.12.3"; 16 disabled = pythonOlder "3.6"; 17 18 src = fetchPypi { 19 inherit pname version; 20 sha256 = "24db358a65c0402c299c0c62efcfbbfc98e494181cd30d3996949ac667d5b4d4"; 21 }; 22 23 postPatch = '' 24 substituteInPlace requirements.txt \ 25 --replace "cryptography==3.3.2" "cryptography" \ 26 --replace "ecdsa==0.15" "ecdsa" \ 27 --replace "pyopenssl==20.0.0" "pyopenssl" 28 ''; 29 30 propagatedBuildInputs = [ cryptography ecdsa pyaes pyopenssl pyscard ]; 31 32 checkInputs = [ certifi ]; 33 34 pythonImportsCheck = [ "pysatochip" ]; 35 36 meta = with lib; { 37 description = "Simple python library to communicate with a Satochip hardware wallet"; 38 homepage = "https://github.com/Toporin/pysatochip"; 39 license = licenses.lgpl3Only; 40 maintainers = with maintainers; [ oxalica ]; 41 }; 42}