1{ lib
2, stdenv
3, aiocontextvars
4, buildPythonPackage
5, colorama
6, fetchpatch
7, fetchFromGitHub
8, freezegun
9, mypy
10, pytestCheckHook
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "loguru";
16 # No release since Jan 2022, only master is compatible with Python 3.11
17 # https://github.com/Delgan/loguru/issues/740
18 version = "unstable-2023-01-20";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.5";
22
23 src = fetchFromGitHub {
24 owner = "Delgan";
25 repo = pname;
26 rev = "07f94f3c8373733119f85aa8b9ca05ace3325a4b";
27 hash = "sha256-lMGyQbBX3z6186ojs/iew7JMrG91ivPA679T9r+7xYw=";
28 };
29
30 propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
31 aiocontextvars
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 colorama
37 freezegun
38 mypy
39 ];
40
41 disabledTestPaths = lib.optionals stdenv.isDarwin [
42 "tests/test_multiprocessing.py"
43 ];
44
45 disabledTests = lib.optionals stdenv.isDarwin [
46 "test_rotation_and_retention"
47 "test_rotation_and_retention_timed_file"
48 "test_renaming"
49 "test_await_complete_inheritance"
50 ];
51
52 pythonImportsCheck = [
53 "loguru"
54 ];
55
56 meta = with lib; {
57 homepage = "https://github.com/Delgan/loguru";
58 description = "Python logging made (stupidly) simple";
59 license = licenses.mit;
60 maintainers = with maintainers; [ jakewaksbaum rmcgibbo ];
61 };
62}