biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / emv / default.nix
blob69d3a9ef910e87c8a579d2e46688754ec3a723d7
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   click,
6   pyscard,
7   pycountry,
8   terminaltables,
9   pytestCheckHook,
10   setuptools,
11   pythonOlder,
14 buildPythonPackage rec {
15   pname = "emv";
16   version = "1.0.14";
17   pyproject = true;
19   disabled = pythonOlder "3.7";
21   src = fetchFromGitHub {
22     owner = "russss";
23     repo = "python-emv";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-MnaeQZ0rA3i0CoUA6HgJQpwk5yo4rm9e+pc5XzRd1eg=";
26   };
28   postPatch = ''
29     substituteInPlace setup.py \
30       --replace-fail '"enum-compat==0.0.3",' "" \
31       --replace-fail '"argparse==1.4.0",' "" \
32       --replace-fail "click==7.1.2" "click" \
33       --replace-fail "pyscard==2.0.0" "pyscard" \
34       --replace-fail "pycountry==20.7.3" "pycountry" \
35       --replace-fail "terminaltables==3.1.0" "terminaltables"
36   '';
38   build-system = [ setuptools ];
40   dependencies = [
41     click
42     pyscard
43     pycountry
44     terminaltables
45   ];
47   nativeCheckInputs = [ pytestCheckHook ];
49   pythonImportsCheck = [ "emv" ];
51   meta = with lib; {
52     description = "Implementation of the EMV chip-and-pin smartcard protocol";
53     homepage = "https://github.com/russss/python-emv";
54     changelog = "https://github.com/russss/python-emv/releases/tag/v${version}";
55     license = licenses.mit;
56     maintainers = with maintainers; [ lukegb ];
57     mainProgram = "emvtool";
58   };