1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 textx,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "strpdatetime";
12 version = "0.4.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "RhetTbull";
17 repo = "strpdatetime";
18 tag = "v${version}";
19 hash = "sha256-a+KUM9gQAcNg3ju+YyQXafDlADYCV6B+Wy7EBtcO3S4=";
20 };
21
22 build-system = [ hatchling ];
23
24 dependencies = [ textx ];
25 pythonRelaxDeps = [ "textx" ];
26
27 patches = [ ./fix-locale.patch ];
28
29 pythonImportsCheck = [ "strpdatetime" ];
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 meta = {
33 description = "Parse strings into Python datetime objects";
34 license = lib.licenses.psfl;
35 changelog = "https://github.com/RhetTbull/strpdatetime/blob/${src.tag}/CHANGELOG.md";
36 homepage = "https://github.com/RhetTbull/strpdatetime";
37 maintainers = with lib.maintainers; [ sigmanificient ];
38 };
39}