1{ lib, stdenv, fetchFromGitHub, pkg-config, gettext, glib, gtk3, libnotify, wrapGAppsHook }:
2
3stdenv.mkDerivation rec {
4 pname = "cbatticon";
5 version = "1.6.13";
6
7 src = fetchFromGitHub {
8 owner = "valr";
9 repo = pname;
10 rev = version;
11 sha256 = "sha256-VQjJujF9lnVvQxV+0YqodLgnI9F90JKDAGBu5nM/Q/c=";
12 };
13
14 nativeBuildInputs = [ pkg-config gettext wrapGAppsHook ];
15
16 buildInputs = [ glib gtk3 libnotify ];
17
18 patchPhase = ''
19 sed -i -e 's/ -Wno-format//g' Makefile
20 '';
21
22 makeFlags = [ "PREFIX=${placeholder "out"}" ];
23
24 meta = with lib; {
25 description = "Lightweight and fast battery icon that sits in the system tray";
26 homepage = "https://github.com/valr/cbatticon";
27 license = licenses.gpl2;
28 platforms = platforms.linux;
29 maintainers = [ maintainers.domenkozar ];
30 };
31}