biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / misc / gcalcli / default.nix
blobc9c29cd8e007f5f1cb27f2ffc8e59968325d1aa3
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   python3Packages,
6   libnotify,
7 }:
9 python3Packages.buildPythonApplication rec {
10   pname = "gcalcli";
11   version = "4.4.0";
12   pyproject = true;
14   src = fetchFromGitHub {
15     owner = "insanum";
16     repo = "gcalcli";
17     rev = "refs/tags/v${version}";
18     hash = "sha256-X9sgnujHMbmrt7cpcBOvTycIKFz3G2QzNDt3me5GUrQ=";
19   };
21   postPatch =
22     ''
23       # dev dependencies
24       substituteInPlace pyproject.toml \
25         --replace-fail "\"google-api-python-client-stubs\"," "" \
26         --replace-fail "\"types-python-dateutil\"," "" \
27         --replace-fail "\"types-requests\"," "" \
28         --replace-fail "\"types-vobject\"," ""
29     ''
30     + lib.optionalString stdenv.hostPlatform.isLinux ''
31       substituteInPlace gcalcli/argparsers.py \
32         --replace-fail "'notify-send" "'${lib.getExe libnotify}"
33     '';
35   build-system = with python3Packages; [ setuptools ];
37   dependencies = with python3Packages; [
38     argcomplete
39     python-dateutil
40     gflags
41     httplib2
42     parsedatetime
43     vobject
44     google-api-python-client
45     google-auth-oauthlib
46     uritemplate
47     libnotify
48   ];
50   nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
52   meta = {
53     description = "CLI for Google Calendar";
54     mainProgram = "gcalcli";
55     homepage = "https://github.com/insanum/gcalcli";
56     license = lib.licenses.mit;
57     maintainers = with lib.maintainers; [ nocoolnametom ];
58   };