2021-06-03 21:00:32 +02:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonAtLeast, pythonOlder, click
|
|
|
|
, click-completion, factory_boy, faker, inquirer, notify-py, pbr, pendulum
|
2021-07-20 22:42:24 +02:00
|
|
|
, ptable, pytestCheckHook, pytest-cov, pytest-mock, requests, twine
|
2021-06-03 21:00:32 +02:00
|
|
|
, validate-email }:
|
2019-06-16 14:39:40 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "toggl-cli";
|
2021-06-03 21:00:32 +02:00
|
|
|
version = "2.4.2";
|
2020-10-05 06:33:28 +02:00
|
|
|
disabled = pythonOlder "3.5";
|
2019-06-16 14:39:40 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "togglCli";
|
|
|
|
inherit version;
|
2021-06-03 21:00:32 +02:00
|
|
|
sha256 = "1wgh231r16jyvaj1ch1pajvl9szflb4srs505pfdwdlqvz7rzww8";
|
2019-06-16 14:39:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-06-03 21:00:32 +02:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "notify-py==0.3.1" "notify-py>=0.3.1"
|
2019-06-16 14:39:40 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pbr twine ];
|
2021-07-20 22:42:24 +02:00
|
|
|
checkInputs = [ pbr pytestCheckHook pytest-cov pytest-mock faker factory_boy ];
|
2019-06-16 14:39:40 +02:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export TOGGL_API_TOKEN=your_api_token
|
|
|
|
export TOGGL_PASSWORD=toggl_password
|
|
|
|
export TOGGL_USERNAME=user@example.com
|
|
|
|
'';
|
|
|
|
|
2021-06-03 21:00:32 +02:00
|
|
|
disabledTests = [
|
|
|
|
"integration"
|
|
|
|
"premium"
|
|
|
|
"test_parsing"
|
|
|
|
"test_type_check"
|
|
|
|
"test_now"
|
|
|
|
];
|
|
|
|
|
2019-06-16 14:39:40 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
click-completion
|
2020-10-05 06:33:28 +02:00
|
|
|
inquirer
|
|
|
|
notify-py
|
2019-06-16 14:39:40 +02:00
|
|
|
pendulum
|
|
|
|
ptable
|
|
|
|
requests
|
|
|
|
pbr
|
2020-10-05 06:33:28 +02:00
|
|
|
validate-email
|
2019-06-16 14:39:40 +02:00
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-06-16 14:39:40 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|