fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 stdenv,
3 lib,
4 gitUpdater,
5 fetchFromGitHub,
6 nixosTests,
7 accountsservice,
8 cmake,
9 cppcheck,
10 dbus,
11 geoclue2,
12 glib,
13 gsettings-desktop-schemas,
14 gtest,
15 intltool,
16 libayatana-common,
17 libgudev,
18 libqtdbusmock,
19 libqtdbustest,
20 librda,
21 libsForQt5,
22 lomiri,
23 mate,
24 pkg-config,
25 properties-cpp,
26 python3,
27 systemd,
28 wrapGAppsHook3,
29 xsct,
30}:
31
32stdenv.mkDerivation (finalAttrs: {
33 pname = "ayatana-indicator-display";
34 version = "24.5.2";
35
36 src = fetchFromGitHub {
37 owner = "AyatanaIndicators";
38 repo = "ayatana-indicator-display";
39 tag = finalAttrs.version;
40 hash = "sha256-rsZjEfAiz1HC5XMjPume1Y6miNAv1kmPFP4J/+NKlsA=";
41 };
42
43 postPatch = ''
44 # Replace systemd prefix in pkg-config query, use GNUInstallDirs location for /etc
45 substituteInPlace data/CMakeLists.txt \
46 --replace-fail 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})' \
47 --replace-fail 'DESTINATION "/etc' 'DESTINATION "''${CMAKE_INSTALL_FULL_SYSCONFDIR}'
48
49 # Hardcode xsct path
50 substituteInPlace src/service.cpp \
51 --replace-fail 'sCommand = g_strdup_printf ("xsct' 'sCommand = g_strdup_printf ("${lib.getExe xsct}'
52 '';
53
54 strictDeps = true;
55
56 nativeBuildInputs = [
57 cmake
58 glib # for schema discovery
59 intltool
60 pkg-config
61 wrapGAppsHook3
62 ];
63
64 # TODO Can we get around requiring every desktop's schemas just to avoid segfaulting on some systems?
65 buildInputs = [
66 accountsservice
67 geoclue2
68 gsettings-desktop-schemas # gnome schemas
69 glib
70 libayatana-common
71 libgudev
72 librda
73 libsForQt5.qtbase
74 systemd
75 ]
76 ++ (with lomiri; [
77 cmake-extras
78 lomiri-schemas # lomiri schema
79 ])
80 ++ (with mate; [
81 mate.marco # marco schema
82 mate.mate-settings-daemon # mate mouse schema
83 ]);
84
85 nativeCheckInputs = [
86 cppcheck
87 dbus
88 (python3.withPackages (ps: with ps; [ python-dbusmock ]))
89 ];
90
91 checkInputs = [
92 gtest
93 libqtdbusmock
94 libqtdbustest
95 properties-cpp
96 ];
97
98 dontWrapQtApps = true;
99
100 cmakeFlags = [
101 (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
102 (lib.cmakeBool "ENABLE_COLOR_TEMP" true)
103 (lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
104 (lib.cmakeBool "GSETTINGS_COMPILE" true)
105 ];
106
107 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
108
109 passthru = {
110 ayatana-indicators = {
111 ayatana-indicator-display = [
112 "ayatana"
113 "lomiri"
114 ];
115 };
116 tests = {
117 startup = nixosTests.ayatana-indicators;
118 lomiri = nixosTests.lomiri.desktop-ayatana-indicator-display;
119 };
120 updateScript = gitUpdater { };
121 };
122
123 meta = {
124 description = "Ayatana Indicator for Display configuration";
125 longDescription = ''
126 This Ayatana Indicator is designed to be placed on the right side of a
127 panel and give the user easy control for changing their display settings.
128 '';
129 homepage = "https://github.com/AyatanaIndicators/ayatana-indicator-display";
130 changelog = "https://github.com/AyatanaIndicators/ayatana-indicator-display/blob/${finalAttrs.version}/ChangeLog";
131 license = lib.licenses.gpl3Only;
132 maintainers = with lib.maintainers; [ OPNA2608 ];
133 platforms = lib.platforms.linux;
134 };
135})