at 24.05-pre 1.1 kB view raw
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 14}: 15let 16 pname = "posthog"; 17 version = "3.0.2"; 18in 19buildPythonPackage { 20 inherit pname version; 21 format = "setuptools"; 22 23 src = fetchFromGitHub { 24 owner = "PostHog"; 25 repo = "posthog-python"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-QASqjphAWtYuIyhbFTYwv1gD+rXvrmp5W0Te4MFn1AA="; 28 }; 29 30 propagatedBuildInputs = [ 31 requests 32 six 33 monotonic 34 backoff 35 python-dateutil 36 ]; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 mock 41 freezegun 42 ]; 43 44 pythonImportsCheck = [ 45 "posthog" 46 ]; 47 48 disabledTests = [ 49 "test_load_feature_flags_wrong_key" 50 # Tests require network access 51 "test_request" 52 "test_upload" 53 ]; 54 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 }; 62}