From 5a73cda9b500550b4bb616a2d42f793de3c12276 Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Sun, 25 Jan 2015 20:39:46 -0500 Subject: [PATCH] terminal-notifier: add package --- .../misc/terminal-notifier/default.nix | 26 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-packages.nix | 7 +++-- 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 pkgs/applications/misc/terminal-notifier/default.nix diff --git a/pkgs/applications/misc/terminal-notifier/default.nix b/pkgs/applications/misc/terminal-notifier/default.nix new file mode 100644 index 000000000000..946556140232 --- /dev/null +++ b/pkgs/applications/misc/terminal-notifier/default.nix @@ -0,0 +1,26 @@ +{ stdenv, lib, fetchzip }: + +stdenv.mkDerivation rec { + name = "terminal-notifier-${version}"; + + version = "1.5.0"; + + src = fetchzip { + url = "https://github.com/alloy/terminal-notifier/releases/download/${version}/terminal-notifier-${version}.zip"; + sha256 = "09x7vl0kddivqq3pyrk6sg1f0sv5l7nj0bmblq222zk3b09bgg8p"; + }; + + buildPhase = "true"; + + installPhase = '' + mkdir -p $out/Applications + mkdir -p $out/bin + cp -r terminal-notifier.app $out/Applications + ln -s $out/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier $out/bin/terminal-notifier + ''; + + meta = with lib; { + maintainers = with maintainers; [ cstrahan ]; + platforms = with platforms; darwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 90dfd2876e83..b07c71f6e512 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11183,6 +11183,8 @@ let telepathy_idle = callPackage ../applications/networking/instant-messengers/telepathy/idle {}; + terminal-notifier = callPackage ../applications/misc/terminal-notifier {}; + terminator = callPackage ../applications/misc/terminator { vte = gnome.vte.override { pythonSupport = true; }; inherit (pythonPackages) notify; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a16121f2e933..0132ce4ba255 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13203,10 +13203,9 @@ let propagatedBuildInputs = with self; [ dateutil ]; - # TODO: rubyPackages doesn't exist - #preInstall = stdenv.lib.optionalString stdenv.isDarwin '' - # sed -i 's|^\([ ]*\)self.bin_path.*$|\1self.bin_path = "${pkgs.rubyPackages.terminal_notifier}/bin/terminal-notifier"|' build/lib/pync/TerminalNotifier.py - #''; + preInstall = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i 's|^\([ ]*\)self.bin_path.*$|\1self.bin_path = "${pkgs.terminal-notifier}/bin/terminal-notifier"|' build/lib/pync/TerminalNotifier.py + ''; meta = with stdenv.lib; { description = "Python Wrapper for Mac OS 10.8 Notification Center";