summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/json-logging
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
committerRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
commit4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch)
treee2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/json-logging
parentjq: fix build with structured-attrs on darwin (diff)
parentMerge pull request #123802 from superherointj/package-virtmanager-bugfix (diff)
downloadnixpkgs-origin/structured-attrs.tar.gz
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/json-logging')
-rw-r--r--pkgs/development/python-modules/json-logging/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/json-logging/default.nix b/pkgs/development/python-modules/json-logging/default.nix
new file mode 100644
index 000000000000..1f4425a3e112
--- /dev/null
+++ b/pkgs/development/python-modules/json-logging/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, fetchpatch
+, pytestCheckHook
+, wheel
+, flask
+, sanic
+, fastapi
+, uvicorn
+, requests
+}:
+
+buildPythonPackage rec {
+ pname = "json-logging";
+ version = "1.3.0";
+
+ src = fetchFromGitHub {
+ owner = "bobbui";
+ repo = "json-logging-python";
+ rev = version;
+ hash = "sha256-0eIhOi30r3ApyVkiBdTQps5tNj7rI+q8TjNWxTnhtMQ=";
+ };
+ patches = [
+ # Fix tests picking up test modules instead of real packages.
+ (fetchpatch {
+ url = "https://github.com/bobbui/json-logging-python/commit/6fdb64deb42fe48b0b12bda0442fd5ac5f03107f.patch";
+ sha256 = "sha256-BLfARsw2FdvY22NCaFfdFgL9wTmEZyVIi3CQpB5qU0Y=";
+ })
+ ];
+
+ # - Quart is not packaged for Nixpkgs.
+ checkInputs = [ wheel flask /*quart*/ sanic fastapi uvicorn requests pytestCheckHook ];
+ disabledTests = [ "quart" ];
+ # Tests spawn servers and try to connect to them.
+ __darwinAllowLocalNetworking = true;
+
+ meta = with lib; {
+ description = "Python library to emit logs in JSON format";
+ longDescription = ''
+ 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.
+ '';
+ homepage = "https://github.com/bobbui/json-logging-python";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ AluisioASG ];
+ };
+}