2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, click-completion
|
2023-10-19 13:55:26 +00:00
|
|
|
, factory-boy
|
2021-12-06 16:07:01 +00:00
|
|
|
, faker
|
|
|
|
, fetchPypi
|
|
|
|
, inquirer
|
|
|
|
, notify-py
|
|
|
|
, pbr
|
|
|
|
, pendulum
|
|
|
|
, ptable
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, twine
|
|
|
|
, validate-email
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "toggl-cli";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "2.4.3";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "togglCli";
|
|
|
|
inherit version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-ncMwiMwYivaFu5jrAsm1oCuXP/PZ2ALT+M+CmV6dtFo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pbr
|
|
|
|
twine
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
click-completion
|
|
|
|
inquirer
|
|
|
|
notify-py
|
|
|
|
pbr
|
|
|
|
pendulum
|
|
|
|
ptable
|
|
|
|
requests
|
|
|
|
validate-email
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
faker
|
2023-10-19 13:55:26 +00:00
|
|
|
factory-boy
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2021-06-06 07:54:09 +00:00
|
|
|
substituteInPlace requirements.txt \
|
2022-12-17 10:02:37 +00:00
|
|
|
--replace "notify-py==0.3.3" "notify-py>=0.3.3" \
|
2022-04-15 01:41:22 +00:00
|
|
|
--replace "click==8.0.3" "click>=8.0.3" \
|
|
|
|
--replace "pbr==5.8.0" "pbr>=5.8.0" \
|
|
|
|
--replace "inquirer==2.9.1" "inquirer>=2.9.1"
|
2021-12-06 16:07:01 +00:00
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace ' --cov toggl -m "not premium"' ""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export TOGGL_API_TOKEN=your_api_token
|
|
|
|
export TOGGL_PASSWORD=toggl_password
|
|
|
|
export TOGGL_USERNAME=user@example.com
|
|
|
|
'';
|
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
disabledTests = [
|
|
|
|
"integration"
|
|
|
|
"premium"
|
|
|
|
"test_parsing"
|
|
|
|
"test_type_check"
|
|
|
|
"test_now"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"toggl"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Command line tool and set of Python wrapper classes for interacting with toggl's API";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://toggl.uhlir.dev/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ mmahut ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|