From 21e58324a67c14303d35e69ad04f502685b5c2dd Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Mon, 28 Apr 2025 19:55:25 -0500 Subject: [PATCH 1/2] noti: migrate to by-name --- .../misc/noti/default.nix => by-name/no/noti/package.nix} | 4 ---- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 8 deletions(-) rename pkgs/{tools/misc/noti/default.nix => by-name/no/noti/package.nix} (92%) diff --git a/pkgs/tools/misc/noti/default.nix b/pkgs/by-name/no/noti/package.nix similarity index 92% rename from pkgs/tools/misc/noti/default.nix rename to pkgs/by-name/no/noti/package.nix index 71fb707312c9..0c983c9a7450 100644 --- a/pkgs/tools/misc/noti/default.nix +++ b/pkgs/by-name/no/noti/package.nix @@ -1,9 +1,7 @@ { - stdenv, lib, buildGoModule, fetchFromGitHub, - Cocoa, installShellFiles, }: @@ -22,8 +20,6 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optional stdenv.hostPlatform.isDarwin Cocoa; - ldflags = [ "-s" "-w" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cf9e45fe56b7..e1ab19c26110 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; From d57be05584651498636701873296e4b2e20e351c Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Mon, 28 Apr 2025 20:02:29 -0500 Subject: [PATCH 2/2] noti: 3.7.0 -> 3.8.0 Diff: https://github.com/variadico/noti/compare/refs/tags/3.7.0...3.8.0 Changelog: https://github.com/variadico/noti/releases/tag/3.8.0 --- pkgs/by-name/no/noti/package.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/no/noti/package.nix b/pkgs/by-name/no/noti/package.nix index 0c983c9a7450..27b8675652c0 100644 --- a/pkgs/by-name/no/noti/package.nix +++ b/pkgs/by-name/no/noti/package.nix @@ -5,25 +5,27 @@ 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 ]; + 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 = '' @@ -34,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. @@ -43,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"; }; -} +})