nixpkgs/pkgs/development/python-modules/emv/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.1 KiB
Nix
Raw Normal View History

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
];
nativeCheckInputs = [
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" \
--replace "pyscard==2.0.0" "pyscard" \
--replace "pycountry==20.7.3" "pycountry" \
--replace "terminaltables==3.1.0" "terminaltables"
2021-12-29 10:43:43 +00:00
'';
pythonImportsCheck = [
"emv"
];
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 ];
};
}