2022-08-12 12:06:08 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, Cocoa
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "noti";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "3.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "variadico";
|
|
|
|
repo = "noti";
|
|
|
|
rev = version;
|
2023-02-16 17:41:37 +00:00
|
|
|
hash = "sha256-8CHSbKOiWNYqKBU1kqQm5t02DJq0JfoIaPsU6Ylc46E=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
vendorHash = null;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Cocoa;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
ldflags = [
|
2022-08-12 12:06:08 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/variadico/noti/internal/command.Version=${version}"
|
2021-08-22 07:53:02 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2022-10-21 18:38:19 +00:00
|
|
|
installManPage docs/man/dist/*
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "Monitor a process and trigger a notification";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Monitor a process and trigger a notification.
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
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.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
homepage = "https://github.com/variadico/noti";
|
|
|
|
license = licenses.mit;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ stites ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "noti";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|