1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6}:
7
8buildPythonPackage rec {
9 pname = "luhn";
10 version = "0.2.0";
11 format = "setuptools";
12
13 src = fetchFromGitHub {
14 owner = "mmcloughlin";
15 repo = "luhn";
16 rev = version;
17 hash = "sha256-ZifaCjOVhWdXuzi5n6V+6eVN5vrEHKgUdpSOXoMyR18=";
18 };
19
20 nativeCheckInputs = [ pytestCheckHook ];
21
22 enabledTestPaths = [ "test.py" ];
23
24 pythonImportsCheck = [ "luhn" ];
25
26 meta = with lib; {
27 description = "Python module for generate and verify Luhn check digits";
28 homepage = "https://github.com/mmcloughlin/luhn";
29 license = with licenses; [ mit ];
30 maintainers = with maintainers; [ fab ];
31 };
32}