10 , withDocumentation ? true
14 , gobject-introspection
26 stdenv.mkDerivation (finalAttrs: {
27 pname = "ayatana-indicator-messages";
30 src = fetchFromGitHub {
31 owner = "AyatanaIndicators";
32 repo = "ayatana-indicator-messages";
33 rev = finalAttrs.version;
34 hash = "sha256-D1181eD2mAVXEa7RLXXC4b2tVGrxbh0WWgtbC1anHH0=";
40 ] ++ lib.optionals withDocumentation [
45 # Uses pkg_get_variable, cannot substitute prefix with that
46 substituteInPlace data/CMakeLists.txt \
47 --replace "\''${SYSTEMD_USER_DIR}" "$out/lib/systemd/user"
50 substituteInPlace libmessaging-menu/messaging-menu.pc.in \
51 --replace "\''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@" '@CMAKE_INSTALL_FULL_LIBDIR@' \
52 --replace "\''${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\:+\:\}'
57 '' + lib.optionalString (!withDocumentation) ''
58 sed -i CMakeLists.txt \
59 '/add_subdirectory(doc)/d'
66 glib # For glib-compile-schemas
71 ] ++ lib.optionals withDocumentation [
86 (python3.withPackages (ps: with ps; [
98 "-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}"
99 "-DGSETTINGS_LOCALINSTALL=ON"
100 "-DGSETTINGS_COMPILE=ON"
103 makeFlags = lib.optionals withDocumentation [
104 # gtk-doc doesn't call ld with the correct arguments
105 # ld: ...: undefined reference to symbol 'strncpy@@GLIBC_2.2.5', 'qsort@@GLIBC_2.2.5'
106 "LD=${stdenv.cc.targetPrefix}cc"
109 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
112 # test-client imports gir, whose solib entry points to final store location
113 install -Dm644 libmessaging-menu/libmessaging-menu.so.0.0.0 $out/lib/libmessaging-menu.so.0
117 # remove the above solib-installation, let it be done properly
121 preInstall = lib.optionalString withDocumentation ''
122 # installing regenerates docs, generated files are created without write permissions, errors out while trying to overwrite them
123 chmod +w doc/reference/html/*
126 # Indicators that talk to it may issue requests to parse desktop files, which needs binaries in Exec on PATH
127 # messaging_menu_app_set_desktop_id -> g_desktop_app_info_new -...-> g_desktop_app_info_load_from_keyfile -> g_find_program_for_path
128 # When launched via systemd, PATH is very narrow
131 --suffix PATH : '/run/current-system/sw/bin'
136 ayatana-indicators = [
137 "ayatana-indicator-messages"
140 pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
141 vm = nixosTests.ayatana-indicators;
143 updateScript = gitUpdater { };
147 description = "Ayatana Indicator Messages Applet";
149 The -messages Ayatana System Indicator is the messages menu indicator for Unity7, MATE and Lomiri (optionally for
150 others, e.g. XFCE, LXDE).
152 homepage = "https://github.com/AyatanaIndicators/ayatana-indicator-messages";
153 license = licenses.gpl3Only;
154 platforms = platforms.linux;
155 maintainers = with maintainers; [ OPNA2608 ];