Merge remote-tracking branch 'origin/master' into staging-next

This commit is contained in:
K900
2025-02-16 16:38:34 +03:00
45 changed files with 2322 additions and 114 deletions
+12
View File
@@ -574,6 +574,11 @@
githubId = 2071575;
name = "Adam C. Stephens";
};
adamjhf = {
github = "adamjhf";
githubId = 50264672;
name = "Adam Freeth";
};
adamt = {
email = "mail@adamtulinius.dk";
github = "adamtulinius";
@@ -19621,6 +19626,13 @@
githubId = 4196789;
name = "Nathan Ringo";
};
remyvv = {
name = "Remy van Velthuijsen";
email = "remy@remysplace.de";
github = "remyvv";
githubId = 2862815;
keys = [ { fingerprint = "1A76 F3A3 F843 2D5F D7E5 D07B 6FD8 F273 5BEB D1FC"; } ];
};
renatoGarcia = {
email = "fgarcia.renato@gmail.com";
github = "renatoGarcia";
@@ -86,6 +86,7 @@ in
libusermetrics
lomiri
lomiri-calculator-app
lomiri-calendar-app
lomiri-camera-app
lomiri-clock-app
lomiri-content-hub
+11 -5
View File
@@ -2,7 +2,6 @@
let
cfg = config.services.tlp;
enableRDW = config.networking.networkmanager.enable;
tlp = pkgs.tlp.override { inherit enableRDW; };
# TODO: Use this for having proper parameters in the future
mkTlpConfig = tlpConfig: lib.generators.toKeyValue {
mkKeyValue = lib.generators.mkKeyValueDefault {
@@ -41,6 +40,13 @@ in
DEPRECATED: use services.tlp.settings instead.
'';
};
package = lib.mkOption {
type = lib.types.package;
default = pkgs.tlp.override { inherit enableRDW; };
defaultText = "pkgs.tlp.override { enableRDW = config.networking.networkmanager.enable; }";
description = "The tlp package to use.";
};
};
};
@@ -64,10 +70,10 @@ in
"tlp.conf".text = (mkTlpConfig cfg.settings) + cfg.extraConfig;
} // lib.optionalAttrs enableRDW {
"NetworkManager/dispatcher.d/99tlp-rdw-nm".source =
"${tlp}/usr/lib/NetworkManager/dispatcher.d/99tlp-rdw-nm";
"${cfg.package}/usr/lib/NetworkManager/dispatcher.d/99tlp-rdw-nm";
};
environment.systemPackages = [ tlp ];
environment.systemPackages = [ cfg.package ];
services.tlp.settings = let
@@ -82,13 +88,13 @@ in
CPU_SCALING_MAX_FREQ_ON_BAT = maybeDefault cfg.cpufreq.max;
};
services.udev.packages = [ tlp ];
services.udev.packages = [ cfg.package ];
systemd = {
# use native tlp instead because it can also differentiate between AC/BAT
services.cpufreq.enable = false;
packages = [ tlp ];
packages = [ cfg.package ];
# XXX: These must always be disabled/masked according to [1].
#
# [1]: https://github.com/linrunner/TLP/blob/a9ada09e0821f275ce5f93dc80a4d81a7ff62ae4/tlp-stat.in#L319
+1
View File
@@ -564,6 +564,7 @@ in {
#logstash = handleTest ./logstash.nix {};
lomiri = discoverTests (import ./lomiri.nix);
lomiri-calculator-app = runTest ./lomiri-calculator-app.nix;
lomiri-calendar-app = runTest ./lomiri-calendar-app.nix;
lomiri-camera-app = runTest ./lomiri-camera-app.nix;
lomiri-clock-app = runTest ./lomiri-clock-app.nix;
lomiri-docviewer-app = runTest ./lomiri-docviewer-app.nix;
+79
View File
@@ -0,0 +1,79 @@
{ pkgs, lib, ... }:
{
name = "lomiri-calendar-app-standalone";
meta = {
maintainers = lib.teams.lomiri.members;
# This needs a Linux VM
platforms = lib.platforms.linux;
};
nodes.machine =
{ config, pkgs, ... }:
{
imports = [ ./common/x11.nix ];
services.xserver.enable = true;
environment = {
systemPackages =
with pkgs;
[
xdotool # mouse movement
]
++ (with pkgs.lomiri; [
suru-icon-theme
lomiri-calendar-app
]);
variables = {
UITK_ICON_THEME = "suru";
};
};
i18n.supportedLocales = [ "all" ];
fonts.packages = with pkgs; [
# Intended font & helps with OCR
ubuntu-classic
];
};
enableOCR = true;
testScript = ''
machine.wait_for_x()
with subtest("lomiri calendar launches"):
machine.succeed("lomiri-calendar-app >&2 &")
machine.wait_for_text(r"(January|February|March|April|May|June|July|August|September|October|November|December)")
machine.screenshot("lomiri-calendar")
with subtest("lomiri calendar works"):
# Switch to Agenda tab, less busy
machine.succeed("xdotool mousemove 300 50 click 1")
# Still on main page
machine.succeed("xdotool mousemove 500 650 click 1")
machine.wait_for_text(r"(Date|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|All day|Name|Details|More)")
machine.screenshot("lomiri-calendar_newevent")
# On New Event page
machine.succeed("xdotool mousemove 500 230 click 1")
machine.send_chars("foobar")
machine.sleep(2) # make sure they're actually in there
machine.succeed("xdotool mousemove 780 40 click 1")
machine.wait_for_text("Agenda")
machine.screenshot("lomiri-calendar_eventadded")
# Back on main page
# Event was created, does it have the correct name?
machine.wait_for_text("foobar")
machine.screenshot("lomiri-calendar_works")
machine.succeed("pkill -f lomiri-calendar-app")
with subtest("lomiri calendar localisation works"):
machine.succeed("env LANG=de_DE.UTF-8 lomiri-calendar-app >&2 &")
machine.wait_for_text(r"(Montag|Dienstag|Mittwoch|Donnerstag|Freitag|Samstag|Sonntag)")
machine.screenshot("lomiri-calendar_localised")
'';
}
@@ -17,7 +17,7 @@
buildGoModule rec {
pname = "rclone";
version = "1.69.0";
version = "1.69.1";
outputs = [
"out"
@@ -28,10 +28,10 @@ buildGoModule rec {
owner = "rclone";
repo = "rclone";
tag = "v${version}";
hash = "sha256-cJNlRubL6RFaYIr0WrDONqgmz75vNIIDHMqBpf5So5Q=";
hash = "sha256-TNknN4Wr+SWuYWRQmfH7Xjih5WdoSC+ky70Zru1ODsw=";
};
vendorHash = "sha256-+tugs0vNuIVUQPU3a3mF3e+zfi1IQuqjDm52D85o8NE=";
vendorHash = "sha256-ms8mHUd6AxYW/OHwwad/34rx082xDK1lh6FIvFshIHM=";
subPackages = [ "." ];
+120
View File
@@ -0,0 +1,120 @@
{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
testers,
libiodata,
pcre-cpp,
pkg-config,
qmake,
qtbase,
sailfish-access-control,
tzdata,
wrapQtAppsHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "timed";
version = "3.6.23";
outputs = [
"out"
"lib"
"dev"
];
src = fetchFromGitHub {
owner = "sailfishos";
repo = "timed";
tag = finalAttrs.version;
hash = "sha256-EJ0xxAkrISQfylBneYAEOINRvMUTWWw4E5GKjbq67aU=";
};
postPatch = ''
substituteInPlace src/{lib/lib,voland/voland}.pro \
--replace-fail '$$[QT_INSTALL_LIBS]' "$lib/lib" \
--replace-fail '/usr/include' "$dev/include" \
--replace-fail '$$[QT_INSTALL_DATA]' "$dev"
substituteInPlace src/server/server.pro \
--replace-fail '/usr/bin' "$out/bin" \
--replace-fail '/etc' "$out/etc" \
--replace-fail '/usr/lib' "$out/lib"
substituteInPlace tests/tests.pro \
--replace-fail '/opt' "$dev/opt" \
substituteInPlace tests/ut_networktime/ut_networktime.pro \
--replace-fail '/opt' "$dev/opt" \
--replace-fail '/etc' "$dev/etc"
substituteInPlace tests/tst_events/tst_events.pro \
--replace-fail '/opt' "$dev/opt"
substituteInPlace tools/timedclient/timedclient.pro \
--replace-fail '/usr/bin' "$out/bin"
substituteInPlace \
src/lib/aliases.cpp \
src/server/settings.cpp \
--replace-fail '/usr/share/zoneinfo' '${tzdata}/share/zoneinfo'
'';
# QMake doesn't handle this well
strictDeps = false;
nativeBuildInputs = [
pkg-config
qmake
wrapQtAppsHook
];
buildInputs = [
libiodata
pcre-cpp
sailfish-access-control
];
# Do all configuring now, not during build
postConfigure = ''
make qmake_all
'';
env = {
TIMED_VERSION = "${finalAttrs.version}";
# Other subprojects expect library to already be present
NIX_CFLAGS_COMPILE = "-isystem ${placeholder "dev"}/include";
NIX_LDFLAGS = "-L${placeholder "out"}/lib";
};
preBuild = ''
pushd src/lib
make ''${enableParallelBuilding:+-j$NIX_BUILD_CORES}
make install
popd
'';
passthru = {
updateScript = gitUpdater { };
tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
# Version fields exclude patch-level
};
};
meta = {
description = "Time daemon managing system time, time zone and settings";
homepage = "https://github.com/sailfishos/timed";
changelog = "https://github.com/sailfishos/timed/releases/tag/${finalAttrs.version}";
license = lib.licenses.lgpl21Only;
mainProgram = "timed";
maintainers = lib.teams.lomiri.members;
platforms = lib.platforms.linux;
pkgConfigModules = [
"timed-qt${lib.versions.major qtbase.version}"
"timed-voland-qt${lib.versions.major qtbase.version}"
];
};
})
@@ -43,13 +43,13 @@ let
in
buildPerlModule rec {
pname = "pipe-viewer";
version = "0.5.3";
version = "0.5.4";
src = fetchFromGitHub {
owner = "trizen";
repo = "pipe-viewer";
rev = version;
hash = "sha256-crYdbHIDcecfq1FKoRWX3u9x9wqdlaYrBgr7mGdEHeU=";
hash = "sha256-xChwX6lfwLH1Rv9rnd+ONKJFQTnoPv1aX9fIv7AUDBU=";
};
nativeBuildInputs = [ makeWrapper ] ++ lib.optionals withGtk3 [ wrapGAppsHook3 ];
+130
View File
@@ -0,0 +1,130 @@
{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
testers,
dbus,
doxygen,
glib,
libsForQt5,
pkg-config,
wrapGAppsHook3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "buteo-syncfw";
version = "0.11.8";
outputs = [
"out"
"dev"
"doc"
];
src = fetchFromGitHub {
owner = "sailfishos";
repo = "buteo-syncfw";
tag = finalAttrs.version;
hash = "sha256-QQ2NG+zeKZbmZRdJgEQpx3Y/C+3j91ltC+5CRaf6qBY=";
};
postPatch = ''
# Wildcard breaks file installation (tries to run ~ "install source/* target/*")
substituteInPlace doc/doc.pri \
--replace-fail 'htmldocs.files = $${PWD}/html/*' 'htmldocs.files = $${PWD}/html' \
--replace-fail '/usr/share/doc' "$doc/share/doc"
substituteInPlace declarative/declarative.pro \
--replace-fail '$$[QT_INSTALL_QML]' "$out/${libsForQt5.qtbase.qtQmlPrefix}"
substituteInPlace libbuteosyncfw/libbuteosyncfw.pro \
--replace-fail '$$[QT_INSTALL_LIBS]' "$out/lib" \
--replace-fail '/usr/include' "$dev/include"
substituteInPlace msyncd/msyncd-app.pro \
--replace-fail '/usr/bin' "$out/bin" \
--replace-fail '/usr/lib/systemd' "$out/lib/systemd" \
--replace-fail '/etc' "$out/etc" \
--replace-fail '/usr/share' "$out/share"
substituteInPlace oopp-runner/oopp-runner.pro \
--replace-fail '/usr/libexec' "$out/libexec"
# We don't have invoked (mapplauncherd)
substituteInPlace msyncd/bin/msyncd.service \
--replace-fail 'ExecStart=/usr/bin/invoker -G -o -s --type=qt5 /usr/bin/msyncd' "ExecStart=$out/bin/msyncd"
substituteInPlace msyncd/com.meego.msyncd.service \
--replace-fail 'Exec=/usr/bin/msyncd' "Exec=$out/bin/msyncd"
# Tests expect to get installed, require excessive patching
substituteInPlace buteo-sync.pro \
--replace-fail 'unittests \' '\' \
--replace-fail 'unittests.depends' '# unittests.depends'
'';
# QMake doesn't handle strictDeps well
strictDeps = false;
nativeBuildInputs =
[
doxygen
glib
pkg-config
wrapGAppsHook3
]
++ (with libsForQt5; [
qmake
wrapQtAppsHook
]);
buildInputs =
[
dbus
]
++ (with libsForQt5; [
accounts-qt
qtdeclarative
signond
]);
dontWrapGApps = true;
# Do all configuring now, not during build
postConfigure = ''
make qmake_all
'';
# Tests expect to get installed, require excessive patching & managing
doCheck = false;
postInstall = ''
glib-compile-schemas $out/share/glib-2.0/schemas
'';
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
passthru = {
updateScript = gitUpdater { };
tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
# Version is hardcoded to 1.0.0
};
};
meta = {
description = "Buteo Synchronization Framework";
homepage = "https://github.com/sailfishos/buteo-syncfw";
changelog = "https://github.com/sailfishos/buteo-syncfw/releases/tag/${finalAttrs.version}";
license = lib.licenses.lgpl21Only;
mainProgram = "msyncd";
maintainers = lib.teams.lomiri.members;
platforms = lib.platforms.linux;
pkgConfigModules = [
"buteosyncfw5"
];
};
})
+1 -1
View File
@@ -38,6 +38,6 @@ buildGoModule rec {
license = licenses.asl20;
platforms = platforms.unix;
mainProgram = "ddev";
maintainers = [ ];
maintainers = with maintainers; [ remyvv ];
};
}
+2 -2
View File
@@ -10,13 +10,13 @@
buildGoModule rec {
pname = "doppler";
version = "3.71.1";
version = "3.72.0";
src = fetchFromGitHub {
owner = "dopplerhq";
repo = "cli";
rev = version;
hash = "sha256-qseFEyIQeD1glNi5lDB5XJAWtC9EMFJbGuSJk+Q5qok=";
hash = "sha256-cwH1j/acp5j90P6drKefunGFSrPTjBkbqXNNE44E63I=";
};
vendorHash = "sha256-K98cb1AF82jXm5soILO3MQy2LwOGREt8OwGySK299hA=";
@@ -15,13 +15,13 @@ let
nodejs = nodejs_20;
buildNpmPackage' = buildNpmPackage.override { inherit nodejs; };
version = "1.19.0";
version = "1.19.3";
src = fetchFromGitHub {
owner = "httptoolkit";
repo = "httptoolkit-server";
rev = "refs/tags/v${version}";
hash = "sha256-S4Io4X5Hlvm/5HoKIQ/OTor9jZvMz6me5RyfZ8FwOdM=";
hash = "sha256-cIxpV155A76TCOXurJhBA0dQpwn63hTpokBRXMLBEUA=";
};
overridesNodeModules = buildNpmPackage' {
@@ -98,7 +98,7 @@ buildNpmPackage' {
patches = [ ./only-build-for-one-platform.patch ];
npmDepsHash = "sha256-njSNdpo+CIfS9LTnshawJ7297tFc8ssjUqJcHk8kBZE=";
npmDepsHash = "sha256-GZESwRDG1gEVhkclR+LBWwoUYaE1xS0z4EvPN7kYTrA=";
npmFlags = [ "--ignore-scripts" ];
+125
View File
@@ -0,0 +1,125 @@
{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
testers,
cmake,
doxygen,
extra-cmake-modules,
graphviz,
libsForQt5,
perl,
pkg-config,
tzdata,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mkcal";
version = "0.7.26";
src = fetchFromGitHub {
owner = "sailfishos";
repo = "mkcal";
tag = finalAttrs.version;
hash = "sha256-myOSzxzZmuOU7MShPfUOsHJilw9B6jh3W1S3P5dhcvs=";
};
outputs = [
"out"
"dev"
"doc"
];
postPatch = ''
substituteInPlace doc/CMakeLists.txt \
--replace-fail 'COMMAND ''${DOXYGEN}' 'WORKING_DIRECTORY ''${CMAKE_SOURCE_DIR} COMMAND ''${DOXYGEN}'
# Dynamic menus are broken in docs
sed -i doc/libmkcal.cfg -e '1i HTML_DYNAMIC_MENUS = NO'
'';
strictDeps = true;
nativeBuildInputs =
[
cmake
doxygen
graphviz
perl
pkg-config
]
++ (with libsForQt5; [
wrapQtAppsHook
]);
buildInputs =
[
extra-cmake-modules
]
++ (with libsForQt5; [
kcalendarcore
qtbase
qtpim
timed
]);
nativeCheckInputs = [
tzdata
];
cmakeFlags = [
(lib.cmakeBool "BUILD_PLUGINS" false)
(lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
(lib.cmakeBool "INSTALL_TESTS" false)
(lib.cmakeBool "BUILD_DOCUMENTATION" true)
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (
lib.concatStringsSep ";" [
# Exclude tests
"-E"
(lib.strings.escapeShellArg "(${
lib.concatStringsSep "|" [
# Test expects to be passed a real, already existing database to test migrations. We don't have one
"tst_perf"
# 10/97 tests fail. Half seem related to time (zone) issues w/ local time / Helsinki timezone
# Other half are x-1/x on lists of alarms/events
"tst_storage"
]
})")
]
))
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
# Parallelism breaks tests
enableParallelChecking = false;
preCheck = ''
export HOME=$TMP
export QT_QPA_PLATFORM=minimal
export QT_PLUGIN_PATH=${lib.getBin libsForQt5.qtbase}/${libsForQt5.qtbase.qtPluginPrefix}
'';
passthru = {
updateScript = gitUpdater { };
tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
# version field doesn't exactly match current version
};
};
meta = {
description = "Mobile version of the original KCAL from KDE";
homepage = "https://github.com/sailfishos/mkcal";
changelog = "https://github.com/sailfishos/mkcal/releases/tag/${finalAttrs.version}";
license = lib.licenses.lgpl2Plus;
mainProgram = "mkcaltool";
maintainers = lib.teams.lomiri.members;
platforms = lib.platforms.linux;
pkgConfigModules = [
"libmkcal-qt5"
];
};
})
-74
View File
@@ -1,74 +0,0 @@
{
lib,
fetchFromGitHub,
python3Packages,
gobject-introspection,
libadwaita,
wrapGAppsHook4,
lmmath,
}:
python3Packages.buildPythonApplication rec {
pname = "plots";
version = "0.8.5";
src = fetchFromGitHub {
owner = "alexhuntley";
repo = "Plots";
rev = "v${version}";
hash = "sha256-GjNpaorxkkhZsqrKq4kO5nqF5+4I4tmSc023AZpY8Sw=";
};
nativeBuildInputs = [
gobject-introspection
wrapGAppsHook4
];
buildInputs = [ libadwaita ];
propagatedBuildInputs = with python3Packages; [
pygobject3
numpy
lark
jinja2
freetype-py
pyopengl
pycairo
pyglm
];
nativeCheckInputs = with python3Packages; [ pytest ];
postInstall = ''
install -D ${lmmath}/share/fonts/opentype/latinmodern-math.otf -t $out/share/fonts/
install -D res/com.github.alexhuntley.Plots.metainfo.xml -t $out/share/metainfo/
install -D res/com.github.alexhuntley.Plots.desktop -t $out/share/applications/
install -D res/com.github.alexhuntley.Plots.svg -t $out/share/icons/hicolor/scalable/apps/
install -D res/com.github.alexhuntley.Plots-symbolic.svg -t $out/share/icons/hicolor/symbolic/apps/
for lang_dir in help/*; do
lang=$(basename "$lang_dir")
install -D -t $out/share/help/$lang/plots/ $lang_dir/*
done
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
description = "Graph plotting app for GNOME";
mainProgram = "plots";
longDescription = ''
Plots is a graph plotting app for GNOME.
Plots makes it easy to visualise mathematical formulae.
In addition to basic arithmetic operations, it supports trigonometric, hyperbolic, exponential and logarithmic functions, as well as arbitrary sums and products.
It can display polar equations, and both implicit and explicit Cartesian equations.
'';
homepage = "https://github.com/alexhuntley/Plots";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ sund3RRR ];
};
}
@@ -0,0 +1,91 @@
{
stdenv,
lib,
fetchFromGitHub,
unstableGitUpdater,
cmake,
extra-cmake-modules,
libsForQt5,
mkcal,
pkg-config,
tzdata,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "qtorganizer-mkcal";
version = "0-unstable-2025-02-14";
src = fetchFromGitHub {
owner = "dcaliste";
repo = "qtorganizer-mkcal";
rev = "3090565d70ecdfaad2cba57d5a895fa69afd024a";
hash = "sha256-ZNAcqjkVf9efP+WWTDr2YFZT+eZdIJAfX45Gm0+Y81A=";
};
postPatch = ''
substituteInPlace src/CMakeLists.txt \
--replace-fail 'DESTINATION ''${CMAKE_INSTALL_LIBDIR}/qt5/plugins' 'DESTINATION ''${CMAKE_INSTALL_PREFIX}/${libsForQt5.qtbase.qtPluginPrefix}'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs =
[
extra-cmake-modules
mkcal
]
++ (with libsForQt5; [
kcalendarcore
qtbase
qtpim
]);
nativeCheckInputs = [
tzdata
];
dontWrapQtApps = true;
cmakeFlags = [
(lib.cmakeBool "INSTALL_TESTS" false)
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
preCheck =
let
listToQtVar = suffix: lib.makeSearchPathOutput "bin" suffix;
in
''
export QT_QPA_PLATFORM=minimal
export QT_PLUGIN_PATH=${
listToQtVar libsForQt5.qtbase.qtPluginPrefix (
with libsForQt5;
[
qtbase
qtpim
]
)
}
# Wants to load the just-built plugin, doesn't try to set up the build dir / environment for that
mkdir -p $TMP/fake-install/organizer
cp ./src/libqtorganizer_mkcal.so $TMP/fake-install/organizer
export QT_PLUGIN_PATH=$TMP/fake-install:$QT_PLUGIN_PATH
'';
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "QtOrganizer plugin using sqlite via mKCal";
homepage = "https://github.com/dcaliste/qtorganizer-mkcal";
license = lib.licenses.bsd3;
maintainers = lib.teams.lomiri.members;
platforms = lib.platforms.linux;
};
})
+1 -18
View File
@@ -30,12 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
cp $src $out/share/rundeck/rundeck.war
mkdir -p $out/bin
# Main rundeck executable
makeWrapper ${lib.getExe jdk17} $out/bin/rundeck \
--set RDECK_BASE "/var/lib/rundeck" \
--add-flags "-Xmx4g" \
--add-flags "-Drdeck.base=/var/lib/rundeck" \
--add-flags "-Drundeck.config.location=/etc/rundeck" \
--add-flags "-jar $out/share/rundeck/rundeck.war" \
--prefix PATH : ${
lib.makeBinPath [
@@ -45,19 +40,6 @@ stdenv.mkDerivation (finalAttrs: {
]
}
# Installation helper script
makeWrapper ${lib.getExe jdk17} $out/bin/rundeck-install \
--set RDECK_BASE "/var/lib/rundeck" \
--add-flags "-jar $out/share/rundeck/rundeck.war" \
--add-flags "--installonly" \
--prefix PATH : ${
lib.makeBinPath [
which
coreutils
openssh
]
}
runHook postInstall
'';
@@ -74,5 +56,6 @@ stdenv.mkDerivation (finalAttrs: {
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.liberodark ];
mainProgram = "rundeck";
};
})
@@ -0,0 +1,83 @@
{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
testers,
glib,
libsForQt5,
pkg-config,
qt6Packages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sailfish-access-control";
version = "0.0.12";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "sailfishos";
repo = "sailfish-access-control";
tag = finalAttrs.version;
hash = "sha256-3gZUz6MZ/dZ1ntPmU89vEoLJ3zPE6Tax/YHw7/MwNCI=";
};
# sourceRoot breaks patches
preConfigure = ''
cd glib
'';
strictDeps = true;
nativeBuildInputs = [
pkg-config
];
buildInputs = [
glib
];
makeFlags = [
"VERSION=${finalAttrs.version}"
];
installFlags = [
"ROOT="
"PREFIX=${placeholder "out"}"
"INCDIR=${placeholder "dev"}/include/sailfishaccesscontrol"
];
passthru = {
updateScript = gitUpdater { };
tests = {
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
versionCheck = true;
};
qt5 = libsForQt5.sailfish-access-control-plugin;
qt6 = qt6Packages.sailfish-access-control-plugin;
};
};
meta = {
description = "Thin wrapper on top of pwd.h and grp.h of glibc";
longDescription = ''
This package provides a thin wrapper library on top of the getuid, getpwuid, getgrouplist, and friends.
Checking whether a user belongs to a group should be done via this Sailfish Access Control library.
This will make it easier to fix for instance rerentrancy issues.
'';
homepage = "https://github.com/sailfishos/sailfish-access-control";
changelog = "https://github.com/sailfishos/sailfish-access-control/releases/tag/${finalAttrs.version}";
license = lib.licenses.lgpl2Plus;
maintainers = lib.teams.lomiri.members;
platforms = lib.platforms.linux;
pkgConfigModules = [
"sailfishaccesscontrol"
];
};
})
+13 -1
View File
@@ -8,6 +8,7 @@
getent,
iproute2,
iptables,
lsof,
shadow,
procps,
nixosTests,
@@ -45,7 +46,8 @@ buildGo123Module {
vendorHash = "sha256-81UOjoC5GJqhNs4vWcQ2/B9FMaDWtl0rbuFXmxbu5dI=";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ makeWrapper ] ++ [
nativeBuildInputs = [
makeWrapper
installShellFiles
];
@@ -77,6 +79,16 @@ buildGo123Module {
moveToOutput "bin/derper" "$derper"
moveToOutput "bin/derpprobe" "$derper"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
wrapProgram $out/bin/tailscaled \
--prefix PATH : ${
lib.makeBinPath [
# Uses lsof only on macOS to detect socket location
# See tailscale safesocket_darwin.go
lsof
]
}
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/tailscaled \
--prefix PATH : ${
+78
View File
@@ -0,0 +1,78 @@
{
lib,
stdenv,
fetchurl,
versionCheckHook,
autoPatchelfHook,
makeWrapper,
tailwindcss_4,
}:
let
version = "4.0.6";
inherit (stdenv.hostPlatform) system;
throwSystem = throw "tailwindcss has not been packaged for ${system} yet.";
plat =
{
aarch64-darwin = "macos-arm64";
aarch64-linux = "linux-arm64";
x86_64-darwin = "macos-x64";
x86_64-linux = "linux-x64";
}
.${system} or throwSystem;
hash =
{
aarch64-darwin = "sha256-FopnfuGYBjjQkfPHdIWacpom9WsAVRwHPQ/14waWR7s=";
aarch64-linux = "sha256-y+9d53skmoSZPhbtk9vUkhKNzIE1A868Lnkw7Cot/PU=";
x86_64-darwin = "sha256-rFjaDtPjJO9W6G//7Uu5CJE+pB0sqLrMByC5pv4FA4E=";
x86_64-linux = "sha256-14EMXenpvPsKlnu5kebNu3MmfWwa7UYfAgEkh5EwVRM=";
}
.${system} or throwSystem;
in
stdenv.mkDerivation {
inherit version;
pname = "tailwindcss_4";
src = fetchurl {
url =
"https://github.com/tailwindlabs/tailwindcss/releases/download/v${version}/tailwindcss-" + plat;
inherit hash;
};
nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
buildInputs = [ makeWrapper ];
dontUnpack = true;
dontBuild = true;
dontStrip = true;
installPhase = ''
mkdir -p $out/bin
install -m755 $src $out/bin/tailwindcss
'';
# libstdc++.so.6 for @parcel/watcher
postFixup = ''
wrapProgram $out/bin/tailwindcss --prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [ stdenv.cc.cc.lib ]
}
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/tailwindcss";
versionCheckProgramArg = "--help";
passthru.updateScript = ./update.sh;
meta = {
description = "Command-line tool for the CSS framework with composable CSS classes, standalone v4 CLI";
homepage = "https://tailwindcss.com/blog/tailwindcss-v4";
license = lib.licenses.mit;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
maintainers = [ lib.maintainers.adamjhf ];
mainProgram = "tailwindcss";
platforms = lib.platforms.darwin ++ lib.platforms.linux;
};
}
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused jq nix-prefetch
set -eou pipefail
ROOT="$(dirname "$(readlink -f "$0")")"
CURRENT_VERSION=$(nix-instantiate --eval --strict --json -A tailwindcss.version . | jq -r .)
LATEST_VERSION=$(curl --fail --silent https://api.github.com/repos/tailwindlabs/tailwindcss/releases/latest | jq --raw-output .tag_name | sed 's/v//')
sed -i "s/version = \".*\"/version = \"${LATEST_VERSION}\"/" "$ROOT/default.nix"
if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
echo "tailwindcss already at latest version $CURRENT_VERSION, exiting"
exit 0
fi
function updatePlatform() {
NIXPLAT=$1
TAILWINDPLAT=$2
echo "Updating tailwindcss for $NIXPLAT"
URL="https://github.com/tailwindlabs/tailwindcss/releases/download/v${LATEST_VERSION}/tailwindcss-${TAILWINDPLAT}"
HASH=$(nix hash to-sri --type sha256 "$(nix-prefetch-url --type sha256 "$URL")")
sed -i "s,$NIXPLAT = \"sha256.*\",$NIXPLAT = \"${HASH}\"," "$ROOT/default.nix"
}
updatePlatform aarch64-darwin macos-arm64
updatePlatform aarch64-linux linux-arm64
updatePlatform x86_64-darwin macos-x64
updatePlatform x86_64-linux linux-x64
@@ -0,0 +1,73 @@
From 0658ff459aa200dfe3561646f5e73cd8715a1d0f Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Wed, 12 Jun 2024 09:24:05 +0200
Subject: [PATCH] Migrate to new QtContact sqlite backend fixes:
https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/issues/221
---
src/qml/ContactChoicePopup.qml | 34 ++++------------------------------
1 file changed, 4 insertions(+), 30 deletions(-)
diff --git a/src/qml/ContactChoicePopup.qml b/src/qml/ContactChoicePopup.qml
index f514c23b..59fe545d 100644
--- a/src/qml/ContactChoicePopup.qml
+++ b/src/qml/ContactChoicePopup.qml
@@ -20,6 +20,7 @@ import Lomiri.Components 1.3
import Lomiri.Components.Popups 1.3
import Lomiri.Components.ListItems 1.3
import Lomiri.Components.Themes.Ambiance 1.3
+import Lomiri.Contacts 0.1
import QtOrganizer 5.0
import QtContacts 5.0
@@ -38,36 +39,9 @@ Popover {
visible: contactModel.contacts.length === 0
}
- UnionFilter {
- id: filter
-
- property string searchString: ""
-
- filters: [
- DetailFilter{
- detail: ContactDetail.Name
- field: Name.FirstName
- matchFlags: Filter.MatchContains
- value: filter.searchString
- },
- DetailFilter{
- detail: ContactDetail.Name
- field: Name.LastName
- matchFlags: Filter.MatchContains
- value: filter.searchString
- },
- DetailFilter{
- detail: ContactDetail.DisplayLabel
- field: DisplayLabel.Label
- matchFlags: Filter.MatchContains
- value: filter.searchString
- }
- ]
- }
-
- ContactModel {
+ ContactListModel {
id: contactModel
- manager: "galera"
+ manager: ContactManager.manager()
filter: filter
autoUpdate: true
}
@@ -78,7 +52,7 @@ Popover {
interval: 500
repeat: false
onTriggered: {
- filter.searchString = searchBox.text
+ contactModel.filterTerm = searchBox.text
}
}
--
GitLab
@@ -0,0 +1,301 @@
From fe4c377c08ecc7fa09e0a9407c17afcb63325822 Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Tue, 29 Oct 2024 16:11:47 +0100
Subject: [PATCH] EDS -> mkCal Initial commit
---
debian/control | 7 ++++---
src/qml/AgendaView.qml | 2 +-
src/qml/CalendarChoicePopup.qml | 24 +++++++++++++++---------
src/qml/EventActions.qml | 23 +++++++++++++++++------
src/qml/EventDetails.qml | 2 +-
src/qml/EventListModel.qml | 21 +++++++++------------
src/qml/ExportPageCommon.qml | 2 +-
src/qml/TimeLineBaseComponent.qml | 2 +-
src/qml/calendar.qml | 2 +-
9 files changed, 50 insertions(+), 35 deletions(-)
diff --git a/debian/control b/debian/control
index 1f4fe4d5..5f8a603f 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,8 @@ Build-Depends: cmake,
qml-module-qtquick2,
qml-module-qttest,
qml-module-lomiri-components,
+ qml-module-buteo-profiles,
+ qt5-default,
qtdeclarative5-dev,
qtdeclarative5-dev-tools,
Standards-Version: 4.7.0
@@ -29,10 +31,9 @@ Depends: ${misc:Depends},
qml-module-lomiri-components,
qml-module-lomiri-onlineaccounts-client,
qml-module-sso-onlineaccounts,
- qtcontact5-galera,
- qml-module-lomiri-syncmonitor | qml-module-lomiri-syncmonitor0.1,
- qtorganizer5-eds,
+ qml-module-buteo-profiles,
ubuntu-mobile-icons | suru-icon-theme,
+ qtorganizer-mkcal,
Description: Calendar application
The Calendar application devices lets you organise your life your way by
month, week or daily diary.
diff --git a/src/qml/AgendaView.qml b/src/qml/AgendaView.qml
index 08d7bd21..5996cbee 100644
--- a/src/qml/AgendaView.qml
+++ b/src/qml/AgendaView.qml
@@ -35,7 +35,7 @@ PageWithBottomEdge {
function hasEnabledCalendars() {
var enabled_calendars = eventListModel.getCollections().filter( function( item ) {
- return item.extendedMetaData( "collection-selected" );
+ return item.extendedMetaData( "visible" );
} );
return !!enabled_calendars.length;
diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml
index 39416e5c..5d29ef86 100644
--- a/src/qml/CalendarChoicePopup.qml
+++ b/src/qml/CalendarChoicePopup.qml
@@ -20,7 +20,8 @@ import QtQuick 2.4
import QtOrganizer 5.0
import Lomiri.Components 1.3
import Lomiri.Content 1.3
-import Lomiri.SyncMonitor 0.1
+//import Lomiri.SyncMonitor 0.1
+import Buteo 0.1
import Lomiri.Components.Popups 1.3
import SSO.OnlineAccounts 0.1
@@ -59,17 +60,22 @@ Page {
// TRANSLATORS: Please translate this string to 15 characters only.
// Currently ,there is no way we can increase width of action menu currently.
text: enabled ? i18n.tr("Sync") : i18n.tr("Syncing")
- onTriggered: syncMonitor.sync(["calendar"])
- enabled: (syncMonitor.state !== "syncing")
+ onTriggered: buteoSync.startSyncByCategory("calendar")
+ enabled: (!buteoSync.synchronizing)
visible: !networkError
}
flickable: flickable
}
- SyncMonitor {
- id: syncMonitor
+ ButeoSync {
+ id: buteoSync
}
+
+ // SyncMonitor {
+ // id: syncMonitor
+ // }
+
Flickable {
id: flickable
@@ -162,10 +168,10 @@ Page {
id: checkBox
objectName: "checkBox"
SlotsLayout.position: SlotsLayout.Last
- checked: modelData.extendedMetaData("collection-selected")
+ checked: modelData.extendedMetaData("visible")
enabled: !calendarChoicePage.isInEditMode
onCheckedChanged: {
- if (!checkBox.checked && modelData.extendedMetaData("collection-readonly") === false) {
+ if (!checkBox.checked && modelData.extendedMetaData("readOnly") === false) {
var collections = calendarChoicePage.model.getWritableAndSelectedCollections();
if (collections.length == 1) {
PopupUtils.open(singleWritableDialogComponent);
@@ -174,8 +180,8 @@ Page {
}
}
- if (modelData.extendedMetaData("collection-selected") !== checkBox.checked) {
- modelData.setExtendedMetaData("collection-selected",checkBox.checked)
+ if (modelData.extendedMetaData("visible") !== checkBox.checked) {
+ modelData.setExtendedMetaData("visible",checkBox.checked)
var collection = calendarChoicePage.model.collection(modelData.collectionId);
calendarChoicePage.model.saveCollection(collection);
}
diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml
index 30617065..d583eb1a 100644
--- a/src/qml/EventActions.qml
+++ b/src/qml/EventActions.qml
@@ -18,7 +18,8 @@
import QtQuick 2.4
import Lomiri.Components 1.3
-import Lomiri.SyncMonitor 0.1
+//import Lomiri.SyncMonitor 0.1
+import Buteo.Profiles 0.1
import Lomiri.Components.Popups 1.3
import Qt.labs.settings 1.0
@@ -29,7 +30,7 @@ Item {
property alias syncCalendarAction: _syncCalendarAction
property alias settingsAction: _settingsAction
property Settings settings
- readonly property bool syncInProgress: (syncMonitor.state !== "") && (syncMonitor.state === "syncing")
+ readonly property bool syncInProgress: buteoSync.synchronizing
onSyncInProgressChanged: {
@@ -77,11 +78,20 @@ Item {
// TRANSLATORS: Please translate this string to 15 characters only.
// Currently ,there is no way we can increase width of action menu currently.
text: i18n.tr("Sync")
- onTriggered: syncMonitor.sync(["calendar"])
- enabled: syncMonitor.enabledServices ? syncMonitor.serviceIsEnabled("calendar") : false
- visible: syncMonitor.enabledServices ? true : false
+ onTriggered: buteoSync.synchronize()
+ enabled: buteoSync.profiles.length > 0 ? true: false
+ visible: buteoSync.serviceAvailable ? true : false
}
+ SyncManager {
+ id: buteoSync
+ filterHidden: true
+ filterBy.key: "category"
+ filterBy.value: "calendar"
+ }
+
+
+/*
SyncMonitor {
id: syncMonitor
onSyncError: {
@@ -94,6 +104,7 @@ Item {
}
}
}
+ */
Action{
id: _showCalendarAction
@@ -125,7 +136,7 @@ Item {
target: _syncCalendarAction
iconSource: "../assets/sync-cancel.svg"
text: i18n.tr("Syncing")
- onTriggered: syncMonitor.cancel(["calendar"])
+ //onTriggered: syncMonitor.cancel(["calendar"])
}
},
State {
diff --git a/src/qml/EventDetails.qml b/src/qml/EventDetails.qml
index e8b5dcfb..63377c5d 100644
--- a/src/qml/EventDetails.qml
+++ b/src/qml/EventDetails.qml
@@ -49,7 +49,7 @@ Page {
text: i18n.tr("Edit");
objectName: "edit"
iconName: "edit";
- enabled: !collection.extendedMetaData("collection-readonly")
+ enabled: !collection.extendedMetaData("readOnly")
shortcut: "Ctrl+E"
onTriggered: {
if( event.itemType === Type.EventOccurrence ) {
diff --git a/src/qml/EventListModel.qml b/src/qml/EventListModel.qml
index 7e3b28af..8e9c958a 100644
--- a/src/qml/EventListModel.qml
+++ b/src/qml/EventListModel.qml
@@ -22,7 +22,7 @@ import "dateExt.js" as DateExt
OrganizerModel {
id: eventModel
- manager:"eds"
+ manager:"mkcal"
readonly property bool appIsActive: (Qt.application.state === Qt.ApplicationActive)
property bool active: false
@@ -84,7 +84,7 @@ OrganizerModel {
if (!collection)
return false
- return collection.extendedMetaData("collection-readonly") === true ||
+ return collection.extendedMetaData("readOnly") === true ||
collection.extendedMetaData("collection-sync-readonly") === true
}
@@ -93,14 +93,12 @@ OrganizerModel {
var collections = eventModel.collections;
for(var i = 0 ; i < collections.length ; ++i) {
var cal = collections[i];
- if( cal.extendedMetaData("collection-type") === "Calendar" ) {
- // Handle the special QtContactBirthdays calendar from lomiri-abook2cal-syncd
- if (cal.name === "QtContactBirthdays") {
- cal.name = i18n.tr("Birthdays & Anniversaries")
- }
-
- cals.push(cal);
+ // Handle the special QtContactBirthdays calendar from lomiri-abook2cal-syncd
+ if (cal.name === "QtContactBirthdays") {
+ cal.name = i18n.tr("Birthdays & Anniversaries")
}
+
+ cals.push(cal);
}
cals.sort(eventModel._sortCollections)
return cals;
@@ -111,8 +109,7 @@ OrganizerModel {
var collections = eventModel.collections;
for(var i = 0 ; i < collections.length ; ++i) {
var cal = collections[i];
- if( cal.extendedMetaData("collection-type") === "Calendar" &&
- cal.extendedMetaData("collection-selected") === true &&
+ if( cal.extendedMetaData("visible") === true &&
!collectionIsReadOnly(cal)) {
cals.push(cal);
}
@@ -128,7 +125,7 @@ OrganizerModel {
var firstSelectedCollection = null
for(var i = 0 ; i < cals.length ; ++i) {
var cal = cals[i]
- if (cal.extendedMetaData("collection-selected") === true) {
+ if (cal.extendedMetaData("visible") === true) {
if (!firstSelectedCollection) {
firstSelectedCollection = cal
}
diff --git a/src/qml/ExportPageCommon.qml b/src/qml/ExportPageCommon.qml
index 0a1f2f34..88310560 100644
--- a/src/qml/ExportPageCommon.qml
+++ b/src/qml/ExportPageCommon.qml
@@ -151,7 +151,7 @@ Page {
OrganizerModel{
id: organizerExporter
- manager:"eds"
+ manager:"mkcal"
autoUpdate: true
onItemCountChanged: {
diff --git a/src/qml/TimeLineBaseComponent.qml b/src/qml/TimeLineBaseComponent.qml
index 519300df..7e8a364b 100644
--- a/src/qml/TimeLineBaseComponent.qml
+++ b/src/qml/TimeLineBaseComponent.qml
@@ -193,7 +193,7 @@ Item {
id: mainModel
objectName: "timeLineBaseEventListModel:" + root.objectName
- manager:"eds"
+ manager:"mkcal"
startPeriod: startDay.midnight().utcEarliest();
endPeriod: type == ViewType.ViewTypeWeek ? startDay.addDays(6).endOfDay().utcLatest(): startDay.endOfDay().utcLatest()
diff --git a/src/qml/calendar.qml b/src/qml/calendar.qml
index 6238a0f5..2b6e6cfd 100644
--- a/src/qml/calendar.qml
+++ b/src/qml/calendar.qml
@@ -251,7 +251,7 @@ MainView {
var collections = eventModel.getCollections();
for(var i=0; i < collections.length ; ++i) {
var collection = collections[i]
- if(collection.extendedMetaData("collection-selected") === true) {
+ if(collection.extendedMetaData("visible") === true) {
collectionIds.push(collection.collectionId);
}
}
--
GitLab
@@ -0,0 +1,48 @@
From 95218b057d1c9ed571e1abc41f0377c6a087ca37 Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Mon, 4 Nov 2024 16:52:56 +0100
Subject: [PATCH] fix, allDay events not shown. mkCal store allDay event with
the same dateStart and dateEnd. Make it work with that setup
---
src/qml/AllDayEventComponent.qml | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/qml/AllDayEventComponent.qml b/src/qml/AllDayEventComponent.qml
index ba5a67aa..d3364c37 100644
--- a/src/qml/AllDayEventComponent.qml
+++ b/src/qml/AllDayEventComponent.qml
@@ -37,20 +37,22 @@ Row {
height: units.gu(5)
function getAllDayEvents(startDate, endDate) {
- var map = {};
- var items = model.itemsByTimePeriod(startDate,endDate);
- for(var i = 0 ; i < items.length ; ++i) {
- var event = items[(i)];
+ let map = {};
+ const events = model.itemsByTimePeriod(startDate,endDate);
+ events.forEach( event => {
if( event && event.allDay ) {
- for(var d = event.startDateTime; d < event.endDateTime; d = d.addDays(1)) {
- var key = Qt.formatDateTime(d, "dd-MMM-yyyy");
- if( !(key in map)) {
+ let currentDate = event.startDateTime
+ while (currentDate <= event.endDateTime) {
+ const key = Qt.formatDateTime(currentDate, "dd-MMM-yyyy");
+ if (!map[key]) {
map[key] = [];
}
map[key].push(event);
+
+ currentDate = currentDate.addDays(1);
}
}
- }
+ })
return map;
}
--
GitLab
@@ -0,0 +1,97 @@
From 06750cc6f042cbcf4fa5e2fdd5a6eb29aff0d1b3 Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Mon, 4 Nov 2024 16:54:13 +0100
Subject: [PATCH] Use ButeoSync profiles for sync management
---
src/qml/CalendarChoicePopup.qml | 20 +++++++++-----------
src/qml/EventActions.qml | 7 ++++---
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml
index 5d29ef86..8fa1e4b2 100644
--- a/src/qml/CalendarChoicePopup.qml
+++ b/src/qml/CalendarChoicePopup.qml
@@ -20,8 +20,7 @@ import QtQuick 2.4
import QtOrganizer 5.0
import Lomiri.Components 1.3
import Lomiri.Content 1.3
-//import Lomiri.SyncMonitor 0.1
-import Buteo 0.1
+import Buteo.Profiles 0.1
import Lomiri.Components.Popups 1.3
import SSO.OnlineAccounts 0.1
@@ -31,6 +30,7 @@ Page {
objectName: "calendarchoicepopup"
property var model
+ readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing
signal collectionUpdated()
function accountFromId(accountId)
@@ -60,22 +60,20 @@ Page {
// TRANSLATORS: Please translate this string to 15 characters only.
// Currently ,there is no way we can increase width of action menu currently.
text: enabled ? i18n.tr("Sync") : i18n.tr("Syncing")
- onTriggered: buteoSync.startSyncByCategory("calendar")
- enabled: (!buteoSync.synchronizing)
- visible: !networkError
+ onTriggered: buteoSync.synchronize()
+ enabled: calendarChoicePage.canSynchronize
+ visible: buteoSync.serviceAvailable
}
flickable: flickable
}
- ButeoSync {
+ SyncManager {
id: buteoSync
+ filterHidden: true
+ filterBy.key: "category"
+ filterBy.value: "calendar"
}
-
- // SyncMonitor {
- // id: syncMonitor
- // }
-
Flickable {
id: flickable
diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml
index d583eb1a..d46e8e25 100644
--- a/src/qml/EventActions.qml
+++ b/src/qml/EventActions.qml
@@ -18,7 +18,6 @@
import QtQuick 2.4
import Lomiri.Components 1.3
-//import Lomiri.SyncMonitor 0.1
import Buteo.Profiles 0.1
import Lomiri.Components.Popups 1.3
import Qt.labs.settings 1.0
@@ -31,6 +30,8 @@ Item {
property alias settingsAction: _settingsAction
property Settings settings
readonly property bool syncInProgress: buteoSync.synchronizing
+ readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing
+
onSyncInProgressChanged: {
@@ -79,8 +80,8 @@ Item {
// Currently ,there is no way we can increase width of action menu currently.
text: i18n.tr("Sync")
onTriggered: buteoSync.synchronize()
- enabled: buteoSync.profiles.length > 0 ? true: false
- visible: buteoSync.serviceAvailable ? true : false
+ enabled: actionPool.canSynchronize
+ visible: buteoSync.serviceAvailable
}
SyncManager {
--
GitLab
@@ -0,0 +1,283 @@
From 7c9419ecb95c7973f7db7dbab8f988d4b40a1c00 Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Tue, 26 Nov 2024 16:51:59 +0100
Subject: [PATCH] Add EDS to mkCal calendar migration
---
CMakeLists.txt | 5 +
clickable.yaml | 2 +-
debian/control | 3 +-
.../lomiri-calendar-app-migrate-eds2mkcal.sh | 13 ++
debian/lomiri-calendar-app.install | 3 +-
debian/lomiri-calendar-app.migrations | 1 +
debian/rules | 4 +-
ics_importer/CMakeLists.txt | 20 +++
ics_importer/ics_importer.cpp | 122 ++++++++++++++++++
9 files changed, 168 insertions(+), 5 deletions(-)
create mode 100644 debian/lomiri-calendar-app-migrate-eds2mkcal.sh
create mode 100644 ics_importer/CMakeLists.txt
create mode 100644 ics_importer/ics_importer.cpp
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 547f6550..c49d718b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,7 @@ find_package(Qt5Quick REQUIRED)
option(INSTALL_TESTS "Install the tests on make install" on)
option(CLICK_MODE "Installs to a contained location" on)
+option(ENABLE_EDS_IMPORTER "Build eds2mkcal importer tool" off)
# Standard install paths
include(GNUInstallDirs)
@@ -96,3 +97,7 @@ install(FILES ${APPLICATION_FILE} DESTINATION ${APPLICATION_DIR})
add_subdirectory(src)
add_subdirectory(po)
add_subdirectory(tests)
+if(ENABLE_EDS_IMPORTER)
+ add_subdirectory(ics_importer)
+endif(ENABLE_EDS_IMPORTER)
+
diff --git a/clickable.yaml b/clickable.yaml
index 486f4bf6..c1eaf346 100644
--- a/clickable.yaml
+++ b/clickable.yaml
@@ -4,5 +4,5 @@ framework: ubuntu-sdk-20.04
build_args: "-DCLICK_MODE=ON"
kill: 'lomiri-calendar-app'
dependencies_host:
- - qtorganizer5-eds
+ - qtorganizer5-mkcal
ignore_review_errors: true
diff --git a/debian/control b/debian/control
index 5f8a603f..9bce332f 100644
--- a/debian/control
+++ b/debian/control
@@ -12,9 +12,10 @@ Build-Depends: cmake,
qml-module-qttest,
qml-module-lomiri-components,
qml-module-buteo-profiles,
- qt5-default,
+ qtbase5-dev,
qtdeclarative5-dev,
qtdeclarative5-dev-tools,
+ qtpim5-dev
Standards-Version: 4.7.0
Homepage: https://gitlab.com/ubports/development/apps/lomiri-calendar-app
Vcs-Git: https://gitlab.com/ubports/development/apps/lomiri-calendar-app.git
diff --git a/debian/lomiri-calendar-app-migrate-eds2mkcal.sh b/debian/lomiri-calendar-app-migrate-eds2mkcal.sh
new file mode 100644
index 00000000..339e0fff
--- /dev/null
+++ b/debian/lomiri-calendar-app-migrate-eds2mkcal.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+set -e
+
+# Exit if we already migrated
+[ -f "$HOME/.local/share/evolution/calendar/system/migrated_to_mkcal" ] && exit 0
+
+# Exit if there is no ICS file
+[ -f "$HOME/.local/share/evolution/calendar/system/calendar.ics" ] || exit 0
+
+/usr/bin/lomiri-calendar-eds2mkcal-importer "$HOME/.local/share/evolution/calendar/system/calendar.ics"
+
+echo $? > "$HOME/.local/share/evolution/calendar/system/migrated_to_mkcal"
\ No newline at end of file
diff --git a/debian/lomiri-calendar-app.install b/debian/lomiri-calendar-app.install
index 315c7b75..151885bf 100644
--- a/debian/lomiri-calendar-app.install
+++ b/debian/lomiri-calendar-app.install
@@ -1,3 +1,4 @@
-usr/bin/*
+usr/bin/lomiri-calendar-app
+usr/bin/lomiri-calendar-eds2mkcal-importer
usr/lib/lomiri-push-service/*
usr/share/*
diff --git a/debian/lomiri-calendar-app.migrations b/debian/lomiri-calendar-app.migrations
index c232792d..338d4454 100644
--- a/debian/lomiri-calendar-app.migrations
+++ b/debian/lomiri-calendar-app.migrations
@@ -1 +1,2 @@
debian/lomiri-calendar-app-name-change.sh
+debian/lomiri-calendar-app-migrate-eds2mkcal.sh
diff --git a/debian/rules b/debian/rules
index ca2b30fc..cce09bd4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,7 @@
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
PROJECT_DH_OPTIONS =
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
@@ -16,7 +16,7 @@ override_dh_missing:
dh_missing --fail-missing
override_dh_auto_configure:
- dh_auto_configure -- -DCLICK_MODE=OFF
+ dh_auto_configure -- -DCLICK_MODE=OFF -DENABLE_EDS_IMPORTER=ON
override_dh_auto_test:
# unit tests are failing, may be out of sync with the codebase since
diff --git a/ics_importer/CMakeLists.txt b/ics_importer/CMakeLists.txt
new file mode 100644
index 00000000..ee52c860
--- /dev/null
+++ b/ics_importer/CMakeLists.txt
@@ -0,0 +1,20 @@
+project(ICSImporter VERSION 1.0 LANGUAGES CXX)
+
+cmake_minimum_required(VERSION 3.14)
+
+find_package(Qt5 REQUIRED COMPONENTS Core Organizer Versit VersitOrganizer)
+
+add_executable(lomiri-calendar-eds2mkcal-importer ics_importer.cpp)
+
+target_link_libraries(lomiri-calendar-eds2mkcal-importer
+ Qt5::Core
+ Qt5::Organizer
+ Qt5::Versit
+ Qt5::VersitOrganizer
+)
+
+install(TARGETS lomiri-calendar-eds2mkcal-importer
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+)
+
+
diff --git a/ics_importer/ics_importer.cpp b/ics_importer/ics_importer.cpp
new file mode 100644
index 00000000..3d409d47
--- /dev/null
+++ b/ics_importer/ics_importer.cpp
@@ -0,0 +1,122 @@
+#include <QCoreApplication>
+#include <QDebug>
+#include <QFile>
+#include <QTextStream>
+#include <QtOrganizer/QOrganizerManager>
+#include <QtOrganizer/QOrganizerEvent>
+#include <QtOrganizer/QOrganizerItem>
+#include <QtOrganizer/QOrganizerItemFetchRequest>
+#include <QtVersit/QVersitReader>
+#include <QVersitOrganizerImporter>
+
+using namespace QtOrganizer;
+using namespace QtVersit;
+
+bool importICS(const QString& filePath, const QString& collectionId) {
+ QFile file(filePath);
+
+ if (!file.exists()) {
+ qWarning() << "File does not exist:" << filePath;
+ return false;
+ }
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ qWarning() << "Failed to open file:" << filePath;
+ return false;
+ }
+
+ // Read the .ics file content
+ QVersitReader reader;
+ reader.setDevice(&file);
+ bool result = reader.startReading();
+ reader.waitForFinished();
+ if(!result)
+ {
+ qCritical()<<"ics reading failed";
+ return false;
+ }
+
+ QList<QVersitDocument> documents = reader.results();
+
+
+ if (!QOrganizerManager::availableManagers().contains("mkcal")) {
+ qWarning() << "Could not found mkcal backend for QtPim";
+ return false;
+ }
+ QOrganizerManager manager("mkcal");
+ QOrganizerCollectionId targetCollectionId = manager.defaultCollectionId();
+ if (!collectionId.isEmpty()) {
+
+ QList<QOrganizerCollection> collections = manager.collections();
+ bool exist = false;
+ for (const QOrganizerCollection& col: collections) {
+ if (col.id().localId() == collectionId) {
+ exist = true;
+ targetCollectionId = col.id();
+ break;
+ }
+ }
+ if (!exist) {
+ qWarning() << "Could not found collection with id" << collectionId;
+ return false;
+ }
+ }
+
+ qDebug() << "targeted collection Id:" << targetCollectionId.localId();
+
+ //Import the .ics data into QOrganizer
+ QtVersitOrganizer::QVersitOrganizerImporter importer;
+
+ for (const QVersitDocument& document: documents) {
+ bool ok = importer.importDocument(document);
+
+ if (!ok) {
+ qWarning() << "Failed to import document" << importer.errorMap();
+ } else {
+
+ QList<QOrganizerItem> importedItems = importer.items();
+ QList<QOrganizerItem> batch;
+ const int batchSize = 200;
+
+ qDebug() << "Import events into collection" << targetCollectionId;
+
+ for (int i = 0; i < importedItems.size(); ++i) {
+ QOrganizerItem& item = importedItems[i];
+ item.setCollectionId(targetCollectionId);
+ batch.append(item);
+
+ if (batch.size() == batchSize || i == importedItems.size() - 1) {
+ if (!manager.saveItems(&batch)) {
+ qWarning() << "Failed to save batch. Error:" << manager.error();
+ } else {
+ qDebug() << "Batch of" << batch.size() << "items saved successfully.";
+ }
+
+ batch.clear();
+ }
+ }
+ }
+ }
+
+ qDebug() << "ICS import completed.";
+ return true;
+}
+
+int main(int argc, char *argv[]) {
+ QCoreApplication app(argc, argv);
+
+ if (argc < 2) {
+ qCritical() << "Usage: importer <path_to_ics_file> [collection_id]";
+ return EXIT_FAILURE;
+ }
+
+ QString filePath = argv[1];
+ QString collection;
+ if (argc == 3) {
+ collection = argv[2];
+ }
+
+ bool ok = importICS(filePath, collection);
+
+ return ok ? EXIT_SUCCESS : EXIT_FAILURE;
+}
--
GitLab
@@ -0,0 +1,26 @@
From 83541449e953f15c34f53dce657a94f189f597d3 Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Thu, 28 Nov 2024 09:30:59 +0100
Subject: [PATCH] Support caldav service. ( Needed by buteo caldav plugin)
---
lomiri-calendar-app.application | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lomiri-calendar-app.application b/lomiri-calendar-app.application
index f0781b77..684c14b6 100644
--- a/lomiri-calendar-app.application
+++ b/lomiri-calendar-app.application
@@ -7,6 +7,9 @@
<service-type id="calendar">
<description>Syncronize your calendar</description>
</service-type>
+ <service-type id="caldav">
+ <description>Syncronize your calendar</description>
+ </service-type>
</service-types>
</application>
--
GitLab
@@ -0,0 +1,48 @@
From fa1e0406e256ce66d399e1e0f0b18974b15704fe Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Wed, 11 Dec 2024 17:17:08 +0100
Subject: [PATCH] Clean up sync-monitor usage
---
src/qml/EventActions.qml | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml
index d46e8e25..63e50fb9 100644
--- a/src/qml/EventActions.qml
+++ b/src/qml/EventActions.qml
@@ -91,22 +91,6 @@ Item {
filterBy.value: "calendar"
}
-
-/*
- SyncMonitor {
- id: syncMonitor
- onSyncError: {
- console.log('SyncError:', account, service, error)
- if (error != "canceled") {
-
- syncErrorData.account = account
- syncErrorData.error = error
- syncErrorData.service = service
- }
- }
- }
- */
-
Action{
id: _showCalendarAction
objectName: "calendarsbutton"
@@ -170,7 +154,7 @@ Item {
Button {
text: i18n.tr("Retry sync")
onClicked: {
- syncMonitor.sync(["calendar"])
+ buteoSync.synchronize()
PopupUtils.close(dialogue)
}
}
--
GitLab
@@ -0,0 +1,26 @@
From 25c7d5e53cc4576a6e6a0ba91fc5ff9f288cf626 Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Wed, 11 Dec 2024 17:18:06 +0100
Subject: [PATCH] Use "account" supported metadata instead of eds metadata
"collection-account-id"
---
src/qml/CalendarChoicePopup.qml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml
index 8fa1e4b2..02d2c717 100644
--- a/src/qml/CalendarChoicePopup.qml
+++ b/src/qml/CalendarChoicePopup.qml
@@ -155,7 +155,7 @@ Page {
Account {
id: delegateAccount
- objectHandle: calendarChoicePage.accountFromId(modelData.extendedMetaData("collection-account-id"))
+ objectHandle: calendarChoicePage.accountFromId(modelData.extendedMetaData("account"))
}
title.text: modelData.name
--
GitLab
@@ -0,0 +1,32 @@
From b6369a317d8c5e3c654071382092dca18f543e8f Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Fri, 20 Dec 2024 10:28:32 +0100
Subject: [PATCH] Add support for google-calendars
---
lomiri-calendar-app.application | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lomiri-calendar-app.application b/lomiri-calendar-app.application
index 684c14b6..37d1e0ef 100644
--- a/lomiri-calendar-app.application
+++ b/lomiri-calendar-app.application
@@ -5,10 +5,13 @@
<service-types>
<service-type id="calendar">
- <description>Syncronize your calendar</description>
+ <description>Synchronize your calendar</description>
</service-type>
<service-type id="caldav">
- <description>Syncronize your calendar</description>
+ <description>Synchronize your calendar</description>
+ </service-type>
+ <service-type id="google-calendars">
+ <description>Synchronize your calendar</description>
</service-type>
</service-types>
--
GitLab
@@ -0,0 +1,24 @@
From 097472be88b64284a90361bee7493e3bb0067f18 Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Tue, 7 Jan 2025 10:34:57 +0100
Subject: [PATCH] Do not retrieve disabled profiles
---
src/qml/CalendarChoicePopup.qml | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml
index 02d2c717..42bf6462 100644
--- a/src/qml/CalendarChoicePopup.qml
+++ b/src/qml/CalendarChoicePopup.qml
@@ -69,6 +69,7 @@ Page {
SyncManager {
id: buteoSync
+ filterDisabled: true
filterHidden: true
filterBy.key: "category"
filterBy.value: "calendar"
--
GitLab
@@ -0,0 +1,77 @@
From d2477ad5cfbdfff39f20c0659c4915a53019572a Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Tue, 7 Jan 2025 10:40:00 +0100
Subject: [PATCH] Auto sync on first account creation
---
src/qml/CalendarChoicePopup.qml | 17 +++++++++++++++++
src/qml/OnlineAccountsHelper.qml | 11 +++++++++++
2 files changed, 28 insertions(+)
diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml
index 42bf6462..a0367138 100644
--- a/src/qml/CalendarChoicePopup.qml
+++ b/src/qml/CalendarChoicePopup.qml
@@ -67,6 +67,18 @@ Page {
flickable: flickable
}
+ Timer {
+ id: contactFirstSyncTimer
+
+ interval: 500
+ repeat: false
+ onTriggered: {
+ if (calendarChoicePage.canSynchronize) {
+ buteoSync.synchronize()
+ }
+ }
+ }
+
SyncManager {
id: buteoSync
filterDisabled: true
@@ -399,6 +411,11 @@ Page {
anchors.fill: parent
asynchronous: true
source: sourceFile
+
+ Connections {
+ target: onlineAccountHelper.item ? onlineAccountHelper.item : null
+ onFinished: contactFirstSyncTimer.restart()
+ }
}
Component {
diff --git a/src/qml/OnlineAccountsHelper.qml b/src/qml/OnlineAccountsHelper.qml
index 3a6b4b16..6d07bad7 100644
--- a/src/qml/OnlineAccountsHelper.qml
+++ b/src/qml/OnlineAccountsHelper.qml
@@ -24,6 +24,8 @@ Item {
id: root
property var dialogInstance: null
+ signal finished()
+ signal canceled()
function run(){
if (!root.dialogInstance) {
@@ -86,6 +88,15 @@ Item {
providerId: "google"
onFinished: {
PopupUtils.close(root.dialogInstance)
+ if (reply != null && reply.errorName !== undefined) {
+ if (reply.errorName === "com.lomiri.OnlineAccountsUi.UserCanceled") {
+ root.canceled()
+ } else {
+ root.finished()
+ }
+ } else {
+ root.finished()
+ }
}
}
}
--
GitLab
@@ -0,0 +1,64 @@
From 9b4412fa12df1452bc987149e8497e50d58e76f0 Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Fri, 10 Jan 2025 17:45:39 +0100
Subject: [PATCH] Display sync button only if profiles are enabled and set
---
src/qml/CalendarChoicePopup.qml | 5 +++--
src/qml/EventActions.qml | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml
index a0367138..3964c3c1 100644
--- a/src/qml/CalendarChoicePopup.qml
+++ b/src/qml/CalendarChoicePopup.qml
@@ -30,7 +30,8 @@ Page {
objectName: "calendarchoicepopup"
property var model
- readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing
+ readonly property bool syncAvailable: buteoSync.serviceAvailable && buteoSync.profiles.length > 0
+ readonly property var canSynchronize: !networkError && syncAvailable && !buteoSync.synchronizing
signal collectionUpdated()
function accountFromId(accountId)
@@ -62,7 +63,7 @@ Page {
text: enabled ? i18n.tr("Sync") : i18n.tr("Syncing")
onTriggered: buteoSync.synchronize()
enabled: calendarChoicePage.canSynchronize
- visible: buteoSync.serviceAvailable
+ visible: calendarChoicePage.syncAvailable
}
flickable: flickable
}
diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml
index 63e50fb9..579981d5 100644
--- a/src/qml/EventActions.qml
+++ b/src/qml/EventActions.qml
@@ -30,7 +30,8 @@ Item {
property alias settingsAction: _settingsAction
property Settings settings
readonly property bool syncInProgress: buteoSync.synchronizing
- readonly property var canSynchronize: !networkError && buteoSync.serviceAvailable && buteoSync.profiles.length > 0 && !buteoSync.synchronizing
+ readonly property bool syncAvailable: buteoSync.serviceAvailable && buteoSync.profiles.length > 0
+ readonly property var canSynchronize: !networkError && syncAvailable && !buteoSync.synchronizing
onSyncInProgressChanged: {
@@ -81,11 +82,12 @@ Item {
text: i18n.tr("Sync")
onTriggered: buteoSync.synchronize()
enabled: actionPool.canSynchronize
- visible: buteoSync.serviceAvailable
+ visible: actionPool.syncAvailable
}
SyncManager {
id: buteoSync
+ filterDisabled: true
filterHidden: true
filterBy.key: "category"
filterBy.value: "calendar"
--
GitLab
@@ -0,0 +1,46 @@
From 2e8411528eddb5e3e76edef417ed96ce1ed82466 Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Mon, 27 Jan 2025 22:26:52 +0100
Subject: [PATCH] Don't show alarms Collection
---
src/qml/EventListModel.qml | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/qml/EventListModel.qml b/src/qml/EventListModel.qml
index 8e9c958a..b40d84a6 100644
--- a/src/qml/EventListModel.qml
+++ b/src/qml/EventListModel.qml
@@ -93,6 +93,11 @@ OrganizerModel {
var collections = eventModel.collections;
for(var i = 0 ; i < collections.length ; ++i) {
var cal = collections[i];
+ // don't show Alarms collection
+ if (cal.name === "Alarms") {
+ continue
+ }
+
// Handle the special QtContactBirthdays calendar from lomiri-abook2cal-syncd
if (cal.name === "QtContactBirthdays") {
cal.name = i18n.tr("Birthdays & Anniversaries")
@@ -106,15 +111,15 @@ OrganizerModel {
function getWritableAndSelectedCollections(){
var cals = [];
- var collections = eventModel.collections;
+ var collections = getCollections();
for(var i = 0 ; i < collections.length ; ++i) {
var cal = collections[i];
+
if( cal.extendedMetaData("visible") === true &&
!collectionIsReadOnly(cal)) {
cals.push(cal);
}
}
- cals.sort(eventModel._sortCollections);
return cals
}
--
GitLab
@@ -0,0 +1,25 @@
From fcca1e0fa792e69b6780017db4afc34ea83ea28a Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Mon, 27 Jan 2025 22:40:56 +0100
Subject: [PATCH] eds->mkcal : Allow to open up directly an event
---
src/qml/calendar.qml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qml/calendar.qml b/src/qml/calendar.qml
index 2b6e6cfd..fef622c4 100644
--- a/src/qml/calendar.qml
+++ b/src/qml/calendar.qml
@@ -797,7 +797,7 @@ MainView {
}
} // End of else if (starttime)
else if (tabs.eventId !== "") {
- var prefix = "qtorganizer:eds::";
+ var prefix = "qtorganizer:mkcal::";
if (tabs.eventId.indexOf(prefix) < 0)
tabs.eventId = prefix + tabs.eventId;
--
GitLab
@@ -0,0 +1,39 @@
From 54a2d60a5c1c4be00a9696d587d933c771ee7b4b Mon Sep 17 00:00:00 2001
From: Lionel Duboeuf <lduboeuf@ouvaton.org>
Date: Thu, 13 Feb 2025 10:58:14 +0100
Subject: [PATCH] Adjust SyncManager filters
---
src/qml/CalendarChoicePopup.qml | 2 +-
src/qml/EventActions.qml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qml/CalendarChoicePopup.qml b/src/qml/CalendarChoicePopup.qml
index 3964c3c1..aa2dfdb4 100644
--- a/src/qml/CalendarChoicePopup.qml
+++ b/src/qml/CalendarChoicePopup.qml
@@ -83,7 +83,7 @@ Page {
SyncManager {
id: buteoSync
filterDisabled: true
- filterHidden: true
+ filterHidden: false
filterBy.key: "category"
filterBy.value: "calendar"
}
diff --git a/src/qml/EventActions.qml b/src/qml/EventActions.qml
index 579981d5..eb79da45 100644
--- a/src/qml/EventActions.qml
+++ b/src/qml/EventActions.qml
@@ -88,7 +88,7 @@ Item {
SyncManager {
id: buteoSync
filterDisabled: true
- filterHidden: true
+ filterHidden: false
filterBy.key: "category"
filterBy.value: "calendar"
}
--
GitLab
@@ -0,0 +1,158 @@
{
stdenv,
lib,
fetchFromGitLab,
fetchpatch,
gitUpdater,
nixosTests,
accounts-qml-module,
buteo-syncfw,
cmake,
gettext,
lomiri-content-hub,
lomiri-indicator-network,
lomiri-ui-toolkit,
qtbase,
qtdeclarative,
qtorganizer-mkcal,
qtpim,
wrapQtAppsHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "lomiri-calendar-app";
version = "1.1.2";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/apps/lomiri-calendar-app";
tag = "v${finalAttrs.version}";
hash = "sha256-NjpzzMuez7Abq1mIBz5N/H55GpkDrnXohPx2U6ThADY=";
};
patches = [
# Needed for MR 260 changes
(fetchpatch {
name = "0001-lomiri-calendar-app-Remove-deprecated-tabs.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/commit/12c9d3b8a5643790334e664e6b3d2c8f9b600e83.patch";
hash = "sha256-tvY5inNkNrSvfuD05RpmI3a2tFEOwNPCRgRn0RZB4DA=";
})
(fetchpatch {
name = "0002-lomiri-calendar-app-Ensure-PageStack-is-initialized.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/commit/deef3605b31c4c41f5c67311f1ff1ee02bd3b39a.patch";
hash = "sha256-FusFYFnpEEJKchInLZ5vE08SnKbwmlnUYh85cQE+JbM=";
})
# Fixes localisation for us
(fetchpatch {
name = "0101-lomiri-calendar-app-bindtextdomain.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/commit/c4c296e7f308af491558f1b7964542e4d638cb47.patch";
hash = "sha256-GLEJlr4EMY6ugP2UVvpyVIZkBnkArn0XoSB5aqGEpm4=";
})
# Switch to future contacts backend
# Remove when https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/merge_requests/239 merged & in release
./1001-lomiri-calendar-app-Migrate-to-new-QtContact-sqlite-backend.patch
# Switch to future calendar backend
# Remove when https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/merge_requests/260 merged & in release
./1101-lomiri-calendar-app-EDS-to-mkCal-initial-commit.patch
./1102-lomiri-calendar-app-fix-allDay-events-not-showing.patch
./1103-lomiri-calendar-app-Use-ButeoSync-profiles-for-syncing.patch
./1104-lomiri-calendar-app-Add-EDS-to-mkCal-calendar-migration.patch
./1105-lomiri-calendar-app-Support-caldav-service.patch
./1106-lomiri-calendar-app-Clean-up-sync-minitor-usage.patch
./1107-lomiri-calendar-app-Use-account-supported-metadata.patch
./1108-lomiri-calendar-app-Add-support-for-google-calendars.patch
./1109-lomiri-calendar-app-Do-not-retrieve-disabled-profiles.patch
./1110-lomiri-calendar-app-Auto-sync-on-first-account-creation.patch
./1111-lomiri-calendar-app-Display-sync-button-only-if-profiles-are-enabled-and-set.patch
./1112-lomiri-calendar-app-Dont-show-alarms-Collection.patch
./1113-lomiri-calendar-app-eds-to-mkcal-Allow-to-open-up-directly-an-event.patch
./1114-lomiri-calendar-app-Adjust-SyncManager-filters.patch
];
postPatch =
''
substituteInPlace CMakeLists.txt \
--replace-fail 'QT_IMPORTS_DIR "lib/''${ARCH_TRIPLET}"' 'QT_IMPORTS_DIR "${qtbase.qtQmlPrefix}"'
# Outdated paths
substituteInPlace tests/unittests/tst_{calendar_canvas,date,event_bubble,event_list_model}.qml \
--replace-fail '../../qml' '../../src/qml'
''
+ lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
substituteInPlace CMakeLists.txt \
--replace-fail 'add_subdirectory(tests)' '# add_subdirectory(tests)'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
gettext
wrapQtAppsHook
];
buildInputs = [
qtbase
qtdeclarative
# QML & Qt plugins
accounts-qml-module
buteo-syncfw
lomiri-content-hub
lomiri-indicator-network
lomiri-ui-toolkit
qtpim
qtorganizer-mkcal
];
cmakeFlags = [
(lib.cmakeBool "CLICK_MODE" false)
(lib.cmakeBool "INSTALL_TESTS" false)
];
# Not workiing yet
doCheck = false;
enableParallelChecking = false;
preCheck =
let
listToQtVar = suffix: lib.makeSearchPathOutput "bin" suffix;
in
''
export HOME=$TMP
export QT_PLUGIN_PATH=${
listToQtVar qtbase.qtPluginPrefix [
qtbase
qtorganizer-mkcal
]
}
export QML2_IMPORT_PATH=${
listToQtVar qtbase.qtQmlPrefix (
[
lomiri-ui-toolkit
qtpim
]
++ lomiri-ui-toolkit.propagatedBuildInputs
)
}
'';
passthru = {
tests.vm = nixosTests.lomiri-calendar-app;
updateScript = gitUpdater { rev-prefix = "v"; };
};
meta = {
description = "Default Calendar application for Ubuntu Touch devices";
homepage = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app";
changelog = "https://gitlab.com/ubports/development/apps/lomiri-calendar-app/-/blob/v${finalAttrs.version}/ChangeLog";
license = with lib.licenses; [ gpl3Only ];
mainProgram = "lomiri-calendar-app";
maintainers = lib.teams.lomiri.members;
platforms = lib.platforms.linux;
};
})
+1
View File
@@ -15,6 +15,7 @@ let
#### Core Apps
lomiri = callPackage ./applications/lomiri { };
lomiri-calculator-app = callPackage ./applications/lomiri-calculator-app { };
lomiri-calendar-app = callPackage ./applications/lomiri-calendar-app { };
lomiri-camera-app = callPackage ./applications/lomiri-camera-app { };
lomiri-clock-app = callPackage ./applications/lomiri-clock-app { };
lomiri-docviewer-app = callPackage ./applications/lomiri-docviewer-app { };
@@ -0,0 +1,87 @@
{
stdenv,
lib,
fetchFromGitHub,
fetchpatch,
gitUpdater,
bison,
flex,
qmake,
pkg-config,
libxcrypt,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libiodata";
version = "0.19.14";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "sailfishos";
repo = "libiodata";
tag = finalAttrs.version;
hash = "sha256-hhcPKZtg9PEE6rrEfRJ/e4E5xMyButH0Rm0eM3iHPh8=";
};
patches = [
# Remove when version > 0.19.14
(fetchpatch {
name = "0001-libiodata-Fix-dependencies-between-sub-projects.patch";
url = "https://github.com/sailfishos/libiodata/commit/85517a9f2103e461cbb69dc195335df73b7a8b7e.patch";
hash = "sha256-qrRZ1Af5uBJvEoRHifgUSeVHFC5RATDsL3374CmoUDc=";
})
];
postPatch = ''
substituteInPlace root.pro \
--replace-fail '$$[QT_HOST_DATA]' "$dev"
substituteInPlace src/src.pro \
--replace-fail '$$[QT_INSTALL_LIBS]' "$out/lib" \
--replace-fail '/usr/include' "$dev/include"
substituteInPlace tests/tests.pro \
--replace-fail '/usr/bin' "$dev/bin" \
--replace-fail '/usr/share' "$dev/share"
substituteInPlace type-to-cxx/type-to-cxx.pro \
--replace-fail '/usr/bin' "$dev/bin"
'';
# QMake doesn't handle strictDeps well
strictDeps = false;
nativeBuildInputs = [
bison
flex
pkg-config
qmake
];
buildInputs = [
libxcrypt
];
dontWrapQtApps = true;
postConfigure = ''
make qmake_all
'';
env.IODATA_VERSION = "${finalAttrs.version}";
passthru.updateScript = gitUpdater { };
meta = {
description = "Library for reading and writing simple structured data";
homepage = "https://github.com/sailfishos/libiodata";
changelog = "https://github.com/sailfishos/libiodata/releases/tag/${finalAttrs.version}";
license = lib.licenses.lgpl21Only;
maintainers = lib.teams.lomiri.members;
platforms = lib.platforms.linux;
};
})
@@ -125,6 +125,11 @@ let
url = "https://github.com/qt/qtpim/commit/114615812dcf9398c957b0833e860befe15f840f.patch";
hash = "sha256-yZ1qs8y5DSq8FDXRPyuSPRIzjEUTWAhpVide/b+xaLQ=";
})
# Provide interface for accessing all extended metadata from collections
(fetchpatch {
url = "https://github.com/qt/qtpim/commit/5bdfb9127b3f6c9863def0578c7a8734a5156ea9.patch";
hash = "sha256-asJNa8tcdtovVE579FjZg1CHeCmvRJ8otQeSrEdrXdQ=";
})
# Accessors should be const
(fetchpatch {
url = "https://github.com/qt/qtpim/commit/a2bf7cdf05c264b5dd2560f799760b5508f154e4.patch";
@@ -0,0 +1,57 @@
{
stdenv,
lib,
pkg-config,
qmake,
qtbase,
qtdeclarative,
sailfish-access-control,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sailfish-access-control-plugin";
inherit (sailfish-access-control) version src patches;
postPatch = ''
substituteInPlace qt/qt.pro \
--replace-fail '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}'
'';
# QMake doesn't handle strictDeps well
strictDeps = false;
nativeBuildInputs = [
pkg-config
qmake
qtdeclarative # qmlplugindump
];
buildInputs = [
qtdeclarative
sailfish-access-control
];
# Qt plugin
dontWrapQtApps = true;
# sourceRoot breaks patches
preConfigure = ''
cd qt
'';
# Do all configuring now, not during build
postConfigure = ''
make qmake_all
'';
meta = {
description = "QML interface for sailfish-access-control";
inherit (sailfish-access-control.meta)
homepage
changelog
license
maintainers
platforms
;
};
})
+3 -3
View File
@@ -8,16 +8,16 @@
}:
buildGoModule rec {
pname = "headscale";
version = "0.24.3";
version = "0.25.0";
src = fetchFromGitHub {
owner = "juanfont";
repo = "headscale";
rev = "v${version}";
hash = "sha256-G1MGu/AVFhiBOfhmhdH9+kayPybtsQsvj73omtZVfBU=";
hash = "sha256-5CwaPaGh0yvHwmSpbsvc4ajkW9RbYVMilNTIJxeYcIs=";
};
vendorHash = "sha256-SBfeixT8DQOrK2SWmHHSOBtzRdSZs+pwomHpw6Jd+qc=";
vendorHash = "sha256-ZQj2A0GdLhHc7JLW7qgpGBveXXNWg9ueSG47OZQQXEw=";
subPackages = [ "cmd/headscale" ];
@@ -15,13 +15,13 @@
stdenv.mkDerivation rec {
pname = "ibus-table";
version = "1.17.9";
version = "1.17.10";
src = fetchFromGitHub {
owner = "kaio";
repo = "ibus-table";
rev = version;
sha256 = "sha256-8z25B7Vc2HLZFfCfFR+TxdGvhWvwzDvZx+Ok6Wac/F4=";
sha256 = "sha256-L7XTB2KuXVVLpHnuj9krAFBSlb40HU34TslxUNdj13o=";
};
postPatch = ''
+1
View File
@@ -1104,6 +1104,7 @@ mapAliases {
pipewire_0_2 = throw "pipewire_0_2 has been removed as it is outdated and no longer used"; # Added 2024-07-28
pipewire-media-session = throw "pipewire-media-session is no longer maintained and has been removed. Please use Wireplumber instead.";
pleroma-otp = throw "'pleroma-otp' has been renamed to/replaced by 'pleroma'"; # Converted to throw 2024-10-17
plots = throw "'plots' has been replaced by 'gnome-graphs'"; # Added 2025-02-05
pltScheme = racket; # just to be sure
poac = cabinpkg; # Added 2025-01-22
poretools = throw "poretools has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2024-06-03
+6
View File
@@ -151,6 +151,8 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP
libdbusmenu = callPackage ../development/libraries/libdbusmenu-qt/qt-5.5.nix { };
libiodata = callPackage ../development/libraries/libiodata { };
liblastfm = callPackage ../development/libraries/liblastfm { };
libopenshot = callPackage ../development/libraries/libopenshot {
@@ -269,6 +271,8 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP
rlottie-qml = callPackage ../development/libraries/rlottie-qml { };
sailfish-access-control-plugin = callPackage ../development/libraries/sailfish-access-control-plugin { };
sierra-breeze-enhanced = callPackage ../data/themes/kwin-decorations/sierra-breeze-enhanced { useQt5 = true; };
soqt = callPackage ../development/libraries/soqt { };
@@ -285,6 +289,8 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP
soundkonverter = callPackage ../applications/audio/soundkonverter {};
timed = callPackage ../applications/system/timed { };
xp-pen-deco-01-v2-driver = callPackage ../os-specific/linux/xp-pen-drivers/deco-01-v2 { };
xp-pen-g430-driver = callPackage ../os-specific/linux/xp-pen-drivers/g430 { };
+7
View File
@@ -54,6 +54,9 @@ makeScopeWithSplicing' {
futuresql = callPackage ../development/libraries/futuresql { };
kquickimageedit = callPackage ../development/libraries/kquickimageedit { };
libiodata = callPackage ../development/libraries/libiodata { };
libqaccessibilityclient = callPackage ../development/libraries/libqaccessibilityclient { };
libqglviewer = callPackage ../development/libraries/libqglviewer { };
@@ -113,6 +116,8 @@ makeScopeWithSplicing' {
suffix = "qt6";
};
sailfish-access-control-plugin = callPackage ../development/libraries/sailfish-access-control-plugin { };
# Not a library, but we do want it to be built for every qt version there
# is, to allow users to choose the right build if needed.
sddm = kdePackages.callPackage ../applications/display-managers/sddm {};
@@ -121,6 +126,8 @@ makeScopeWithSplicing' {
signond = callPackage ../development/libraries/signond {};
timed = callPackage ../applications/system/timed { };
waylib = callPackage ../development/libraries/waylib { };
wayqt = callPackage ../development/libraries/wayqt { };