Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 brotli, 4 buildPythonPackage, 5 cython, 6 execnet, 7 fetchFromGitHub, 8 jinja2, 9 pytestCheckHook, 10 pythonOlder, 11 pyzmq, 12 redis, 13 setuptools, 14 sqlalchemy, 15}: 16 17buildPythonPackage rec { 18 pname = "logbook"; 19 version = "1.7.0.post0"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "getlogbook"; 26 repo = "logbook"; 27 rev = "refs/tags/${version}"; 28 hash = "sha256-bqfFSd7CPYII/3AJCMApqmAYrAWjecOb3JA17FPFMIc="; 29 }; 30 31 nativeBuildInputs = [ 32 cython 33 setuptools 34 ]; 35 36 passthru.optional-dependencies = { 37 execnet = [ execnet ]; 38 sqlalchemy = [ sqlalchemy ]; 39 redis = [ redis ]; 40 zmq = [ pyzmq ]; 41 compression = [ brotli ]; 42 jinja = [ jinja2 ]; 43 all = [ 44 brotli 45 execnet 46 jinja2 47 pyzmq 48 redis 49 sqlalchemy 50 ]; 51 }; 52 53 nativeCheckInputs = [ 54 pytestCheckHook 55 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 56 57 # Some of the tests use localhost networking. 58 __darwinAllowLocalNetworking = true; 59 60 pythonImportsCheck = [ "logbook" ]; 61 62 disabledTests = [ 63 # Test require Redis instance 64 "test_redis_handler" 65 ]; 66 67 meta = with lib; { 68 description = "Logging replacement for Python"; 69 homepage = "https://logbook.readthedocs.io/"; 70 changelog = "https://github.com/getlogbook/logbook/blob/${version}/CHANGES"; 71 license = licenses.bsd3; 72 maintainers = [ ]; 73 }; 74}