1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 gettext,
7 gtk3,
8 libayatana-indicator,
9 mate-panel,
10 hicolor-icon-theme,
11 wrapGAppsHook3,
12 mateUpdateScript,
13}:
14
15stdenv.mkDerivation rec {
16 pname = "mate-indicator-applet";
17 version = "1.28.0";
18
19 src = fetchurl {
20 url = "https://pub.mate-desktop.org/releases/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
21 sha256 = "zrPXA5cKPlWNfNffCxwhceOvdSolSVrO0uIiwemtSc0=";
22 };
23
24 postPatch = ''
25 # Find installed Unity & Ayatana (new-style) indicators
26 substituteInPlace src/applet-main.c \
27 --replace-fail '/usr/share' '/run/current-system/sw/share'
28 '';
29
30 nativeBuildInputs = [
31 pkg-config
32 gettext
33 wrapGAppsHook3
34 ];
35
36 buildInputs = [
37 gtk3
38 libayatana-indicator
39 mate-panel
40 hicolor-icon-theme
41 ];
42
43 configureFlags = [ "--with-ayatana-indicators" ];
44
45 enableParallelBuilding = true;
46
47 passthru.updateScript = mateUpdateScript { inherit pname; };
48
49 meta = with lib; {
50 homepage = "https://github.com/mate-desktop/mate-indicator-applet";
51 description = "MATE panel indicator applet";
52 longDescription = ''
53 A small applet to display information from various applications
54 consistently in the panel.
55
56 The indicator applet exposes Ayatana Indicators in the MATE Panel.
57 Ayatana Indicators are an initiative by Canonical to provide crisp and
58 clean system and application status indication. They take the form of
59 an icon and associated menu, displayed (usually) in the desktop panel.
60 Existing indicators include the Message Menu, Battery Menu and Sound
61 menu.
62 '';
63 license = with licenses; [
64 gpl3Plus
65 lgpl2Plus
66 ];
67 platforms = platforms.unix;
68 teams = [ teams.mate ];
69 };
70}