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.2"; 24 format = "setuptools"; 25 26 disabled = pythonOlder "3.6"; 27 28 src = fetchPypi { 29 pname = "togglCli"; 30 inherit version; 31 sha256 = "1wgh231r16jyvaj1ch1pajvl9szflb4srs505pfdwdlqvz7rzww8"; 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 checkInputs = [ 52 pytestCheckHook 53 pytest-mock 54 faker 55 factory_boy 56 ]; 57 58 postPatch = '' 59 substituteInPlace requirements.txt \ 60 --replace "notify-py==0.3.1" "notify-py>=0.3.1" \ 61 --replace "click==7.1.2" "click>=7.1.2" \ 62 --replace "pbr==5.5.1" "pbr>=5.5.1" 63 substituteInPlace pytest.ini \ 64 --replace ' --cov toggl -m "not premium"' "" 65 ''; 66 67 preCheck = '' 68 export TOGGL_API_TOKEN=your_api_token 69 export TOGGL_PASSWORD=toggl_password 70 export TOGGL_USERNAME=user@example.com 71 ''; 72 73 disabledTests = [ 74 "integration" 75 "premium" 76 "test_parsing" 77 "test_type_check" 78 "test_now" 79 ]; 80 81 pythonImportsCheck = [ 82 "toggl" 83 ]; 84 85 meta = with lib; { 86 description = "Command line tool and set of Python wrapper classes for interacting with toggl's API"; 87 homepage = "https://toggl.uhlir.dev/"; 88 license = licenses.mit; 89 maintainers = with maintainers; [ mmahut ]; 90 }; 91}