Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reminders: init at 4.0-unstable-2023-05-03 #363748

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 22 additions & 0 deletions nixos/modules/programs/reminders.nix
Original file line number Diff line number Diff line change
@@ -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 ];
}
88 changes: 88 additions & 0 deletions pkgs/by-name/re/reminders/package.nix
Original file line number Diff line number Diff line change
@@ -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`
Comment on lines +38 to +40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you set strictDeps = true to ensure these are really only used during the build, not linked into the result?

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";
};
}
Loading