2024-01-25 14:12:00 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gitUpdater
|
|
|
|
, nixosTests
|
|
|
|
, ayatana-indicator-messages
|
|
|
|
, cmake
|
|
|
|
, dbus
|
|
|
|
, dbus-test-runner
|
|
|
|
, evolution-data-server
|
|
|
|
, glib
|
|
|
|
, gst_all_1
|
|
|
|
, gtest
|
|
|
|
, intltool
|
|
|
|
, libaccounts-glib
|
|
|
|
, libayatana-common
|
|
|
|
, libical
|
|
|
|
, libnotify
|
|
|
|
, libuuid
|
|
|
|
, lomiri
|
|
|
|
, pkg-config
|
|
|
|
, properties-cpp
|
|
|
|
, python3
|
|
|
|
, systemd
|
|
|
|
, tzdata
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2024-01-25 14:12:00 +00:00
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
let
|
|
|
|
edsDataDir = "${evolution-data-server}/share";
|
|
|
|
in
|
2024-01-25 14:12:00 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "ayatana-indicator-datetime";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "24.5.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AyatanaIndicators";
|
|
|
|
repo = "ayatana-indicator-datetime";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = finalAttrs.version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-lY49v2uZ7BawQoN/hmN6pbetHlSGjMHbS6S8Wl1bDmQ=";
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-05-15 15:35:15 +00:00
|
|
|
# Override systemd prefix
|
2024-01-25 14:12:00 +00:00
|
|
|
substituteInPlace data/CMakeLists.txt \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})' \
|
|
|
|
--replace-fail 'XDG_AUTOSTART_DIR "/etc' 'XDG_AUTOSTART_DIR "''${CMAKE_INSTALL_FULL_SYSCONFDIR}'
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
# Looking for Lomiri schemas for code generation
|
|
|
|
substituteInPlace src/CMakeLists.txt \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail '/usr/share/accountsservice' '${lomiri.lomiri-schemas}/share/accountsservice'
|
2024-01-25 14:12:00 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
glib # for schema hook
|
|
|
|
intltool
|
|
|
|
pkg-config
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2024-01-25 14:12:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ayatana-indicator-messages
|
|
|
|
evolution-data-server
|
|
|
|
glib
|
|
|
|
libaccounts-glib
|
|
|
|
libayatana-common
|
|
|
|
libical
|
|
|
|
libnotify
|
|
|
|
libuuid
|
|
|
|
properties-cpp
|
|
|
|
systemd
|
|
|
|
] ++ (with gst_all_1; [
|
|
|
|
gstreamer
|
|
|
|
gst-plugins-base
|
|
|
|
gst-plugins-good
|
|
|
|
]) ++ (with lomiri; [
|
|
|
|
cmake-extras
|
|
|
|
lomiri-schemas
|
|
|
|
lomiri-sounds
|
|
|
|
lomiri-url-dispatcher
|
|
|
|
]);
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
dbus
|
|
|
|
(python3.withPackages (ps: with ps; [
|
|
|
|
python-dbusmock
|
|
|
|
]))
|
|
|
|
tzdata
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
dbus-test-runner
|
|
|
|
gtest
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
(lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
|
|
|
|
(lib.cmakeBool "GSETTINGS_COMPILE" true)
|
|
|
|
(lib.cmakeBool "ENABLE_LOMIRI_FEATURES" true)
|
|
|
|
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
|
|
|
|
|
|
enableParallelChecking = false;
|
|
|
|
|
|
|
|
preCheck = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
export XDG_DATA_DIRS=${lib.strings.concatStringsSep ":" [
|
|
|
|
# org.ayatana.common schema
|
|
|
|
(glib.passthru.getSchemaDataDirPath libayatana-common)
|
|
|
|
|
|
|
|
# loading EDS engines to handle ICS-loading
|
|
|
|
edsDataDir
|
|
|
|
]}
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# schema is already added automatically by wrapper, EDS needs to be added explicitly
|
2024-02-29 20:09:43 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix XDG_DATA_DIRS : "${edsDataDir}"
|
|
|
|
)
|
2024-01-25 14:12:00 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
ayatana-indicators = [
|
|
|
|
"ayatana-indicator-datetime"
|
|
|
|
];
|
|
|
|
tests = {
|
|
|
|
inherit (nixosTests) ayatana-indicators;
|
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
updateScript = gitUpdater { };
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Ayatana Indicator providing clock and calendar";
|
|
|
|
longDescription = ''
|
|
|
|
This Ayatana Indicator provides a combined calendar, clock, alarm and
|
|
|
|
event management tool.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/AyatanaIndicators/ayatana-indicator-datetime";
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/AyatanaIndicators/ayatana-indicator-datetime/blob/${finalAttrs.version}/ChangeLog";
|
2024-01-25 14:12:00 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
})
|