biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / system / monitor / default.nix
blobfada61d6b6a41259d76a55e3452554b3e7e49232
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , gitUpdater
5 , meson
6 , ninja
7 , vala
8 , pkg-config
9 , pantheon
10 , python3
11 , curl
12 , flatpak
13 , gettext
14 , glib
15 , gtk3
16 , json-glib
17 , libwnck
18 , libgee
19 , libgtop
20 , libhandy
21 , sassc
22 , udisks2
23 , wrapGAppsHook3
24 , libX11
25 , libXext
26 , libXNVCtrl
29 stdenv.mkDerivation rec {
30   pname = "monitor";
31   version = "0.17.2";
33   src = fetchFromGitHub {
34     owner = "stsdc";
35     repo = "monitor";
36     rev = version;
37     hash = "sha256-Kk3L4hfHon0B6Y6vU7en1UFpg221+EiVCxMX9mvu7pU=";
38     fetchSubmodules = true;
39   };
41   nativeBuildInputs = [
42     gettext
43     meson
44     ninja
45     vala
46     pkg-config
47     python3
48     wrapGAppsHook3
49   ];
51   buildInputs = [
52     curl
53     flatpak
54     glib
55     gtk3
56     json-glib
57     pantheon.granite
58     pantheon.wingpanel
59     libgee
60     libgtop
61     libhandy
62     libwnck
63     sassc
64     udisks2
65     libX11
66     libXext
67     libXNVCtrl
68   ];
70   # Force link against Xext, otherwise build fails with:
71   # ld: /nix/store/...-libXNVCtrl-495.46/lib/libXNVCtrl.a(NVCtrl.o): undefined reference to symbol 'XextAddDisplay'
72   # ld: /nix/store/...-libXext-1.3.4/lib/libXext.so.6: error adding symbols: DSO missing from command line
73   # https://github.com/stsdc/monitor/issues/292
74   NIX_LDFLAGS = "-lXext";
76   mesonFlags = [ "-Dindicator-wingpanel=enabled" ];
78   postPatch = ''
79     chmod +x meson/post_install.py
80     patchShebangs meson/post_install.py
82     # Alternatively, using pkg-config here should just work.
83     substituteInPlace meson.build --replace \
84       "meson.get_compiler('c').find_library('libcurl', dirs: vapidir)" \
85       "meson.get_compiler('c').find_library('libcurl', dirs: '${curl.out}/lib')"
86   '';
88   passthru = {
89     updateScript = gitUpdater {
90       # Upstream frequently tags these to fix CI, which are mostly irrelevant to us.
91       ignoredVersions = "-";
92     };
93   };
95   meta = with lib; {
96     description = "Manage processes and monitor system resources";
97     longDescription = ''
98       Manage processes and monitor system resources.
99       To use the wingpanel indicator in this application, see the Pantheon
100       section in the NixOS manual.
101     '';
102     homepage = "https://github.com/stsdc/monitor";
103     maintainers = with maintainers; [ xiorcale ] ++ teams.pantheon.members;
104     platforms = platforms.linux;
105     license = licenses.gpl3Plus;
106     mainProgram = "com.github.stsdc.monitor";
107   };