Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / posthog / default.nix
blob03372065aedd9690a6d4244d9b05a99ca1e57eeb
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 # build inputs
5 , requests
6 , six
7 , monotonic
8 , backoff
9 , python-dateutil
10 # check inputs
11 , pytestCheckHook
12 , mock
13 , freezegun
15 let
16   pname = "posthog";
17   version = "3.5.0";
19 buildPythonPackage {
20   inherit pname version;
21   format = "setuptools";
23   src = fetchFromGitHub {
24     owner = "PostHog";
25     repo = "posthog-python";
26     rev = "refs/tags/v${version}";
27     hash = "sha256-+nYMQxqI9RZ5vVL6KgiRLcx0JHWJTs/rZ6U6jIuaz+w=";
28   };
30   propagatedBuildInputs = [
31     requests
32     six
33     monotonic
34     backoff
35     python-dateutil
36   ];
38   nativeCheckInputs = [
39     pytestCheckHook
40     mock
41     freezegun
42   ];
44   pythonImportsCheck = [
45     "posthog"
46   ];
48   disabledTests = [
49     "test_load_feature_flags_wrong_key"
50     # Tests require network access
51     "test_request"
52     "test_upload"
53   ];
55   meta = with lib; {
56     description = "Official PostHog python library";
57     homepage = "https://github.com/PostHog/posthog-python";
58     changelog = "https://github.com/PostHog/posthog-python/releases/tag/v${version}";
59     license = licenses.mit;
60     maintainers = with maintainers; [ happysalada ];
61   };