nixpkgs/pkgs/tools/misc/noti/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2019-08-15 09:44:19 +00:00
{ stdenv, lib, buildGoPackage, fetchFromGitHub
, Cocoa ? null }:
2018-09-07 14:27:27 +00:00
buildGoPackage rec {
2019-08-15 09:44:19 +00:00
pname = "noti";
version = "3.2.0";
2018-09-07 14:27:27 +00:00
src = fetchFromGitHub {
owner = "variadico";
repo = "noti";
2019-08-15 09:44:19 +00:00
rev = version;
sha256 = "1lw1wmw2m83m0s5znb4gliywjpg74qrhrj6rwpcb5p352c4vbwxs";
2018-09-07 14:27:27 +00:00
};
2019-08-15 09:44:19 +00:00
buildInputs = lib.optional stdenv.isDarwin Cocoa;
2018-09-19 01:13:46 +00:00
# TODO: Remove this when we update apple_sdk
2019-08-15 09:44:19 +00:00
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-fno-objc-arc";
2018-09-19 01:13:46 +00:00
2018-09-07 14:27:27 +00:00
goPackagePath = "github.com/variadico/noti";
preBuild = ''
buildFlagsArray+=("-ldflags" "-X ${goPackagePath}/internal/command.Version=${version}")
'';
postInstall = ''
2019-08-15 09:44:19 +00:00
install -Dm444 -t $out/share/man/man1 $src/docs/man/*.1
install -Dm444 -t $out/share/man/man5 $src/docs/man/*.5
2018-09-07 14:27:27 +00:00
'';
2019-08-15 09:44:19 +00:00
meta = with lib; {
2018-09-07 14:27:27 +00:00
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;
2019-08-15 09:44:19 +00:00
maintainers = with maintainers; [ stites ];
2018-09-07 14:27:27 +00:00
platforms = platforms.all;
};
}