Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

111 lines
2.9 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
nixosTests,
cmake,
dbus,
glib,
gnome-settings-daemon,
gsettings-desktop-schemas,
gtest,
intltool,
libayatana-common,
librda,
lomiri,
mate,
pkg-config,
systemd,
wrapGAppsHook3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ayatana-indicator-session";
version = "24.5.1";
src = fetchFromGitHub {
owner = "AyatanaIndicators";
repo = "ayatana-indicator-session";
tag = finalAttrs.version;
hash = "sha256-jqcgQTsC4VBit3wwtKKTdEG71CUPJpeMtpzikE4IGhE=";
};
postPatch = ''
# Queries systemd user unit dir via pkg_get_variable, can't override prefix
substituteInPlace data/CMakeLists.txt \
--replace-fail 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'set(SYSTEMD_USER_DIR "''${CMAKE_INSTALL_PREFIX}/lib/systemd/user")' \
--replace-fail '/etc' "\''${CMAKE_INSTALL_SYSCONFDIR}"
'';
strictDeps = true;
nativeBuildInputs = [
cmake
intltool
pkg-config
wrapGAppsHook3
];
buildInputs = [
lomiri.cmake-extras
glib
gsettings-desktop-schemas
libayatana-common
librda
systemd
# TODO these bloat the closure size alot, just so the indicator doesn't have the potential to crash.
# is there a better way to give it access to DE-specific schemas as needed?
# https://github.com/AyatanaIndicators/ayatana-indicator-session/blob/88846bad7ee0aa8e0bb122816d06f9bc887eb464/src/service.c#L1387-L1413
gnome-settings-daemon
mate.mate-settings-daemon
];
nativeCheckInputs = [ dbus ];
checkInputs = [ gtest ];
cmakeFlags = [
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
(lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
(lib.cmakeBool "GSETTINGS_COMPILE" true)
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
# DBus communication
enableParallelChecking = false;
passthru = {
ayatana-indicators = {
ayatana-indicator-session = [
"ayatana"
"lomiri"
];
};
tests = {
startup = nixosTests.ayatana-indicators;
lomiri = nixosTests.lomiri.desktop-ayatana-indicator-session;
};
updateScript = gitUpdater { };
};
meta = {
description = "Ayatana Indicator showing session management, status and user switching";
longDescription = ''
This Ayatana Indicator is designed to be placed on the right side of a
panel and give the user easy control for
- changing their instant message status,
- switching to another user,
- starting a guest session, or
- controlling the status of their own session.
'';
homepage = "https://github.com/AyatanaIndicators/ayatana-indicator-session";
changelog = "https://github.com/AyatanaIndicators/ayatana-indicator-session/blob/${finalAttrs.version}/ChangeLog";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ OPNA2608 ];
platforms = lib.platforms.linux;
};
})