Merge pull request #283543 from OPNA2608/init/lomiri/ayatana-indicator-session

ayatana-indicator-session: init at 23.10.3

authored by Cosima Neidahl and committed by GitHub 62046f57 f2859b6f

+113
+1
nixos/tests/ayatana-indicators.nix
··· 29 29 packages = with pkgs; [ 30 30 ayatana-indicator-datetime 31 31 ayatana-indicator-messages 32 + ayatana-indicator-session 32 33 ] ++ (with pkgs.lomiri; [ 33 34 lomiri-indicator-network 34 35 telephony-service
+112
pkgs/by-name/ay/ayatana-indicator-session/package.nix
··· 1 + { stdenv 2 + , lib 3 + , fetchFromGitHub 4 + , gitUpdater 5 + , nixosTests 6 + , cmake 7 + , dbus 8 + , glib 9 + , gnome 10 + , gsettings-desktop-schemas 11 + , gtest 12 + , intltool 13 + , libayatana-common 14 + , librda 15 + , lomiri 16 + , mate 17 + , pkg-config 18 + , systemd 19 + , wrapGAppsHook 20 + }: 21 + 22 + stdenv.mkDerivation (finalAttrs: { 23 + pname = "ayatana-indicator-session"; 24 + version = "23.10.3"; 25 + 26 + src = fetchFromGitHub { 27 + owner = "AyatanaIndicators"; 28 + repo = "ayatana-indicator-session"; 29 + rev = finalAttrs.version; 30 + hash = "sha256-m2+qZxBrarenR41M41mCteFRXIEGkVDavRWQwM3G4tk="; 31 + }; 32 + 33 + postPatch = '' 34 + # Queries systemd user unit dir via pkg_get_variable, can't override prefix 35 + substituteInPlace data/CMakeLists.txt \ 36 + --replace-fail 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'set(SYSTEMD_USER_DIR "''${CMAKE_INSTALL_PREFIX}/lib/systemd/user")' \ 37 + --replace-fail '/etc' "\''${CMAKE_INSTALL_SYSCONFDIR}" 38 + ''; 39 + 40 + strictDeps = true; 41 + 42 + nativeBuildInputs = [ 43 + cmake 44 + intltool 45 + pkg-config 46 + wrapGAppsHook 47 + ]; 48 + 49 + buildInputs = [ 50 + lomiri.cmake-extras 51 + glib 52 + gsettings-desktop-schemas 53 + libayatana-common 54 + librda 55 + systemd 56 + 57 + # TODO these bloat the closure size alot, just so the indicator doesn't have the potential to crash. 58 + # is there a better way to give it access to DE-specific schemas as needed? 59 + # https://github.com/AyatanaIndicators/ayatana-indicator-session/blob/88846bad7ee0aa8e0bb122816d06f9bc887eb464/src/service.c#L1387-L1413 60 + gnome.gnome-settings-daemon 61 + mate.mate-settings-daemon 62 + ]; 63 + 64 + nativeCheckInputs = [ 65 + dbus 66 + ]; 67 + 68 + checkInputs = [ 69 + gtest 70 + ]; 71 + 72 + cmakeFlags = [ 73 + (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck) 74 + (lib.cmakeBool "GSETTINGS_LOCALINSTALL" true) 75 + (lib.cmakeBool "GSETTINGS_COMPILE" true) 76 + (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [ 77 + # Exclude tests 78 + "-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [ 79 + # Currently broken: https://github.com/AyatanaIndicators/ayatana-indicator-session/issues/90 80 + "^test-service" 81 + ]})") 82 + ])) 83 + ]; 84 + 85 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 86 + 87 + # DBus communication 88 + enableParallelChecking = false; 89 + 90 + passthru = { 91 + ayatana-indicators = [ "ayatana-indicator-session" ]; 92 + tests.vm = nixosTests.ayatana-indicators; 93 + updateScript = gitUpdater { }; 94 + }; 95 + 96 + meta = with lib; { 97 + description = "Ayatana Indicator showing session management, status and user switching"; 98 + longDescription = '' 99 + This Ayatana Indicator is designed to be placed on the right side of a 100 + panel and give the user easy control for 101 + - changing their instant message status, 102 + - switching to another user, 103 + - starting a guest session, or 104 + - controlling the status of their own session. 105 + ''; 106 + homepage = "https://github.com/AyatanaIndicators/ayatana-indicator-session"; 107 + changelog = "https://github.com/AyatanaIndicators/ayatana-indicator-session/blob/${finalAttrs.version}/ChangeLog"; 108 + license = licenses.gpl3Only; 109 + maintainers = with maintainers; [ OPNA2608 ]; 110 + platforms = platforms.linux; 111 + }; 112 + })