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