nix/pkgs: init python-emv at 1.0.9

This commit is contained in:
Luke Granger-Brown 2020-11-05 00:44:17 +00:00
parent cc5152300c
commit fb6544f158
2 changed files with 40 additions and 0 deletions

View file

@ -11,4 +11,5 @@ args: {
copybara = import ./copybara.nix args;
hg-git = import ./hg-git.nix args;
erbium = import ./erbium args;
python-emv = import ./python-emv.nix args;
} // (import ./heptapod-runner.nix args)

39
nix/pkgs/python-emv.nix Normal file
View file

@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
{ pkgs, ... }:
with pkgs;
with pkgs.python3Packages;
buildPythonPackage rec {
pname = "python-emv";
version = "1.0.9";
src = fetchFromGitHub {
owner = "russss";
repo = "python-emv";
rev = "v${version}";
hash = "sha256:1ldibcy1wgnaimf8ri79lg8im1mhfqajrigfflvizw0hb0ivh8al";
};
checkInputs = [ pytestCheckHook unittest2 ];
propagatedBuildInputs = [
enum-compat
click
pyscard
pycountry
terminaltables
];
# argparse is part of the standardlib
prePatch = ''
substituteInPlace setup.py --replace '"argparse",' ""
'';
meta = with stdenv.lib; {
homepage = "https://github.com/russss/python-emv";
description = "A Python implementation of the EMV smartcard protocol, used for chip-and-PIN payments";
license = licenses.mit;
maintainers = with maintainers; [ lukegb ];
};
}