2022-07-19 15:55:06 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
|
|
|
, Cocoa
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
2019-08-15 09:44:19 +00:00
|
|
|
pname = "noti";
|
2020-09-07 04:20:00 +00:00
|
|
|
version = "3.5.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;
|
2020-09-07 04:20:00 +00:00
|
|
|
sha256 = "12r9wawwl6x0rfv1kahwkamfa0pjq24z60az9pn9nsi2z1rrlwkd";
|
2018-09-07 14:27:27 +00:00
|
|
|
};
|
|
|
|
|
2022-07-19 15:55:06 +00:00
|
|
|
patches = [
|
|
|
|
# update golang.org/x/sys to fix building on aarch64-darwin
|
|
|
|
# using fetchurl because fetchpatch breaks the patch
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://github.com/variadico/noti/commit/a90bccfdb2e6a0adc2e92f9a4e7be64133832ba9.patch";
|
|
|
|
sha256 = "sha256-vSAwuAR9absMSFqGOlzmRZoOGC/jpkmh8CMCVjeleUo=";
|
|
|
|
})
|
|
|
|
];
|
2018-09-19 01:13:46 +00:00
|
|
|
|
2022-07-19 15:55:06 +00:00
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
buildInputs = lib.optional stdenv.isDarwin Cocoa;
|
2018-09-07 14:27:27 +00:00
|
|
|
|
2021-08-21 08:23:50 +00:00
|
|
|
ldflags = [
|
2022-07-19 15:55:06 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/variadico/noti/internal/command.Version=${version}"
|
2021-08-21 08:23:50 +00:00
|
|
|
];
|
2018-09-07 14:27:27 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2022-07-19 15:55:06 +00:00
|
|
|
installManPage docs/man/*
|
2018-09-07 14:27:27 +00:00
|
|
|
'';
|
|
|
|
|
2019-08-15 09:44:19 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "Monitor a process and trigger a notification";
|
2018-09-07 14:27:27 +00:00
|
|
|
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.
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/variadico/noti";
|
2018-09-07 14:27:27 +00:00
|
|
|
license = licenses.mit;
|
2019-10-03 00:01:00 +00:00
|
|
|
maintainers = with maintainers; [ stites marsam ];
|
2018-09-07 14:27:27 +00:00
|
|
|
};
|
|
|
|
}
|