3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/noti/default.nix

43 lines
1.3 KiB
Nix
Raw Normal View History

2019-06-19 18:49:59 +01:00
{ stdenv, buildGoPackage, fetchFromGitHub, Cocoa }:
2018-09-07 15:27:27 +01:00
buildGoPackage rec {
name = "noti-${version}";
version = "3.1.0";
src = fetchFromGitHub {
owner = "variadico";
repo = "noti";
rev = "${version}";
sha256 = "1chsqfqk0pnhx5k2nr4c16cpb8m6zv69l1jvv4v4903zgfzcm823";
};
2019-06-19 18:49:59 +01:00
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Cocoa ];
2018-09-19 02:13:46 +01:00
# TODO: Remove this when we update apple_sdk
NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.isDarwin [ "-fno-objc-arc" ];
2018-09-07 15:27:27 +01:00
goPackagePath = "github.com/variadico/noti";
preBuild = ''
buildFlagsArray+=("-ldflags" "-X ${goPackagePath}/internal/command.Version=${version}")
'';
postInstall = ''
mkdir -p $out/share/man/man{1,5}/
cp $src/docs/man/noti.1 $out/share/man/man1/
cp $src/docs/man/noti.yaml.5 $out/share/man/man5/
'';
meta = with stdenv.lib; {
description = "Monitor a process and trigger a notification.";
longDescription = ''
Monitor a process and trigger a notification.
Never sit and wait for some long-running process to finish. Noti can alert you when it's done. You can receive messages on your computer or phone.
'';
homepage = https://github.com/variadico/noti;
license = licenses.mit;
maintainers = [ maintainers.stites ];
platforms = platforms.all;
};
}