Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.14.2"; 16 disabled = pythonOlder "3.6"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-+Z3D6ITZouhLbEotvJ9MDfg6QOhjGVKrLi1QL1kOdkE="; 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 nativeCheckInputs = [ 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}