Skip to content
Permalink
Browse files

gcalcli: fix notifications on linux

Fix the path to notify-send and add a standard icon to the notification.
  • Loading branch information
peterhoeg committed Mar 28, 2017
1 parent 53a2baa commit 2e959a43f6a873cd7da72973f129c4c90356c4c2
Showing with 15 additions and 6 deletions.
  1. +15 −6 pkgs/applications/misc/gcalcli/default.nix
@@ -1,13 +1,14 @@
{ fetchFromGitHub, lib, pythonPackages }:
{ stdenv, lib, fetchFromGitHub, pythonPackages
, libnotify ? null }:

pythonPackages.buildPythonApplication rec {
version = "3.4.0";
name = "gcalcli-${version}";

src = fetchFromGitHub {
owner = "insanum";
repo = "gcalcli";
rev = "v${version}";
owner = "insanum";
repo = "gcalcli";
rev = "v${version}";
sha256 = "171awccgnmfv4j7m2my9387sjy60g18kzgvscl6pzdid9fn9rrm8";
};

@@ -20,12 +21,20 @@ pythonPackages.buildPythonApplication rec {
parsedatetime
six
vobject
] ++ lib.optional (!pythonPackages.isPy3k) futures;
]
++ lib.optional (!pythonPackages.isPy3k) futures;

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'"
'';

meta = with lib; {
homepage = https://github.com/insanum/gcalcli;
description = "CLI for Google Calendar";
license = licenses.mit;
maintainers = [ maintainers.nocoolnametom ];
maintainers = with maintainers; [ nocoolnametom ];
inherit version;
};
}

0 comments on commit 2e959a4

Please sign in to comment.
You can’t perform that action at this time.