2021-06-03 19:00:32 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonAtLeast, pythonOlder, click
|
|
|
|
, click-completion, factory_boy, faker, inquirer, notify-py, pbr, pendulum
|
|
|
|
, ptable, pytestCheckHook, pytestcov, pytest-mock, requests, twine
|
|
|
|
, validate-email }:
|
2019-06-16 12:39:40 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "toggl-cli";
|
2021-06-03 19:00:32 +00:00
|
|
|
version = "2.4.2";
|
2020-10-05 04:33:28 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2019-06-16 12:39:40 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "togglCli";
|
|
|
|
inherit version;
|
2021-06-03 19:00:32 +00:00
|
|
|
sha256 = "1wgh231r16jyvaj1ch1pajvl9szflb4srs505pfdwdlqvz7rzww8";
|
2019-06-16 12:39:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-06-03 19:00:32 +00:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "notify-py==0.3.1" "notify-py>=0.3.1"
|
2019-06-16 12:39:40 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pbr twine ];
|
2021-06-03 19:00:32 +00:00
|
|
|
checkInputs = [ pbr pytestCheckHook pytestcov pytest-mock faker factory_boy ];
|
2019-06-16 12:39:40 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export TOGGL_API_TOKEN=your_api_token
|
|
|
|
export TOGGL_PASSWORD=toggl_password
|
|
|
|
export TOGGL_USERNAME=user@example.com
|
|
|
|
'';
|
|
|
|
|
2021-06-03 19:00:32 +00:00
|
|
|
disabledTests = [
|
|
|
|
"integration"
|
|
|
|
"premium"
|
|
|
|
"test_parsing"
|
|
|
|
"test_type_check"
|
|
|
|
"test_now"
|
|
|
|
];
|
|
|
|
|
2019-06-16 12:39:40 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
click-completion
|
2020-10-05 04:33:28 +00:00
|
|
|
inquirer
|
|
|
|
notify-py
|
2019-06-16 12:39:40 +00:00
|
|
|
pendulum
|
|
|
|
ptable
|
|
|
|
requests
|
|
|
|
pbr
|
2020-10-05 04:33:28 +00:00
|
|
|
validate-email
|
2019-06-16 12:39:40 +00:00
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-06-16 12:39:40 +00:00
|
|
|
homepage = "https://toggl.uhlir.dev/";
|
|
|
|
description = "Command line tool and set of Python wrapper classes for interacting with toggl's API";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.mmahut ];
|
|
|
|
};
|
|
|
|
}
|