lol
1{ stdenv
2, lib
3, buildGoModule
4, fetchFromGitHub
5, Cocoa
6, installShellFiles
7}:
8
9buildGoModule rec {
10 pname = "noti";
11 version = "3.7.0";
12
13 src = fetchFromGitHub {
14 owner = "variadico";
15 repo = "noti";
16 rev = version;
17 hash = "sha256-8CHSbKOiWNYqKBU1kqQm5t02DJq0JfoIaPsU6Ylc46E=";
18 };
19
20 vendorHash = null;
21
22 nativeBuildInputs = [ installShellFiles ];
23
24 buildInputs = lib.optional stdenv.isDarwin Cocoa;
25
26 ldflags = [
27 "-s"
28 "-w"
29 "-X github.com/variadico/noti/internal/command.Version=${version}"
30 ];
31
32 preCheck = ''
33 export PATH=$out/bin:$PATH
34 '';
35
36 postInstall = ''
37 installManPage docs/man/dist/*
38 '';
39
40 meta = with lib; {
41 description = "Monitor a process and trigger a notification";
42 longDescription = ''
43 Monitor a process and trigger a notification.
44
45 Never sit and wait for some long-running process to finish. Noti can alert
46 you when it's done. You can receive messages on your computer or phone.
47 '';
48 homepage = "https://github.com/variadico/noti";
49 license = licenses.mit;
50 maintainers = with maintainers; [ stites marsam ];
51 };
52}