noti: Migrate and refactor (#402696)
This commit is contained in:
@@ -1,33 +1,31 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
Cocoa,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: rec {
|
||||
pname = "noti";
|
||||
version = "3.7.0";
|
||||
version = "3.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "variadico";
|
||||
repo = "noti";
|
||||
rev = version;
|
||||
hash = "sha256-8CHSbKOiWNYqKBU1kqQm5t02DJq0JfoIaPsU6Ylc46E=";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-FwOS4ifMiODIzKVQufLhkDYOcmXz9dAfWw+hM3rXT/Y=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Cocoa;
|
||||
subPackages = [ "cmd/noti" ];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/variadico/noti/internal/command.Version=${version}"
|
||||
"-X github.com/variadico/noti/internal/command.Version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
@@ -38,7 +36,7 @@ buildGoModule rec {
|
||||
installManPage docs/man/dist/*
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Monitor a process and trigger a notification";
|
||||
longDescription = ''
|
||||
Monitor a process and trigger a notification.
|
||||
@@ -47,8 +45,8 @@ buildGoModule rec {
|
||||
you when it's done. You can receive messages on your computer or phone.
|
||||
'';
|
||||
homepage = "https://github.com/variadico/noti";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ stites ];
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.stites ];
|
||||
mainProgram = "noti";
|
||||
};
|
||||
}
|
||||
})
|
||||
@@ -2590,10 +2590,6 @@ with pkgs;
|
||||
|
||||
nixpkgs-pytools = with python3.pkgs; toPythonApplication nixpkgs-pytools;
|
||||
|
||||
noti = callPackage ../tools/misc/noti {
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
||||
};
|
||||
|
||||
nsz = with python3.pkgs; toPythonApplication nsz;
|
||||
|
||||
ocrmypdf = with python3.pkgs; toPythonApplication ocrmypdf;
|
||||
|
||||
Reference in New Issue
Block a user