2021-12-29 10:43:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, click
|
|
|
|
, pyscard
|
|
|
|
, pycountry
|
|
|
|
, terminaltables
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-11-05 00:28:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "emv";
|
2021-12-29 10:43:43 +00:00
|
|
|
version = "1.0.14";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2020-11-05 00:28:31 +00:00
|
|
|
disabled = pythonOlder "3.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "russss";
|
|
|
|
repo = "python-emv";
|
|
|
|
rev = "v${version}";
|
2021-12-29 10:43:43 +00:00
|
|
|
hash = "sha256-MnaeQZ0rA3i0CoUA6HgJQpwk5yo4rm9e+pc5XzRd1eg=";
|
2020-11-05 00:28:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
pyscard
|
|
|
|
pycountry
|
|
|
|
terminaltables
|
|
|
|
];
|
|
|
|
|
2021-06-20 20:53:14 +01:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-11-05 00:28:31 +00:00
|
|
|
|
2021-12-29 10:43:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"enum-compat==0.0.3",' "" \
|
|
|
|
--replace '"argparse==1.4.0",' "" \
|
|
|
|
--replace "click==7.1.2" "click" \
|
2022-01-12 10:15:04 +00:00
|
|
|
--replace "pyscard==2.0.0" "pyscard" \
|
2022-02-15 13:35:46 +00:00
|
|
|
--replace "pycountry==20.7.3" "pycountry" \
|
2022-01-12 10:15:04 +00:00
|
|
|
--replace "terminaltables==3.1.0" "terminaltables"
|
2021-12-29 10:43:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"emv"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-11-05 00:28:31 +00:00
|
|
|
description = "Implementation of the EMV chip-and-pin smartcard protocol";
|
2021-12-29 10:43:43 +00:00
|
|
|
homepage = "https://github.com/russss/python-emv";
|
2020-11-05 00:28:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lukegb ];
|
|
|
|
};
|
|
|
|
}
|