11 withDocumentation ? true,
15 gobject-introspection,
27 stdenv.mkDerivation (finalAttrs: {
28 pname = "ayatana-indicator-messages";
31 src = fetchFromGitHub {
32 owner = "AyatanaIndicators";
33 repo = "ayatana-indicator-messages";
34 rev = "refs/tags/${finalAttrs.version}";
35 hash = "sha256-D1181eD2mAVXEa7RLXXC4b2tVGrxbh0WWgtbC1anHH0=";
41 ] ++ lib.optionals withDocumentation [ "devdoc" ];
45 # Uses pkg_get_variable, cannot substitute prefix with that
46 substituteInPlace data/CMakeLists.txt \
47 --replace-fail "\''${SYSTEMD_USER_DIR}" "$out/lib/systemd/user"
50 substituteInPlace libmessaging-menu/messaging-menu.pc.in \
51 --replace-fail "\''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@" '@CMAKE_INSTALL_FULL_LIBDIR@' \
52 --replace-fail "\''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@" '@CMAKE_INSTALL_FULL_INCLUDEDIR@'
54 # Fix tests with gobject-introspection 1.80 not installing GLib introspection data
55 substituteInPlace tests/CMakeLists.txt \
56 --replace-fail 'GI_TYPELIB_PATH=\"' 'GI_TYPELIB_PATH=\"$GI_TYPELIB_PATH$\{GI_TYPELIB_PATH\:+\:\}'
58 + lib.optionalString (!withDocumentation) ''
59 sed -i CMakeLists.txt \
60 '/add_subdirectory(doc)/d'
68 glib # For glib-compile-schemas
74 ++ lib.optionals withDocumentation [
89 (python3.withPackages (
103 "-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
104 "-DGSETTINGS_LOCALINSTALL=ON"
105 "-DGSETTINGS_COMPILE=ON"
108 makeFlags = lib.optionals withDocumentation [
109 # gtk-doc doesn't call ld with the correct arguments
110 # ld: ...: undefined reference to symbol 'strncpy@@GLIBC_2.2.5', 'qsort@@GLIBC_2.2.5'
111 "LD=${stdenv.cc.targetPrefix}cc"
114 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
117 # test-client imports gir, whose solib entry points to final store location
118 install -Dm644 libmessaging-menu/libmessaging-menu.so.0.0.0 $out/lib/libmessaging-menu.so.0
122 # remove the above solib-installation, let it be done properly
126 preInstall = lib.optionalString withDocumentation ''
127 # installing regenerates docs, generated files are created without write permissions, errors out while trying to overwrite them
128 chmod +w doc/reference/html/*
131 # Indicators that talk to it may issue requests to parse desktop files, which needs binaries in Exec on PATH
132 # messaging_menu_app_set_desktop_id -> g_desktop_app_info_new -...-> g_desktop_app_info_load_from_keyfile -> g_find_program_for_path
133 # When launched via systemd, PATH is very narrow
136 --suffix PATH : '/run/current-system/sw/bin'
141 ayatana-indicators = {
142 ayatana-indicator-messages = [
148 pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
149 vm = nixosTests.ayatana-indicators;
151 updateScript = gitUpdater { };
155 description = "Ayatana Indicator Messages Applet";
157 The -messages Ayatana System Indicator is the messages menu indicator for Unity7, MATE and Lomiri (optionally for
158 others, e.g. XFCE, LXDE).
160 homepage = "https://github.com/AyatanaIndicators/ayatana-indicator-messages";
161 license = lib.licenses.gpl3Only;
162 platforms = lib.platforms.linux;
163 maintainers = with lib.maintainers; [ OPNA2608 ];
164 pkgConfigModules = [ "messaging-menu" ];