2021-12-30 13:39:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, click
|
|
|
|
, pyscard
|
|
|
|
, pycountry
|
|
|
|
, terminaltables
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-11-30 08:33:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "emv";
|
2021-12-30 13:39:12 +00:00
|
|
|
version = "1.0.14";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
disabled = pythonOlder "3.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "russss";
|
|
|
|
repo = "python-emv";
|
|
|
|
rev = "v${version}";
|
2021-12-30 13:39:12 +00:00
|
|
|
hash = "sha256-MnaeQZ0rA3i0CoUA6HgJQpwk5yo4rm9e+pc5XzRd1eg=";
|
2020-11-30 08:33:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
pyscard
|
|
|
|
pycountry
|
|
|
|
terminaltables
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-11-30 08:33:03 +00:00
|
|
|
|
2021-12-30 13:39:12 +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-13 20:06:32 +00:00
|
|
|
--replace "pyscard==2.0.0" "pyscard" \
|
2022-02-20 05:27:41 +00:00
|
|
|
--replace "pycountry==20.7.3" "pycountry" \
|
2022-01-13 20:06:32 +00:00
|
|
|
--replace "terminaltables==3.1.0" "terminaltables"
|
2021-12-30 13:39:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"emv"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-30 08:33:03 +00:00
|
|
|
description = "Implementation of the EMV chip-and-pin smartcard protocol";
|
2021-12-30 13:39:12 +00:00
|
|
|
homepage = "https://github.com/russss/python-emv";
|
2020-11-30 08:33:03 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lukegb ];
|
|
|
|
};
|
|
|
|
}
|