1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitLab,
5 hatchling,
6 h5py,
7 numpy,
8 scipy,
9 xmltodict,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "pymatreader";
15 version = "1.0.0";
16 pyproject = true;
17
18 src = fetchFromGitLab {
19 owner = "obob";
20 repo = "pymatreader";
21 tag = "v${version}";
22 hash = "sha256-cDEGEvBSj3gmjA+8aXULwuBVk09BLQbA91CNAxgtiLA=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace-fail 'source = "regex_commit"' "" \
28 --replace-fail '"hatch-regex-commit"' ""
29 '';
30
31 build-system = [ hatchling ];
32
33 propagatedBuildInputs = [
34 h5py
35 numpy
36 scipy
37 xmltodict
38 ];
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 pythonImportsCheck = [ "pymatreader" ];
43
44 meta = with lib; {
45 description = "Python package to read all kinds and all versions of Matlab mat files";
46 homepage = "https://gitlab.com/obob/pymatreader/";
47 changelog = "https://gitlab.com/obob/pymatreader/-/blob/${src.rev}/CHANGELOG.md";
48 license = licenses.bsd2;
49 maintainers = with maintainers; [ mbalatsko ];
50 };
51}