diff options
author | Peter Hoeg <peter@speartail.com> | 2017-02-08 10:41:25 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2017-03-30 09:04:32 +0800 |
commit | f67ec45de6cd503d175c46c74465c72c61846984 (patch) | |
tree | c014e0a98429e6a6d9a267ca40cd173f7a82b5fa /pkgs/applications/misc/gcalcli | |
parent | 53a2baabbeb29ce0180b0353deb623139f1808bd (diff) | |
download | nixpkgs-f67ec45de6cd503d175c46c74465c72c61846984.tar nixpkgs-f67ec45de6cd503d175c46c74465c72c61846984.tar.gz nixpkgs-f67ec45de6cd503d175c46c74465c72c61846984.tar.bz2 nixpkgs-f67ec45de6cd503d175c46c74465c72c61846984.tar.lz nixpkgs-f67ec45de6cd503d175c46c74465c72c61846984.tar.xz nixpkgs-f67ec45de6cd503d175c46c74465c72c61846984.tar.zst nixpkgs-f67ec45de6cd503d175c46c74465c72c61846984.zip |
gcalcli: fix notifications on linux
Couple of things: - fix the path to notify-send - add a standard icon to the notification - rename the notification from "gcalcli" to "Calendar" Lastly, there are no tests, so do not try to run them.
Diffstat (limited to 'pkgs/applications/misc/gcalcli')
-rw-r--r-- | pkgs/applications/misc/gcalcli/default.nix | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/pkgs/applications/misc/gcalcli/default.nix b/pkgs/applications/misc/gcalcli/default.nix index 7560a8bfeb4..d3ba5a97333 100644 --- a/pkgs/applications/misc/gcalcli/default.nix +++ b/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,23 @@ pythonPackages.buildPythonApplication rec { parsedatetime six vobject - ] ++ lib.optional (!pythonPackages.isPy3k) futures; + ] + ++ 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'" + ''; 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; }; } |