diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 38bf70ad3af3c..007f4e56fc946 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -24,6 +24,8 @@ - [mqtt-exporter](https://github.com/kpetremann/mqtt-exporter/), a Prometheus exporter for exposing messages from MQTT. Available as [services.prometheus.exporters.mqtt](#opt-services.prometheus.exporters.mqtt.enable). +- [Reminders](https://github.com/remindersdevs/Reminders), an open source reminder tool. Available with [programs.reminders](options.html#opt-programs.reminders.enable). + - [Buffyboard](https://gitlab.postmarketos.org/postmarketOS/buffybox/-/tree/master/buffyboard), a framebuffer on-screen keyboard. Available as [services.buffyboard](option.html#opt-services.buffyboard). diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 1508806e58604..9f97d5c95144c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -276,6 +276,7 @@ ./programs/qt5ct.nix ./programs/quark-goldleaf.nix ./programs/regreet.nix + ./programs/reminders.nix ./programs/rog-control-center.nix ./programs/rust-motd.nix ./programs/ryzen-monitor-ng.nix diff --git a/nixos/modules/programs/reminders.nix b/nixos/modules/programs/reminders.nix new file mode 100644 index 0000000000000..b15e6220b0742 --- /dev/null +++ b/nixos/modules/programs/reminders.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.programs.reminders; +in +{ + options.programs.reminders = { + enable = lib.mkEnableOption "Reminders, an open source reminder app"; + package = lib.mkPackageOption pkgs "reminders" { }; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = [ cfg.package ]; + services.dbus.packages = [ cfg.package ]; + }; + + meta.maintainers = with lib.maintainers; [ pluiedev ]; +} diff --git a/pkgs/by-name/re/reminders/package.nix b/pkgs/by-name/re/reminders/package.nix new file mode 100644 index 0000000000000..3f07c33e0973a --- /dev/null +++ b/pkgs/by-name/re/reminders/package.nix @@ -0,0 +1,88 @@ +{ + lib, + python3, + fetchFromGitHub, + + meson, + ninja, + pkg-config, + appstream, + glib, + gtk4, + desktop-file-utils, + gobject-introspection, + wrapGAppsHook4, + + libadwaita, + gsound, + webkitgtk_6_0, + libsecret, +}: +python3.pkgs.buildPythonApplication { + pname = "reminders"; + # 4.0 release is pre-rebranding and still called "Remembrance" + version = "4.0-unstable-2023-05-03"; + pyproject = false; + + src = fetchFromGitHub { + owner = "remindersdevs"; + repo = "Reminders"; + rev = "f649ea653b43d3ff0ef331729eb043fbb912f6f7"; + hash = "sha256-dhtspgHM+HWqDSNdF4O/NOyDGcL7aADsm0yT5MKjw3k="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + appstream # `appstreamcli` + glib # `glib-compile-schemas` + gtk4 # `gtk-update-icon-cache` + desktop-file-utils # `desktop-file-validate` + gobject-introspection + wrapGAppsHook4 + ]; + + buildInputs = [ + libadwaita + gsound + webkitgtk_6_0 + libsecret + ]; + + dependencies = with python3.pkgs; [ + pygobject3 + msal + requests + caldav + icalendar + setuptools # `pkg_resources` + ]; + + dontWrapGApps = true; + makeWrapperArgs = [ "\${gappsWrapperArgs[@]}" ]; + + postFixup = '' + wrapPythonProgramsIn $out/libexec $out $pythonPath + + # We don't want store paths in desktop files + desktop-file-edit --set-key Exec --set-value "reminders %U" \ + $out/share/applications/io.github.remindersdevs.Reminders.desktop + ''; + + # NOTE: `postCheck` is intentionally not used here, as the entire checkPhase + # is skipped by `buildPythonApplication` + # https://github.com/NixOS/nixpkgs/blob/9d4343b7b27a3e6f08fc22ead568233ff24bbbde/pkgs/development/interpreters/python/mk-python-derivation.nix#L296 + postInstallCheck = '' + mesonCheckPhase + ''; + + meta = { + description = "Open source reminder app"; + homepage = "https://github.com/remindersdevs/Reminders"; + license = with lib.licenses; [ gpl3Plus ]; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ pluiedev ]; + mainProgram = "reminders"; + }; +}