lol
1{ lib, stdenv
2, fetchFromGitLab
3, fetchpatch
4, pkg-config
5, cmake
6, gettext
7, cairo
8, pango
9, pcre
10, glib
11, imlib2
12, gtk3
13, libXinerama
14, libXrender
15, libXcomposite
16, libXdamage
17, libX11
18, libXrandr
19, librsvg
20, libpthreadstubs
21, libXdmcp
22, libstartup_notification
23, wrapGAppsHook
24}:
25
26stdenv.mkDerivation rec {
27 pname = "tint2";
28 version = "17.1.3";
29
30 src = fetchFromGitLab {
31 owner = "nick87720z";
32 repo = "tint2";
33 rev = version;
34 hash = "sha256-9sEe/Gnj+FWLPbWBtfL1YlNNC12j7/KjQ40xdkaFJVQ=";
35 };
36
37 patches = [
38 # Fix crashes with glib >= 2.76
39 # https://patchespromptly.com/glib2/
40 # https://gitlab.com/nick87720z/tint2/-/issues/4
41 (fetchpatch {
42 url = "https://gitlab.com/nick87720z/tint2/uploads/7de4501a4fa4fffa5ba8bb0fa3d19f78/glib.patch";
43 hash = "sha256-K547KYlRkVl1s2THi3ZCRuM447EFJwTqUEBjKQnV8Sc=";
44 })
45 ];
46
47 nativeBuildInputs = [
48 pkg-config
49 cmake
50 gettext
51 wrapGAppsHook
52 ];
53
54 buildInputs = [
55 cairo
56 pango
57 pcre
58 glib
59 imlib2
60 gtk3
61 libXinerama
62 libXrender
63 libXcomposite
64 libXdamage
65 libX11
66 libXrandr
67 librsvg
68 libpthreadstubs
69 libXdmcp
70 libstartup_notification
71 ];
72
73 cmakeFlags = [
74 "-Ddocdir=share/doc/${pname}"
75 ];
76
77 postPatch = ''
78 for f in ./src/launcher/apps-common.c \
79 ./src/launcher/icon-theme-common.c
80 do
81 substituteInPlace $f --replace /usr/share/ /run/current-system/sw/share/
82 done
83 '';
84
85 meta = with lib; {
86 homepage = "https://gitlab.com/nick87720z/tint2";
87 description = "Simple panel/taskbar unintrusive and light (memory, cpu, aestetic)";
88 license = licenses.gpl2Only;
89 platforms = platforms.linux;
90 maintainers = [ maintainers.romildo ];
91 };
92}