1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6, pyyaml
7, setuptools
8}:
9
10buildPythonPackage rec {
11 pname = "mt-940";
12 version = "4.30.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "wolph";
19 repo = "mt940";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-t6FOMu+KcEib+TZAv5uVAzvrUSt/k/RQn28jpdAY5Y0=";
22 };
23
24 postPatch = ''
25 sed -i "/--cov/d" pytest.ini
26 sed -i "/--no-cov/d" pytest.ini
27 '';
28
29 nativeBuildInputs = [
30 setuptools
31 ];
32
33 nativeCheckInputs = [
34 pyyaml
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [
39 "mt940"
40 ];
41
42 meta = with lib; {
43 description = "Module to parse MT940 files and returns smart Python collections for statistics and manipulation";
44 homepage = "https://github.com/WoLpH/mt940";
45 changelog = "https://github.com/wolph/mt940/releases/tag/v${version}";
46 license = licenses.bsd3;
47 maintainers = with maintainers; [ ];
48 };
49}