2017-02-08 02:41:25 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, pythonPackages
|
|
|
|
, libnotify ? null }:
|
2017-01-26 23:28:40 +00:00
|
|
|
|
|
|
|
pythonPackages.buildPythonApplication rec {
|
|
|
|
version = "3.4.0";
|
|
|
|
name = "gcalcli-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-02-08 02:41:25 +00:00
|
|
|
owner = "insanum";
|
|
|
|
repo = "gcalcli";
|
|
|
|
rev = "v${version}";
|
2017-01-26 23:28:40 +00:00
|
|
|
sha256 = "171awccgnmfv4j7m2my9387sjy60g18kzgvscl6pzdid9fn9rrm8";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
|
|
|
dateutil
|
|
|
|
gflags
|
|
|
|
google_api_python_client
|
|
|
|
httplib2
|
|
|
|
oauth2client
|
|
|
|
parsedatetime
|
|
|
|
six
|
|
|
|
vobject
|
2017-02-08 02:41:25 +00:00
|
|
|
]
|
|
|
|
++ lib.optional (!pythonPackages.isPy3k) futures;
|
|
|
|
|
|
|
|
# there are no tests as of 3.4.0
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = lib.optionalString stdenv.isLinux ''
|
|
|
|
substituteInPlace $out/bin/gcalcli \
|
|
|
|
--replace "command = 'notify-send -u critical -a gcalcli %s'" \
|
|
|
|
"command = '${libnotify}/bin/notify-send -i view-calendar-upcoming-events -u critical -a Calendar %s'"
|
|
|
|
'';
|
2017-01-26 23:28:40 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = https://github.com/insanum/gcalcli;
|
|
|
|
description = "CLI for Google Calendar";
|
|
|
|
license = licenses.mit;
|
2017-02-08 02:41:25 +00:00
|
|
|
maintainers = with maintainers; [ nocoolnametom ];
|
|
|
|
inherit version;
|
2017-01-26 23:28:40 +00:00
|
|
|
};
|
|
|
|
}
|