From a0916e1ea8761c3e7152ade5cadcc7a58a398e49 Mon Sep 17 00:00:00 2001 From: Gustavo Porto Date: Wed, 31 Aug 2022 13:22:12 +0100 Subject: [PATCH 1/3] feat: add flake and shell.nix --- flake.nix | 9 +++++++++ shell.nix | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 flake.nix create mode 100644 shell.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..aa412577 --- /dev/null +++ b/flake.nix @@ -0,0 +1,9 @@ +{ + description = "gcalcli"; + inputs = { nixpkgs = { url = "nixpkgs/nixos-22.05"; }; }; + outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in { devShells.${system}.default = import ./shell.nix { inherit pkgs; }; }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..c61acde3 --- /dev/null +++ b/shell.nix @@ -0,0 +1,6 @@ +{ pkgs ? import { } }: + +let + python39WithPackages = + (pkgs.python39.withPackages (pythonPackages: with pythonPackages; [ tox ])); +in pkgs.mkShell { buildInputs = [ python39WithPackages ]; } From b9c4e7be0b996458844e8151c4724fae16b1cd0b Mon Sep 17 00:00:00 2001 From: Gustavo Porto Date: Wed, 31 Aug 2022 13:27:45 +0100 Subject: [PATCH 2/3] chore: update shell.nix --- flake.lock | 26 ++++++++++++++++++++++++++ shell.nix | 6 +++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 flake.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..505e18ab --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1661864979, + "narHash": "sha256-ajXYYTE1uoY3ei/P1v+Knklf2QNCBxMtw1gByaPTGU4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a28adc36c20fd2fbaeb06ec9bbd79b6bf7443979", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-22.05", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/shell.nix b/shell.nix index c61acde3..47a90b2e 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,6 @@ { pkgs ? import { } }: let - python39WithPackages = - (pkgs.python39.withPackages (pythonPackages: with pythonPackages; [ tox ])); -in pkgs.mkShell { buildInputs = [ python39WithPackages ]; } + python38WithPackages = + (pkgs.python38.withPackages (pythonPackages: with pythonPackages; [ tox ])); +in pkgs.mkShell { buildInputs = [ python38WithPackages ]; } From f0ba42557aea7770f704c7397ba5b8d8e75280b4 Mon Sep 17 00:00:00 2001 From: Gustavo Porto Date: Wed, 31 Aug 2022 13:28:21 +0100 Subject: [PATCH 3/3] feat: accept nodeclined arg on gcal.Remind --- gcalcli/cli.py | 2 +- gcalcli/gcal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcalcli/cli.py b/gcalcli/cli.py index 99b82dd4..dbb20fcc 100755 --- a/gcalcli/cli.py +++ b/gcalcli/cli.py @@ -227,7 +227,7 @@ def main(): elif parsed_args.command == 'remind': gcal.Remind( parsed_args.minutes, parsed_args.cmd, - use_reminders=parsed_args.use_reminders + parsed_args.nodeclined, use_reminders=parsed_args.use_reminders ) elif parsed_args.command == 'import': diff --git a/gcalcli/gcal.py b/gcalcli/gcal.py index 098357ab..7940af53 100644 --- a/gcalcli/gcal.py +++ b/gcalcli/gcal.py @@ -1368,7 +1368,7 @@ def ModifyEvents(self, work, search_text, start=None, end=None, return self._iterate_events( self.now, event_list, year_date=True, work=work) - def Remind(self, minutes, command, use_reminders=False): + def Remind(self, minutes, command, nodeclined, use_reminders=False): """ Check for events between now and now+minutes.