From f63541262b4060be14d0d6d38b85273aed687534 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 21 Jan 2025 12:53:06 +0000 Subject: [PATCH 01/29] ibus-engines.table: 1.17.9 -> 1.17.10 --- pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix index 66f88cc3c592..a282d7b3ed88 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix @@ -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 = '' From 193c83ee8d410be9955891a79f73058a2f518bf7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 21 Jan 2025 23:10:23 +0000 Subject: [PATCH 02/29] httptoolkit-server: 1.19.0 -> 1.19.3 --- pkgs/by-name/ht/httptoolkit-server/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ht/httptoolkit-server/package.nix b/pkgs/by-name/ht/httptoolkit-server/package.nix index 1bc90738b120..64619776859d 100644 --- a/pkgs/by-name/ht/httptoolkit-server/package.nix +++ b/pkgs/by-name/ht/httptoolkit-server/package.nix @@ -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" ]; From 3c32e26fee045916726c93206856580930149acd Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 22 Jan 2025 01:16:15 +0000 Subject: [PATCH 03/29] gtk-pipe-viewer: 0.5.3 -> 0.5.4 --- pkgs/applications/video/pipe-viewer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/pipe-viewer/default.nix b/pkgs/applications/video/pipe-viewer/default.nix index 7cab65a58552..ad0ee012cebf 100644 --- a/pkgs/applications/video/pipe-viewer/default.nix +++ b/pkgs/applications/video/pipe-viewer/default.nix @@ -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 ]; From 4b2abf40c55821bada2664aff7474a77812a9bce Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 20 Jan 2025 15:15:49 -0800 Subject: [PATCH 04/29] tailscale: add lsof dependency on darwin --- pkgs/by-name/ta/tailscale/package.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ta/tailscale/package.nix b/pkgs/by-name/ta/tailscale/package.nix index 4b479bf170f3..23babd4dc6c1 100644 --- a/pkgs/by-name/ta/tailscale/package.nix +++ b/pkgs/by-name/ta/tailscale/package.nix @@ -8,6 +8,7 @@ getent, iproute2, iptables, + lsof, shadow, procps, nixosTests, @@ -45,7 +46,8 @@ buildGo123Module { vendorHash = "sha256-0VB7q9HKd5/QKaWBMpCYycRRiNTWCEjUMc3g3z6agc8="; - 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 : ${ From dcc7199c4e2c84bf0ff00732f398ef741f2e969e Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Mon, 20 Jan 2025 19:19:24 -0500 Subject: [PATCH 05/29] nixos/tlp: expose package This allows viewing and/or modifying the tlp package used by the module, which is especially important since it might be different from `pkgs.tlp` due to RDW. --- nixos/modules/services/hardware/tlp.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/hardware/tlp.nix b/nixos/modules/services/hardware/tlp.nix index 53e232a32912..7eeb3836ced0 100644 --- a/nixos/modules/services/hardware/tlp.nix +++ b/nixos/modules/services/hardware/tlp.nix @@ -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 From a4e9fb56ad4ef38b3c882a308ee9ed065e564249 Mon Sep 17 00:00:00 2001 From: liberodark Date: Wed, 22 Jan 2025 14:11:58 +0100 Subject: [PATCH 06/29] rundeck: add mainProgram --- pkgs/by-name/ru/rundeck/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/ru/rundeck/package.nix b/pkgs/by-name/ru/rundeck/package.nix index d1dc4e16a62e..00b6e3bdc93e 100644 --- a/pkgs/by-name/ru/rundeck/package.nix +++ b/pkgs/by-name/ru/rundeck/package.nix @@ -74,5 +74,6 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.asl20; platforms = lib.platforms.unix; maintainers = [ lib.maintainers.liberodark ]; + mainProgram = "rundeck"; }; }) From 794dbd79bb30041fcc1b2f03e74880df2456694f Mon Sep 17 00:00:00 2001 From: liberodark Date: Fri, 31 Jan 2025 10:17:59 +0100 Subject: [PATCH 07/29] rundeck: remove unnecessary option --- pkgs/by-name/ru/rundeck/package.nix | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pkgs/by-name/ru/rundeck/package.nix b/pkgs/by-name/ru/rundeck/package.nix index 00b6e3bdc93e..88d5d920ed08 100644 --- a/pkgs/by-name/ru/rundeck/package.nix +++ b/pkgs/by-name/ru/rundeck/package.nix @@ -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 ''; From 01a9a85bbe9928b7fa6954662942244bbef243d7 Mon Sep 17 00:00:00 2001 From: Remy van Velthuijsen Date: Thu, 6 Feb 2025 10:51:00 +0100 Subject: [PATCH 08/29] maintainers: add remyvv --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 5570d588f74a..f5424a7d2b2a 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -19506,6 +19506,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"; From c9e03a8eda110dcae3a70af88533f3ff949f72ee Mon Sep 17 00:00:00 2001 From: Remy van Velthuijsen Date: Thu, 6 Feb 2025 10:53:43 +0100 Subject: [PATCH 09/29] ddev: add remyvv as maintainer --- pkgs/by-name/dd/ddev/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/dd/ddev/package.nix b/pkgs/by-name/dd/ddev/package.nix index 02a1eb65616c..1508c5c40c22 100644 --- a/pkgs/by-name/dd/ddev/package.nix +++ b/pkgs/by-name/dd/ddev/package.nix @@ -38,6 +38,6 @@ buildGoModule rec { license = licenses.asl20; platforms = platforms.unix; mainProgram = "ddev"; - maintainers = [ ]; + maintainers = with maintainers; [ remyvv ]; }; } From 2687d35ecae8e0b974c46972509d07adb7639f0a Mon Sep 17 00:00:00 2001 From: Barry Moore Date: Fri, 7 Feb 2025 08:03:41 -0500 Subject: [PATCH 10/29] erlang: 27.2.1 -> 27.2.2 --- pkgs/development/interpreters/erlang/27.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/erlang/27.nix b/pkgs/development/interpreters/erlang/27.nix index 132c3fd2712f..0c4d0eef9745 100644 --- a/pkgs/development/interpreters/erlang/27.nix +++ b/pkgs/development/interpreters/erlang/27.nix @@ -1,6 +1,6 @@ { mkDerivation }: mkDerivation { - version = "27.2.1"; - sha256 = "sha256-39X4aGuYe7aJaQiRBjla7GInKoTHXmRIeRq8Ejqk6jM="; + version = "27.2.2"; + sha256 = "sha256-U/mBMMAkVJ6M4b26sTECBCPLJgX3HiFFPPwDuvY7SHg="; } From 9a4dedf2995afd5bfba6c9271608f2e6e2a57b36 Mon Sep 17 00:00:00 2001 From: sund3RRR Date: Wed, 5 Feb 2025 10:45:05 +0300 Subject: [PATCH 11/29] plots: drop --- pkgs/by-name/pl/plots/package.nix | 74 ------------------------------- pkgs/top-level/aliases.nix | 1 + 2 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 pkgs/by-name/pl/plots/package.nix diff --git a/pkgs/by-name/pl/plots/package.nix b/pkgs/by-name/pl/plots/package.nix deleted file mode 100644 index 781309d7aa54..000000000000 --- a/pkgs/by-name/pl/plots/package.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6157b05df0af..c22f87901aa5 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1097,6 +1097,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 From 6537f389cbc8b4b031800d45228c8ee73862906e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 13 Feb 2025 09:09:48 +0000 Subject: [PATCH 12/29] headscale: 0.24.3 -> 0.25.0 --- pkgs/servers/headscale/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/headscale/default.nix b/pkgs/servers/headscale/default.nix index d28d445120ae..07c7c2b74099 100644 --- a/pkgs/servers/headscale/default.nix +++ b/pkgs/servers/headscale/default.nix @@ -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" ]; From b4bca390825032c947df76d00b20aad464d7011c Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 20 Dec 2024 16:58:41 +0100 Subject: [PATCH 13/29] qt5.qtpim: Add patch for Q*Collection::extendedMetaData() implementation qtorganizer-mkcal uses it --- pkgs/development/libraries/qt-5/5.15/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 022e2d970a86..f0896ae775b9 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -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"; From 591778edf6af722ab4da96b5dcf22c7e326bfa4f Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 20 Dec 2024 14:16:21 +0100 Subject: [PATCH 14/29] sailfish-access-control: init at 0.0.12 --- .../sa/sailfish-access-control/package.nix | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 pkgs/by-name/sa/sailfish-access-control/package.nix diff --git a/pkgs/by-name/sa/sailfish-access-control/package.nix b/pkgs/by-name/sa/sailfish-access-control/package.nix new file mode 100644 index 000000000000..064739584669 --- /dev/null +++ b/pkgs/by-name/sa/sailfish-access-control/package.nix @@ -0,0 +1,77 @@ +{ + stdenv, + lib, + fetchFromGitHub, + gitUpdater, + testers, + glib, + pkg-config, +}: + +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; + }; + }; + + 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" + ]; + }; +}) From 6c7b4c7972b936ffde0dfd946b82698cfc40f415 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 20 Dec 2024 14:21:51 +0100 Subject: [PATCH 15/29] {libsForQt5,qt6Packages}.sailfish-access-control-plugin: init at 0.0.11 --- .../sa/sailfish-access-control/package.nix | 12 +++- .../default.nix | 57 +++++++++++++++++++ pkgs/top-level/qt5-packages.nix | 2 + pkgs/top-level/qt6-packages.nix | 2 + 4 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/libraries/sailfish-access-control-plugin/default.nix diff --git a/pkgs/by-name/sa/sailfish-access-control/package.nix b/pkgs/by-name/sa/sailfish-access-control/package.nix index 064739584669..305dc0bbd96b 100644 --- a/pkgs/by-name/sa/sailfish-access-control/package.nix +++ b/pkgs/by-name/sa/sailfish-access-control/package.nix @@ -5,7 +5,9 @@ gitUpdater, testers, glib, + libsForQt5, pkg-config, + qt6Packages, }: stdenv.mkDerivation (finalAttrs: { @@ -51,9 +53,13 @@ stdenv.mkDerivation (finalAttrs: { passthru = { updateScript = gitUpdater { }; - tests.pkg-config = testers.hasPkgConfigModules { - package = finalAttrs.finalPackage; - versionCheck = true; + tests = { + pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + versionCheck = true; + }; + qt5 = libsForQt5.sailfish-access-control-plugin; + qt6 = qt6Packages.sailfish-access-control-plugin; }; }; diff --git a/pkgs/development/libraries/sailfish-access-control-plugin/default.nix b/pkgs/development/libraries/sailfish-access-control-plugin/default.nix new file mode 100644 index 000000000000..b53b46474f89 --- /dev/null +++ b/pkgs/development/libraries/sailfish-access-control-plugin/default.nix @@ -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 + ; + }; +}) diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index 0c80734993fb..34d68aa4ae50 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -271,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 { }; diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index 237a4757afb3..002bf6fc59ac 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -111,6 +111,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 {}; From 30b29a8ae266a028e9b8023e8efa721f1b2c2856 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 20 Dec 2024 15:15:55 +0100 Subject: [PATCH 16/29] {libsForQt5,qt6Packages}.libiodata: init at 0.19.14 --- .../libraries/libiodata/default.nix | 87 +++++++++++++++++++ pkgs/top-level/qt5-packages.nix | 2 + pkgs/top-level/qt6-packages.nix | 3 + 3 files changed, 92 insertions(+) create mode 100644 pkgs/development/libraries/libiodata/default.nix diff --git a/pkgs/development/libraries/libiodata/default.nix b/pkgs/development/libraries/libiodata/default.nix new file mode 100644 index 000000000000..5a855f61f462 --- /dev/null +++ b/pkgs/development/libraries/libiodata/default.nix @@ -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; + }; +}) diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index 34d68aa4ae50..12051ad9e164 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -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 { diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index 002bf6fc59ac..a7377c30ff51 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -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 { }; libqtpas = callPackage ../development/compilers/fpc/libqtpas.nix { }; From fc17b8e77f526379a9d4927826459ac98feb27b9 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 20 Dec 2024 15:57:27 +0100 Subject: [PATCH 17/29] {libsForQt5,qt6Packages}.timed: init at 3.6.23 --- pkgs/applications/system/timed/default.nix | 120 +++++++++++++++++++++ pkgs/top-level/qt5-packages.nix | 2 + pkgs/top-level/qt6-packages.nix | 2 + 3 files changed, 124 insertions(+) create mode 100644 pkgs/applications/system/timed/default.nix diff --git a/pkgs/applications/system/timed/default.nix b/pkgs/applications/system/timed/default.nix new file mode 100644 index 000000000000..52f5f0c87efb --- /dev/null +++ b/pkgs/applications/system/timed/default.nix @@ -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}" + ]; + }; +}) diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index 12051ad9e164..25a2d71a164e 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -291,6 +291,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 { }; diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index a7377c30ff51..ef464b48cd6a 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -124,6 +124,8 @@ makeScopeWithSplicing' { signond = callPackage ../development/libraries/signond {}; + timed = callPackage ../applications/system/timed { }; + waylib = callPackage ../development/libraries/waylib { }; wayqt = callPackage ../development/libraries/wayqt { }; From 58e6e63d453cd3c4cf1273b08f8a1f74a0b64b3a Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 20 Dec 2024 16:47:29 +0100 Subject: [PATCH 18/29] mkcal: init at 0.7.26 --- pkgs/by-name/mk/mkcal/package.nix | 125 ++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 pkgs/by-name/mk/mkcal/package.nix diff --git a/pkgs/by-name/mk/mkcal/package.nix b/pkgs/by-name/mk/mkcal/package.nix new file mode 100644 index 000000000000..bb2bae2d0d00 --- /dev/null +++ b/pkgs/by-name/mk/mkcal/package.nix @@ -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" + ]; + }; +}) From 2a07a335f349d1ead6758e1f05b5d5cab1b13a1b Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 20 Dec 2024 23:33:27 +0100 Subject: [PATCH 19/29] qtorganizer-mkcal: init at 0-unstable-2025-02-14 --- pkgs/by-name/qt/qtorganizer-mkcal/package.nix | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 pkgs/by-name/qt/qtorganizer-mkcal/package.nix diff --git a/pkgs/by-name/qt/qtorganizer-mkcal/package.nix b/pkgs/by-name/qt/qtorganizer-mkcal/package.nix new file mode 100644 index 000000000000..2b7497545794 --- /dev/null +++ b/pkgs/by-name/qt/qtorganizer-mkcal/package.nix @@ -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; + }; +}) From b0ff1bd0e428cdfd923420e2abb43f5f1c0530d2 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 20 Dec 2024 23:35:25 +0100 Subject: [PATCH 20/29] buteo-syncfw: init at 0.11.8 --- pkgs/by-name/bu/buteo-syncfw/package.nix | 130 +++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 pkgs/by-name/bu/buteo-syncfw/package.nix diff --git a/pkgs/by-name/bu/buteo-syncfw/package.nix b/pkgs/by-name/bu/buteo-syncfw/package.nix new file mode 100644 index 000000000000..fe6b23747b57 --- /dev/null +++ b/pkgs/by-name/bu/buteo-syncfw/package.nix @@ -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" + ]; + }; +}) From 5d35d76441912285eeb67856d51191e19900ad55 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 13 Feb 2025 18:28:00 +0100 Subject: [PATCH 21/29] lomiri.lomiri-calendar-app: init at 1.1.2 --- ...rate-to-new-QtContact-sqlite-backend.patch | 73 +++++ ...ndar-app-EDS-to-mkCal-initial-commit.patch | 301 ++++++++++++++++++ ...ar-app-fix-allDay-events-not-showing.patch | 48 +++ ...p-Use-ButeoSync-profiles-for-syncing.patch | 97 ++++++ ...-Add-EDS-to-mkCal-calendar-migration.patch | 283 ++++++++++++++++ ...-calendar-app-Support-caldav-service.patch | 26 ++ ...ndar-app-Clean-up-sync-minitor-usage.patch | 48 +++ ...r-app-Use-account-supported-metadata.patch | 26 ++ ...app-Add-support-for-google-calendars.patch | 32 ++ ...pp-Do-not-retrieve-disabled-profiles.patch | 24 ++ ...-Auto-sync-on-first-account-creation.patch | 77 +++++ ...only-if-profiles-are-enabled-and-set.patch | 64 ++++ ...ndar-app-Dont-show-alarms-Collection.patch | 46 +++ ...l-Allow-to-open-up-directly-an-event.patch | 25 ++ ...endar-app-Adjust-SyncManager-filters.patch | 39 +++ .../lomiri-calendar-app/default.nix | 156 +++++++++ pkgs/desktops/lomiri/default.nix | 1 + 17 files changed, 1366 insertions(+) create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1001-lomiri-calendar-app-Migrate-to-new-QtContact-sqlite-backend.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1101-lomiri-calendar-app-EDS-to-mkCal-initial-commit.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1102-lomiri-calendar-app-fix-allDay-events-not-showing.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1103-lomiri-calendar-app-Use-ButeoSync-profiles-for-syncing.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1104-lomiri-calendar-app-Add-EDS-to-mkCal-calendar-migration.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1105-lomiri-calendar-app-Support-caldav-service.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1106-lomiri-calendar-app-Clean-up-sync-minitor-usage.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1107-lomiri-calendar-app-Use-account-supported-metadata.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1108-lomiri-calendar-app-Add-support-for-google-calendars.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1109-lomiri-calendar-app-Do-not-retrieve-disabled-profiles.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1110-lomiri-calendar-app-Auto-sync-on-first-account-creation.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1111-lomiri-calendar-app-Display-sync-button-only-if-profiles-are-enabled-and-set.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1112-lomiri-calendar-app-Dont-show-alarms-Collection.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1113-lomiri-calendar-app-eds-to-mkcal-Allow-to-open-up-directly-an-event.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/1114-lomiri-calendar-app-Adjust-SyncManager-filters.patch create mode 100644 pkgs/desktops/lomiri/applications/lomiri-calendar-app/default.nix diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1001-lomiri-calendar-app-Migrate-to-new-QtContact-sqlite-backend.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1001-lomiri-calendar-app-Migrate-to-new-QtContact-sqlite-backend.patch new file mode 100644 index 000000000000..c2510fc7ecc9 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1001-lomiri-calendar-app-Migrate-to-new-QtContact-sqlite-backend.patch @@ -0,0 +1,73 @@ +From 0658ff459aa200dfe3561646f5e73cd8715a1d0f Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1101-lomiri-calendar-app-EDS-to-mkCal-initial-commit.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1101-lomiri-calendar-app-EDS-to-mkCal-initial-commit.patch new file mode 100644 index 000000000000..3cdbdb63c00a --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1101-lomiri-calendar-app-EDS-to-mkCal-initial-commit.patch @@ -0,0 +1,301 @@ +From fe4c377c08ecc7fa09e0a9407c17afcb63325822 Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1102-lomiri-calendar-app-fix-allDay-events-not-showing.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1102-lomiri-calendar-app-fix-allDay-events-not-showing.patch new file mode 100644 index 000000000000..9ce87c620167 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1102-lomiri-calendar-app-fix-allDay-events-not-showing.patch @@ -0,0 +1,48 @@ +From 95218b057d1c9ed571e1abc41f0377c6a087ca37 Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1103-lomiri-calendar-app-Use-ButeoSync-profiles-for-syncing.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1103-lomiri-calendar-app-Use-ButeoSync-profiles-for-syncing.patch new file mode 100644 index 000000000000..5eeef78bb559 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1103-lomiri-calendar-app-Use-ButeoSync-profiles-for-syncing.patch @@ -0,0 +1,97 @@ +From 06750cc6f042cbcf4fa5e2fdd5a6eb29aff0d1b3 Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1104-lomiri-calendar-app-Add-EDS-to-mkCal-calendar-migration.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1104-lomiri-calendar-app-Add-EDS-to-mkCal-calendar-migration.patch new file mode 100644 index 000000000000..9d3eda1e1cbf --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1104-lomiri-calendar-app-Add-EDS-to-mkCal-calendar-migration.patch @@ -0,0 +1,283 @@ +From 7c9419ecb95c7973f7db7dbab8f988d4b40a1c00 Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++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 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 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 importedItems = importer.items(); ++ QList 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 [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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1105-lomiri-calendar-app-Support-caldav-service.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1105-lomiri-calendar-app-Support-caldav-service.patch new file mode 100644 index 000000000000..c31add43512f --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1105-lomiri-calendar-app-Support-caldav-service.patch @@ -0,0 +1,26 @@ +From 83541449e953f15c34f53dce657a94f189f597d3 Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 @@ + + Syncronize your calendar + ++ ++ Syncronize your calendar ++ + + + +-- +GitLab + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1106-lomiri-calendar-app-Clean-up-sync-minitor-usage.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1106-lomiri-calendar-app-Clean-up-sync-minitor-usage.patch new file mode 100644 index 000000000000..2dfbcc709d70 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1106-lomiri-calendar-app-Clean-up-sync-minitor-usage.patch @@ -0,0 +1,48 @@ +From fa1e0406e256ce66d399e1e0f0b18974b15704fe Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1107-lomiri-calendar-app-Use-account-supported-metadata.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1107-lomiri-calendar-app-Use-account-supported-metadata.patch new file mode 100644 index 000000000000..cce0bfcab670 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1107-lomiri-calendar-app-Use-account-supported-metadata.patch @@ -0,0 +1,26 @@ +From 25c7d5e53cc4576a6e6a0ba91fc5ff9f288cf626 Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1108-lomiri-calendar-app-Add-support-for-google-calendars.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1108-lomiri-calendar-app-Add-support-for-google-calendars.patch new file mode 100644 index 000000000000..390ec7bb05ea --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1108-lomiri-calendar-app-Add-support-for-google-calendars.patch @@ -0,0 +1,32 @@ +From b6369a317d8c5e3c654071382092dca18f543e8f Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 @@ + + + +- Syncronize your calendar ++ Synchronize your calendar + + +- Syncronize your calendar ++ Synchronize your calendar ++ ++ ++ Synchronize your calendar + + + +-- +GitLab + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1109-lomiri-calendar-app-Do-not-retrieve-disabled-profiles.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1109-lomiri-calendar-app-Do-not-retrieve-disabled-profiles.patch new file mode 100644 index 000000000000..e9b2fbde1f8b --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1109-lomiri-calendar-app-Do-not-retrieve-disabled-profiles.patch @@ -0,0 +1,24 @@ +From 097472be88b64284a90361bee7493e3bb0067f18 Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1110-lomiri-calendar-app-Auto-sync-on-first-account-creation.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1110-lomiri-calendar-app-Auto-sync-on-first-account-creation.patch new file mode 100644 index 000000000000..a34f5be79e00 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1110-lomiri-calendar-app-Auto-sync-on-first-account-creation.patch @@ -0,0 +1,77 @@ +From d2477ad5cfbdfff39f20c0659c4915a53019572a Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1111-lomiri-calendar-app-Display-sync-button-only-if-profiles-are-enabled-and-set.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1111-lomiri-calendar-app-Display-sync-button-only-if-profiles-are-enabled-and-set.patch new file mode 100644 index 000000000000..b05b67315d57 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1111-lomiri-calendar-app-Display-sync-button-only-if-profiles-are-enabled-and-set.patch @@ -0,0 +1,64 @@ +From 9b4412fa12df1452bc987149e8497e50d58e76f0 Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1112-lomiri-calendar-app-Dont-show-alarms-Collection.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1112-lomiri-calendar-app-Dont-show-alarms-Collection.patch new file mode 100644 index 000000000000..9687dab48a0f --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1112-lomiri-calendar-app-Dont-show-alarms-Collection.patch @@ -0,0 +1,46 @@ +From 2e8411528eddb5e3e76edef417ed96ce1ed82466 Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1113-lomiri-calendar-app-eds-to-mkcal-Allow-to-open-up-directly-an-event.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1113-lomiri-calendar-app-eds-to-mkcal-Allow-to-open-up-directly-an-event.patch new file mode 100644 index 000000000000..e03ab795ca07 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1113-lomiri-calendar-app-eds-to-mkcal-Allow-to-open-up-directly-an-event.patch @@ -0,0 +1,25 @@ +From fcca1e0fa792e69b6780017db4afc34ea83ea28a Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1114-lomiri-calendar-app-Adjust-SyncManager-filters.patch b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1114-lomiri-calendar-app-Adjust-SyncManager-filters.patch new file mode 100644 index 000000000000..fac322d2592d --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/1114-lomiri-calendar-app-Adjust-SyncManager-filters.patch @@ -0,0 +1,39 @@ +From 54a2d60a5c1c4be00a9696d587d933c771ee7b4b Mon Sep 17 00:00:00 2001 +From: Lionel Duboeuf +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 + diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/default.nix new file mode 100644 index 000000000000..80dc99584595 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/default.nix @@ -0,0 +1,156 @@ +{ + stdenv, + lib, + fetchFromGitLab, + fetchpatch, + gitUpdater, + 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 = { + 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; + }; +}) diff --git a/pkgs/desktops/lomiri/default.nix b/pkgs/desktops/lomiri/default.nix index 483eacaeb58a..d5bb64b2893b 100644 --- a/pkgs/desktops/lomiri/default.nix +++ b/pkgs/desktops/lomiri/default.nix @@ -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 { }; From 3be40aa35f457fbbb8aefda702e1d925564da2d3 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 13 Feb 2025 18:28:57 +0100 Subject: [PATCH 22/29] nixos/lomiri: Add calendar app --- nixos/modules/services/desktop-managers/lomiri.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/desktop-managers/lomiri.nix b/nixos/modules/services/desktop-managers/lomiri.nix index 638c1ef9bfcc..016b1a95691b 100644 --- a/nixos/modules/services/desktop-managers/lomiri.nix +++ b/nixos/modules/services/desktop-managers/lomiri.nix @@ -86,6 +86,7 @@ in libusermetrics lomiri lomiri-calculator-app + lomiri-calendar-app lomiri-camera-app lomiri-clock-app lomiri-content-hub From 883665e9877538f557023b8e9c6cb511cf15ce60 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 13 Feb 2025 20:14:15 +0100 Subject: [PATCH 23/29] nixosTests.lomiri-calendar-app: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/lomiri-calendar-app.nix | 79 +++++++++++++++++++ .../lomiri-calendar-app/default.nix | 2 + 3 files changed, 82 insertions(+) create mode 100644 nixos/tests/lomiri-calendar-app.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 24d6e0725f2a..41b63ad36024 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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; diff --git a/nixos/tests/lomiri-calendar-app.nix b/nixos/tests/lomiri-calendar-app.nix new file mode 100644 index 000000000000..5530e9e36075 --- /dev/null +++ b/nixos/tests/lomiri-calendar-app.nix @@ -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") + ''; +} diff --git a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/default.nix index 80dc99584595..8058a4372207 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-calendar-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-calendar-app/default.nix @@ -4,6 +4,7 @@ fetchFromGitLab, fetchpatch, gitUpdater, + nixosTests, accounts-qml-module, buteo-syncfw, cmake, @@ -141,6 +142,7 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru = { + tests.vm = nixosTests.lomiri-calendar-app; updateScript = gitUpdater { rev-prefix = "v"; }; }; From c3ffb832d0b62370f42b0897d66494266df9062a Mon Sep 17 00:00:00 2001 From: vik <2617961+itsnotv@users.noreply.github.com> Date: Fri, 14 Feb 2025 16:20:12 -0800 Subject: [PATCH 24/29] rclone: 1.69.0 -> 1.69.1 https://github.com/rclone/rclone/blob/v1.69.1/docs/content/changelog.md --- pkgs/applications/networking/sync/rclone/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index d6c51fcb91a8..62549ddbab9b 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -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 = [ "." ]; From 8556eb38e6ea1099d793ea50c46764f271350725 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 22 Jan 2025 02:25:53 +0000 Subject: [PATCH 25/29] doppler: 3.71.1 -> 3.72.0 --- pkgs/by-name/do/doppler/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/do/doppler/package.nix b/pkgs/by-name/do/doppler/package.nix index 046a65257037..aaac1d4d40a5 100644 --- a/pkgs/by-name/do/doppler/package.nix +++ b/pkgs/by-name/do/doppler/package.nix @@ -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="; From 57d4ad52cc6cf26d820b11456619c3efe2699b19 Mon Sep 17 00:00:00 2001 From: adamjhf Date: Sun, 16 Feb 2025 09:37:52 +1100 Subject: [PATCH 26/29] wrap program for dynamically linked libraries --- pkgs/by-name/ta/tailwindcss_4/package.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ta/tailwindcss_4/package.nix b/pkgs/by-name/ta/tailwindcss_4/package.nix index 9dfc8a3967b7..ba95c12a9576 100644 --- a/pkgs/by-name/ta/tailwindcss_4/package.nix +++ b/pkgs/by-name/ta/tailwindcss_4/package.nix @@ -3,6 +3,8 @@ stdenv, fetchurl, runCommand, + autoPatchelfHook, + makeWrapper, tailwindcss_4, }: let @@ -38,13 +40,23 @@ stdenv.mkDerivation { inherit hash; }; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; + buildInputs = [ makeWrapper ]; + dontUnpack = true; - dontConfigure = true; dontBuild = true; - dontFixup = true; + dontStrip = true; installPhase = '' - install -D $src $out/bin/tailwindcss + 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 ] + } ''; passthru.tests.helptext = runCommand "tailwindcss-test-helptext" { } '' From 5be72c9adb9d3b21298a4e4ba74aec55351fdf7b Mon Sep 17 00:00:00 2001 From: adamjhf Date: Sun, 16 Feb 2025 10:10:10 +1100 Subject: [PATCH 27/29] re-add update.sh --- pkgs/by-name/ta/tailwindcss_4/update.sh | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pkgs/by-name/ta/tailwindcss_4/update.sh diff --git a/pkgs/by-name/ta/tailwindcss_4/update.sh b/pkgs/by-name/ta/tailwindcss_4/update.sh new file mode 100644 index 000000000000..bcf057e6e9b9 --- /dev/null +++ b/pkgs/by-name/ta/tailwindcss_4/update.sh @@ -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 From 1f9e6007cfad942b34d536e017a0e3955ab79b31 Mon Sep 17 00:00:00 2001 From: adamjhf Date: Sun, 16 Feb 2025 10:18:52 +1100 Subject: [PATCH 28/29] add maintainer --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a438077c23d9..b463474ccab5 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -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"; From 9cd47749086722dfcd5c499a31810943277c260b Mon Sep 17 00:00:00 2001 From: adamjhf Date: Sun, 16 Feb 2025 10:49:57 +1100 Subject: [PATCH 29/29] add versionCheckHook --- pkgs/by-name/ta/tailwindcss_4/package.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/ta/tailwindcss_4/package.nix b/pkgs/by-name/ta/tailwindcss_4/package.nix index ba95c12a9576..9c4128a4df5a 100644 --- a/pkgs/by-name/ta/tailwindcss_4/package.nix +++ b/pkgs/by-name/ta/tailwindcss_4/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchurl, - runCommand, + versionCheckHook, autoPatchelfHook, makeWrapper, tailwindcss_4, @@ -59,18 +59,20 @@ stdenv.mkDerivation { } ''; - passthru.tests.helptext = runCommand "tailwindcss-test-helptext" { } '' - ${tailwindcss_4}/bin/tailwindcss --help > $out - ''; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + versionCheckProgram = "${placeholder "out"}/bin/tailwindcss"; + versionCheckProgramArg = "--help"; + passthru.updateScript = ./update.sh; - meta = with lib; { + meta = { description = "Command-line tool for the CSS framework with composable CSS classes, standalone v4 CLI"; homepage = "https://tailwindcss.com/blog/tailwindcss-v4"; - license = licenses.mit; - sourceProvenance = [ sourceTypes.binaryNativeCode ]; - maintainers = [ maintainers.adamjhf ]; + license = lib.licenses.mit; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + maintainers = [ lib.maintainers.adamjhf ]; mainProgram = "tailwindcss"; - platforms = platforms.darwin ++ platforms.linux; + platforms = lib.platforms.darwin ++ lib.platforms.linux; }; }