nixpkgs/pkgs/by-name/gc/gcalcli/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.4 KiB
Nix
Raw Normal View History

2024-08-23 21:36:23 +00:00
{
stdenv,
lib,
fetchFromGitHub,
python3Packages,
libnotify,
2024-08-23 21:36:23 +00:00
}:
2017-01-26 23:28:40 +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";
pyproject = true;
2017-01-26 23:28:40 +00:00
src = fetchFromGitHub {
2024-08-23 21:36:23 +00:00
owner = "insanum";
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
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
];
nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
2024-09-05 15:23:29 +00:00
meta = {
2017-01-26 23:28:40 +00:00
description = "CLI for Google Calendar";
mainProgram = "gcalcli";
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
};
}