2015-01-26 04:39:46 +03:00
|
|
|
{ stdenv, lib, fetchzip }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "terminal-notifier-${version}";
|
|
|
|
|
2017-11-02 20:23:59 +03:00
|
|
|
version = "2.0.0";
|
2015-01-26 04:39:46 +03:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/alloy/terminal-notifier/releases/download/${version}/terminal-notifier-${version}.zip";
|
2017-11-02 20:23:59 +03:00
|
|
|
sha256 = "0gi54v92hi1fkryxlz3k5s5d8h0s66cc57ds0vbm1m1qk3z4xhb0";
|
|
|
|
stripRoot = false;
|
2015-01-26 04:39:46 +03:00
|
|
|
};
|
|
|
|
|
2016-05-04 13:08:35 +03:00
|
|
|
dontBuild = true;
|
2015-01-26 04:39:46 +03:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r terminal-notifier.app $out/Applications
|
2015-08-27 03:05:29 +03:00
|
|
|
cat >$out/bin/terminal-notifier <<EOF
|
2017-07-18 22:22:53 +03:00
|
|
|
#!${stdenv.shell}
|
2015-08-27 03:05:29 +03:00
|
|
|
cd $out/Applications/terminal-notifier.app
|
2015-11-17 00:29:13 +03:00
|
|
|
exec ./Contents/MacOS/terminal-notifier "\$@"
|
2015-08-27 03:05:29 +03:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/terminal-notifier
|
2015-01-26 04:39:46 +03:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
2015-11-17 23:29:29 +03:00
|
|
|
platforms = platforms.darwin;
|
2015-01-26 04:39:46 +03:00
|
|
|
};
|
|
|
|
}
|