nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, aiocontextvars
4, buildPythonPackage
5, colorama
6, fetchpatch
7, fetchPypi
8, pytestCheckHook
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "loguru";
14 version = "0.6.0";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.5";
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "sha256-BmvQZ1jQpRPpg2/ZxrWnW/s/02hB9LmWvGC1R6MJ1Bw=";
22 };
23
24 propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
25 aiocontextvars
26 ];
27
28 checkInputs = [
29 pytestCheckHook
30 colorama
31 ];
32
33 disabledTestPaths = lib.optionals stdenv.isDarwin [
34 "tests/test_multiprocessing.py"
35 ];
36
37 disabledTests = [
38 "test_time_rotation_reopening"
39 "test_file_buffering"
40 # Tests are failing with Python 3.10
41 "test_exception_others"
42 ""
43 ] ++ lib.optionals stdenv.isDarwin [
44 "test_rotation_and_retention"
45 "test_rotation_and_retention_timed_file"
46 "test_renaming"
47 "test_await_complete_inheritance"
48 ];
49
50 pythonImportsCheck = [
51 "loguru"
52 ];
53
54 meta = with lib; {
55 homepage = "https://github.com/Delgan/loguru";
56 description = "Python logging made (stupidly) simple";
57 license = licenses.mit;
58 maintainers = with maintainers; [ jakewaksbaum rmcgibbo ];
59 };
60}