Merge pull request #336883 from AndrewKvalheim/gcalcli/issue-326353

gcalcli: enable tests
This commit is contained in:
Robert Schütz 2024-08-23 22:05:46 -07:00 committed by GitHub
commit 77e2fa9398
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,32 +1,44 @@
{ stdenv, lib, fetchFromGitHub, python3
, libnotify ? null }:
{
stdenv,
lib,
fetchFromGitHub,
python3Packages,
libnotify,
}:
with python3.pkgs;
buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
pname = "gcalcli";
version = "4.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "insanum";
repo = pname;
rev = "v${version}";
sha256 = "0s5fhcmz3n0dwh3vkqr4aigi59q43v03ch5jhh6v75149icwr0df";
owner = "insanum";
repo = "gcalcli";
rev = "refs/tags/v${version}";
hash = "sha256-roHMWUwklLMNhLJANsAeBKcSX1Qk47kH5A3Y8SuDrmg=";
};
postPatch = lib.optionalString stdenv.isLinux ''
substituteInPlace gcalcli/argparsers.py \
--replace "'notify-send" "'${libnotify}/bin/notify-send"
--replace-fail "'notify-send" "'${lib.getExe libnotify}"
'';
propagatedBuildInputs = [
python-dateutil gflags httplib2 parsedatetime six vobject
google-api-python-client oauth2client uritemplate
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
python-dateutil
gflags
httplib2
parsedatetime
six
vobject
google-api-python-client
oauth2client
uritemplate
libnotify
];
# There are no tests as of 4.0.0a4
doCheck = false;
nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
meta = with lib; {
description = "CLI for Google Calendar";