1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 mock,
7 pytestCheckHook,
8 requests,
9}:
10buildPythonPackage rec {
11 pname = "pygelf";
12 version = "0.4.3";
13 pyproject = true;
14
15 src = fetchPypi {
16 pname = "pygelf";
17 inherit version;
18 hash = "sha256-jtlyVjvjyPFoSD8B2/UitrxpeVnJej9IgTJLP3ljiRE=";
19 };
20
21 build-system = [ setuptools ];
22
23 pythonImportsCheck = [ "pygelf" ];
24
25 nativeCheckInputs = [
26 mock
27 pytestCheckHook
28 requests
29 ];
30
31 disabledTestPaths = [
32 # The fixtures in these files fail to evaluate due to missing files `tests/config/cert.pem` and
33 # `tests/config/key.pem`. It suffices to replace them with any self-signed certificate e.g. from
34 # `nixos/tests/common/acme/server/snakeoil-certs.nix`, but after resolving that, all of the
35 # tests fail anyway with “ConnectionRefusedError: [Errno 111] Connection refused”.
36 "tests/test_common_fields.py"
37 "tests/test_debug_mode.py"
38 "tests/test_dynamic_fields.py"
39 "tests/test_queuehandler_support.py"
40 "tests/test_static_fields.py"
41 ];
42
43 meta = {
44 description = "Python logging handlers with GELF (Graylog Extended Log Format) support";
45 homepage = "https://github.com/keeprocking/pygelf";
46 license = lib.licenses.bsd3;
47 maintainers = with lib.maintainers; [ ];
48 };
49}