summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pygelf/default.nix
blob: 339aca863d84501dc05ad74408c7d3dedd8cd478 (plain)
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
48
49
{
  lib,
  buildPythonPackage,
  fetchPypi,
  setuptools,
  mock,
  pytestCheckHook,
  requests,
}:
buildPythonPackage rec {
  pname = "pygelf";
  version = "0.4.3";
  pyproject = true;

  src = fetchPypi {
    pname = "pygelf";
    inherit version;
    hash = "sha256-jtlyVjvjyPFoSD8B2/UitrxpeVnJej9IgTJLP3ljiRE=";
  };

  build-system = [ setuptools ];

  pythonImportsCheck = [ "pygelf" ];

  nativeCheckInputs = [
    mock
    pytestCheckHook
    requests
  ];

  disabledTestPaths = [
    # The fixtures in these files fail to evaluate due to missing files `tests/config/cert.pem` and
    # `tests/config/key.pem`. It suffices to replace them with any self-signed certificate e.g. from
    # `nixos/tests/common/acme/server/snakeoil-certs.nix`, but after resolving that, all of the
    # tests fail anyway with “ConnectionRefusedError: [Errno 111] Connection refused”.
    "tests/test_common_fields.py"
    "tests/test_debug_mode.py"
    "tests/test_dynamic_fields.py"
    "tests/test_queuehandler_support.py"
    "tests/test_static_fields.py"
  ];

  meta = {
    description = "Python logging handlers with GELF (Graylog Extended Log Format) support";
    homepage = "https://github.com/keeprocking/pygelf";
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}