2024-08-23 21:36:23 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
2024-08-24 01:45:48 +00:00
|
|
|
python3Packages,
|
|
|
|
libnotify,
|
2024-08-23 21:36:23 +00:00
|
|
|
}:
|
2017-01-26 23:28:40 +00:00
|
|
|
|
2024-08-24 01:45:48 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2019-02-11 22:10:39 +00:00
|
|
|
pname = "gcalcli";
|
2024-09-05 15:23:29 +00:00
|
|
|
version = "4.4.0";
|
2024-08-24 01:45:48 +00:00
|
|
|
pyproject = true;
|
2017-01-26 23:28:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-08-23 21:36:23 +00:00
|
|
|
owner = "insanum";
|
2024-08-24 01:45:48 +00:00
|
|
|
repo = "gcalcli";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-05 15:23:29 +00:00
|
|
|
hash = "sha256-X9sgnujHMbmrt7cpcBOvTycIKFz3G2QzNDt3me5GUrQ=";
|
2017-01-26 23:28:40 +00:00
|
|
|
};
|
|
|
|
|
2024-09-05 15:23:29 +00:00
|
|
|
postPatch =
|
|
|
|
''
|
|
|
|
# dev dependencies
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "\"google-api-python-client-stubs\"," "" \
|
|
|
|
--replace-fail "\"types-python-dateutil\"," "" \
|
|
|
|
--replace-fail "\"types-requests\"," "" \
|
|
|
|
--replace-fail "\"types-vobject\"," ""
|
|
|
|
''
|
|
|
|
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
|
|
|
substituteInPlace gcalcli/argparsers.py \
|
|
|
|
--replace-fail "'notify-send" "'${lib.getExe libnotify}"
|
|
|
|
'';
|
2019-02-11 22:10:39 +00:00
|
|
|
|
2024-08-24 01:45:48 +00:00
|
|
|
build-system = with python3Packages; [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = with python3Packages; [
|
2024-09-05 15:23:29 +00:00
|
|
|
argcomplete
|
2024-08-23 21:36:23 +00:00
|
|
|
python-dateutil
|
|
|
|
gflags
|
|
|
|
httplib2
|
|
|
|
parsedatetime
|
|
|
|
vobject
|
|
|
|
google-api-python-client
|
2024-09-05 15:23:29 +00:00
|
|
|
google-auth-oauthlib
|
2024-08-23 21:36:23 +00:00
|
|
|
uritemplate
|
2019-04-30 09:14:11 +00:00
|
|
|
libnotify
|
2021-03-25 08:11:39 +00:00
|
|
|
];
|
2017-02-08 02:41:25 +00:00
|
|
|
|
2024-08-24 01:45:48 +00:00
|
|
|
nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
|
2018-04-29 04:34:38 +00:00
|
|
|
|
2024-09-05 15:23:29 +00:00
|
|
|
meta = {
|
2017-01-26 23:28:40 +00:00
|
|
|
description = "CLI for Google Calendar";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "gcalcli";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/insanum/gcalcli";
|
2024-09-05 15:23:29 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ nocoolnametom ];
|
2017-01-26 23:28:40 +00:00
|
|
|
};
|
|
|
|
}
|