From 6715f8f3f2323a70d5c79a014422f4965c29a4ef Mon Sep 17 00:00:00 2001 From: Yechiel Worenklein <41305372+yechielw@users.noreply.github.com> Date: Mon, 27 Oct 2025 13:42:54 +0200 Subject: [PATCH] batticonplus: init at 2.0.1 this is a drop-in replacement for cbatticon with wayland support Apply suggestions from code review - Replace `rev` with `tag` - Refactor meta Co-authored-by: qzylinra <225773816+qzylinra@users.noreply.github.com> --- pkgs/by-name/ba/batticonplus/package.nix | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pkgs/by-name/ba/batticonplus/package.nix diff --git a/pkgs/by-name/ba/batticonplus/package.nix b/pkgs/by-name/ba/batticonplus/package.nix new file mode 100644 index 000000000000..d83eacc1dacb --- /dev/null +++ b/pkgs/by-name/ba/batticonplus/package.nix @@ -0,0 +1,54 @@ +{ + lib, + stdenv, + fetchFromGitHub, + pkg-config, + gettext, + glib, + gtk3, + libnotify, + wrapGAppsHook3, + libayatana-appindicator, + nix-update-script, +}: + +stdenv.mkDerivation rec { + pname = "batticonplus"; + version = "2.0.1"; + + src = fetchFromGitHub { + owner = "artist4xlibre"; + repo = "batticonplus"; + tag = "v${version}"; + hash = "sha256-H9ZoiQ5zWMIoWWol2a6f9Z8g4o9DIHYdF+/nEsBfuzc="; + }; + + nativeBuildInputs = [ + pkg-config + gettext + wrapGAppsHook3 + ]; + + buildInputs = [ + glib + gtk3 + libnotify + libayatana-appindicator + ]; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + "WITH_APPINDICATOR=1" + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Lightweight battery status icon for the system tray and notifier (based on cbatticon)"; + mainProgram = "batticonplus"; + homepage = "https://github.com/artist4xlibre/batticonplus"; + license = lib.licenses.gpl2; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ yechielw ]; + }; +}