Skip to content

Commit fd0ade0

Browse files
authored
noti: Migrate and refactor (#402696)
2 parents 943a59d + d57be05 commit fd0ade0

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
{
2-
stdenv,
32
lib,
43
buildGoModule,
54
fetchFromGitHub,
6-
Cocoa,
75
installShellFiles,
86
}:
97

10-
buildGoModule rec {
8+
buildGoModule (finalAttrs: rec {
119
pname = "noti";
12-
version = "3.7.0";
10+
version = "3.8.0";
1311

1412
src = fetchFromGitHub {
1513
owner = "variadico";
1614
repo = "noti";
17-
rev = version;
18-
hash = "sha256-8CHSbKOiWNYqKBU1kqQm5t02DJq0JfoIaPsU6Ylc46E=";
15+
tag = finalAttrs.version;
16+
hash = "sha256-FwOS4ifMiODIzKVQufLhkDYOcmXz9dAfWw+hM3rXT/Y=";
1917
};
2018

2119
vendorHash = null;
2220

2321
nativeBuildInputs = [ installShellFiles ];
2422

25-
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Cocoa;
23+
subPackages = [ "cmd/noti" ];
2624

2725
ldflags = [
2826
"-s"
2927
"-w"
30-
"-X github.com/variadico/noti/internal/command.Version=${version}"
28+
"-X github.com/variadico/noti/internal/command.Version=${finalAttrs.version}"
3129
];
3230

3331
preCheck = ''
@@ -38,7 +36,7 @@ buildGoModule rec {
3836
installManPage docs/man/dist/*
3937
'';
4038

41-
meta = with lib; {
39+
meta = {
4240
description = "Monitor a process and trigger a notification";
4341
longDescription = ''
4442
Monitor a process and trigger a notification.
@@ -47,8 +45,8 @@ buildGoModule rec {
4745
you when it's done. You can receive messages on your computer or phone.
4846
'';
4947
homepage = "https://github.com/variadico/noti";
50-
license = licenses.mit;
51-
maintainers = with maintainers; [ stites ];
48+
license = lib.licenses.mit;
49+
maintainers = [ lib.maintainers.stites ];
5250
mainProgram = "noti";
5351
};
54-
}
52+
})

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,10 +2590,6 @@ with pkgs;
25902590

25912591
nixpkgs-pytools = with python3.pkgs; toPythonApplication nixpkgs-pytools;
25922592

2593-
noti = callPackage ../tools/misc/noti {
2594-
inherit (darwin.apple_sdk.frameworks) Cocoa;
2595-
};
2596-
25972593
nsz = with python3.pkgs; toPythonApplication nsz;
25982594

25992595
ocrmypdf = with python3.pkgs; toPythonApplication ocrmypdf;

0 commit comments

Comments
 (0)