1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, pytestCheckHook 6, wheel 7, flask 8, sanic 9, fastapi 10, uvicorn 11, requests 12}: 13 14buildPythonPackage rec { 15 pname = "json-logging"; 16 version = "1.3.0"; 17 18 src = fetchFromGitHub { 19 owner = "bobbui"; 20 repo = "json-logging-python"; 21 rev = version; 22 hash = "sha256-0eIhOi30r3ApyVkiBdTQps5tNj7rI+q8TjNWxTnhtMQ="; 23 }; 24 patches = [ 25 # Fix tests picking up test modules instead of real packages. 26 (fetchpatch { 27 url = "https://github.com/bobbui/json-logging-python/commit/6fdb64deb42fe48b0b12bda0442fd5ac5f03107f.patch"; 28 sha256 = "sha256-BLfARsw2FdvY22NCaFfdFgL9wTmEZyVIi3CQpB5qU0Y="; 29 }) 30 ]; 31 32 # - Quart is not packaged for Nixpkgs. 33 checkInputs = [ wheel flask /*quart*/ sanic fastapi uvicorn requests pytestCheckHook ]; 34 disabledTests = [ "quart" ]; 35 # Tests spawn servers and try to connect to them. 36 __darwinAllowLocalNetworking = true; 37 38 meta = with lib; { 39 description = "Python library to emit logs in JSON format"; 40 longDescription = '' 41 Python logging library to emit JSON log that can be easily indexed and searchable by logging infrastructure such as ELK, EFK, AWS Cloudwatch, GCP Stackdriver. 42 ''; 43 homepage = "https://github.com/bobbui/json-logging-python"; 44 license = licenses.asl20; 45 maintainers = with maintainers; [ AluisioASG ]; 46 }; 47}