-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
/
default.nix
47 lines (43 loc) · 1.33 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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 ];
};
}