nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 56 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 click, 6 pyscard, 7 pycountry, 8 terminaltables, 9 pytestCheckHook, 10 setuptools, 11}: 12 13buildPythonPackage rec { 14 pname = "emv"; 15 version = "1.0.14"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "russss"; 20 repo = "python-emv"; 21 tag = "v${version}"; 22 hash = "sha256-MnaeQZ0rA3i0CoUA6HgJQpwk5yo4rm9e+pc5XzRd1eg="; 23 }; 24 25 postPatch = '' 26 substituteInPlace setup.py \ 27 --replace-fail '"enum-compat==0.0.3",' "" \ 28 --replace-fail '"argparse==1.4.0",' "" \ 29 --replace-fail "click==7.1.2" "click" \ 30 --replace-fail "pyscard==2.0.0" "pyscard" \ 31 --replace-fail "pycountry==20.7.3" "pycountry" \ 32 --replace-fail "terminaltables==3.1.0" "terminaltables" 33 ''; 34 35 build-system = [ setuptools ]; 36 37 dependencies = [ 38 click 39 pyscard 40 pycountry 41 terminaltables 42 ]; 43 44 nativeCheckInputs = [ pytestCheckHook ]; 45 46 pythonImportsCheck = [ "emv" ]; 47 48 meta = { 49 description = "Implementation of the EMV chip-and-pin smartcard protocol"; 50 homepage = "https://github.com/russss/python-emv"; 51 changelog = "https://github.com/russss/python-emv/releases/tag/v${version}"; 52 license = lib.licenses.mit; 53 maintainers = with lib.maintainers; [ lukegb ]; 54 mainProgram = "emvtool"; 55 }; 56}