summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/picologging/default.nix
blob: 0320c139477a9a2dbb81db65d016aaaf6be16a14 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
  buildPythonPackage,
  lib,
  fetchFromGitHub,
  pytestCheckHook,
  setuptools,
  scikit-build,
  cmake,
  ninja,
  python,
  flaky,
  hypothesis,
}:

buildPythonPackage rec {
  pname = "picologging";
  version = "0.9.4";
  pyproject = true;

  src = fetchFromGitHub {
    # 0.9.4 only release on github
    owner = "microsoft";
    repo = "picologging";
    tag = version;
    hash = "sha256-t75D7aNKAifzeCPwtyKp8LoiXtbbXspRFYnsI0gx+V4=";
  };

  patches = [
    # For python 313
    # https://github.com/microsoft/picologging/pull/212
    ./pr-212.patch
  ];

  build-system = [
    setuptools
    cmake
    scikit-build
    ninja
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  dontUseCmakeConfigure = true;
  __darwinAllowLocalNetworking = true;

  dependencies = [
    flaky
    hypothesis
  ];

  pythonImportsCheck = [ "picologging" ];

  meta = {
    homepage = "https://github.com/microsoft/picologging";
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [ bot-wxt1221 ];
    changelog = "https://github.com/microsoft/picologging/releases/tag/${version}";
    description = "Optimized logging library for Python";
    license = lib.licenses.mit;
  };
}