at 22.05-pre 1.0 kB view raw
1{ lib, buildPythonPackage, fetchFromGitHub 2, click, enum-compat, pyscard, pycountry, terminaltables 3, pytestCheckHook, pythonOlder 4}: 5 6buildPythonPackage rec { 7 pname = "emv"; 8 version = "1.0.11"; 9 disabled = pythonOlder "3.4"; 10 11 src = fetchFromGitHub { 12 owner = "russss"; 13 repo = "python-emv"; 14 rev = "v${version}"; 15 hash = "sha256:1715hcba3fdi0i5awnrjdjnk74p66sxm9349pd8bb717zrh4gpj7"; 16 }; 17 18 postPatch = '' 19 # argparse is part of the standard libary since python 2.7/3.2 20 sed -i '/argparse==1.4.0/d' setup.py 21 22 substituteInPlace setup.py \ 23 --replace "click==7.1.2" "click" \ 24 --replace "pyscard==2.0.0" "pyscard" 25 ''; 26 27 propagatedBuildInputs = [ 28 enum-compat 29 click 30 pyscard 31 pycountry 32 terminaltables 33 ]; 34 35 checkInputs = [ 36 pytestCheckHook 37 ]; 38 39 meta = with lib; { 40 homepage = "https://github.com/russss/python-emv"; 41 description = "Implementation of the EMV chip-and-pin smartcard protocol"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ lukegb ]; 44 }; 45}