1{ lib 2, buildPythonPackage 3, click 4, click-completion 5, factory-boy 6, faker 7, fetchPypi 8, inquirer 9, notify-py 10, pbr 11, pendulum 12, ptable 13, pytest-mock 14, pytestCheckHook 15, pythonOlder 16, requests 17, twine 18, validate-email 19}: 20 21buildPythonPackage rec { 22 pname = "toggl-cli"; 23 version = "2.4.3"; 24 format = "setuptools"; 25 26 disabled = pythonOlder "3.6"; 27 28 src = fetchPypi { 29 pname = "togglCli"; 30 inherit version; 31 hash = "sha256-ncMwiMwYivaFu5jrAsm1oCuXP/PZ2ALT+M+CmV6dtFo="; 32 }; 33 34 nativeBuildInputs = [ 35 pbr 36 twine 37 ]; 38 39 propagatedBuildInputs = [ 40 click 41 click-completion 42 inquirer 43 notify-py 44 pbr 45 pendulum 46 ptable 47 requests 48 validate-email 49 ]; 50 51 nativeCheckInputs = [ 52 pytestCheckHook 53 pytest-mock 54 faker 55 factory-boy 56 ]; 57 58 postPatch = '' 59 substituteInPlace requirements.txt \ 60 --replace "notify-py==0.3.3" "notify-py>=0.3.3" \ 61 --replace "click==8.0.3" "click>=8.0.3" \ 62 --replace "pbr==5.8.0" "pbr>=5.8.0" \ 63 --replace "inquirer==2.9.1" "inquirer>=2.9.1" 64 substituteInPlace pytest.ini \ 65 --replace ' --cov toggl -m "not premium"' "" 66 ''; 67 68 preCheck = '' 69 export TOGGL_API_TOKEN=your_api_token 70 export TOGGL_PASSWORD=toggl_password 71 export TOGGL_USERNAME=user@example.com 72 ''; 73 74 disabledTests = [ 75 "integration" 76 "premium" 77 "test_parsing" 78 "test_type_check" 79 "test_now" 80 ]; 81 82 pythonImportsCheck = [ 83 "toggl" 84 ]; 85 86 meta = with lib; { 87 description = "Command line tool and set of Python wrapper classes for interacting with toggl's API"; 88 homepage = "https://toggl.uhlir.dev/"; 89 license = licenses.mit; 90 maintainers = with maintainers; [ mmahut ]; 91 }; 92}