1{ lib 2, appdirs 3, buildPythonPackage 4, distro 5, fetchFromGitHub 6, filelock 7, pytestCheckHook 8, pytest-mock 9, pythonOlder 10, requests 11, setuptools-scm 12}: 13 14buildPythonPackage rec { 15 pname = "iterative-telemtry"; 16 version = "0.0.7"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "iterative"; 23 repo = "telemetry-python"; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-n67nc9a/Qrz2v1EYbHZb+pGhuMDqofUMpgfD/0BwqLM="; 26 }; 27 28 SETUPTOOLS_SCM_PRETEND_VERSION = version; 29 30 nativeBuildInputs = [ 31 setuptools-scm 32 ]; 33 34 propagatedBuildInputs = [ 35 requests 36 appdirs 37 filelock 38 distro 39 ]; 40 41 nativeCheckInputs = [ 42 pytestCheckHook 43 pytest-mock 44 ]; 45 46 pythonImportsCheck = [ 47 "iterative_telemetry" 48 ]; 49 50 meta = with lib; { 51 description = "Common library to send usage telemetry"; 52 homepage = "https://github.com/iterative/iterative-telemetry"; 53 changelog = "https://github.com/iterative/iterative-telemetry/releases/tag/${version}"; 54 license = licenses.asl20; 55 maintainers = with maintainers; [ melling ]; 56 }; 57}