aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/emv/default.nix
blob: 6dfe39f8b6b1d88303ce49d6388f23597e7fd082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ stdenv, buildPythonPackage, fetchFromGitHub
, click, enum-compat, pyscard, pycountry, terminaltables
, pytestCheckHook, pythonOlder
}:

buildPythonPackage rec {
  pname = "emv";
  version = "1.0.11";
  disabled = pythonOlder "3.4";

  src = fetchFromGitHub {
    owner = "russss";
    repo = "python-emv";
    rev = "v${version}";
    hash = "sha256:1715hcba3fdi0i5awnrjdjnk74p66sxm9349pd8bb717zrh4gpj7";
  };

  checkInputs = [ pytestCheckHook ];
  propagatedBuildInputs = [
    enum-compat
    click
    pyscard
    pycountry
    terminaltables
  ];

  # argparse is part of the standardlib
  prePatch = ''
    substituteInPlace setup.py \
      --replace '"argparse==1.4.0",' ""
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/russss/python-emv";
    description = "Implementation of the EMV chip-and-pin smartcard protocol";
    license = licenses.mit;
    maintainers = with maintainers; [ lukegb ];
  };
}