2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub
|
2020-11-05 01:28:31 +01:00
|
|
|
, 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";
|
|
|
|
};
|
|
|
|
|
2021-06-20 21:53:14 +02:00
|
|
|
postPatch = ''
|
|
|
|
# argparse is part of the standard libary since python 2.7/3.2
|
|
|
|
sed -i '/argparse==1.4.0/d' setup.py
|
|
|
|
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "click==7.1.2" "click" \
|
|
|
|
--replace "pyscard==2.0.0" "pyscard"
|
|
|
|
'';
|
|
|
|
|
2020-11-05 01:28:31 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
enum-compat
|
|
|
|
click
|
|
|
|
pyscard
|
|
|
|
pycountry
|
|
|
|
terminaltables
|
|
|
|
];
|
|
|
|
|
2021-06-20 21:53:14 +02:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-11-05 01:28:31 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-11-05 01:28:31 +01:00
|
|
|
homepage = "https://github.com/russss/python-emv";
|
|
|
|
description = "Implementation of the EMV chip-and-pin smartcard protocol";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lukegb ];
|
|
|
|
};
|
|
|
|
}
|