From 2f500716950e940f02c4009770e46b2c90e065d8 Mon Sep 17 00:00:00 2001 From: rope Date: Sun, 23 Aug 2026 10:18:13 +0100 Subject: [PATCH] lookout: package the Outlook-alike GNOME mail client Co-Authored-By: Claude Opus 5 --- apps/lookout.nix | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ common.nix | 1 + 2 files changed, 54 insertions(+) create mode 100644 apps/lookout.nix diff --git a/apps/lookout.nix b/apps/lookout.nix new file mode 100644 index 0000000..982dc18 --- /dev/null +++ b/apps/lookout.nix @@ -0,0 +1,53 @@ +#./apps/lookout.nix +{ pkgs, lib, config, ... }: +let + lookout = pkgs.rustPlatform.buildRustPackage (finalAttrs: { + pname = "lookout"; + version = "0.9.99"; + + src = pkgs.fetchFromGitHub { + owner = "gavindi"; + repo = "lookout"; + tag = finalAttrs.version; + hash = "sha256-X0m5f/Kk8Uf4e330vY/E5OHb8i5O/JI0zLGWqYS2BzE="; + }; + + # Cargo workspace lives in source/, data/ next to it. + sourceRoot = "${finalAttrs.src.name}/source"; + cargoHash = "sha256-6f9aNjvDcdpxxkGbxBDrEB94YZikpc3bNtYex0EREXE="; + + # The app crate's tests instantiate GTK widgets, which needs a display. + doCheck = false; + + nativeBuildInputs = with pkgs; [ pkg-config glib wrapGAppsHook4 ]; + buildInputs = with pkgs; [ gtk4 libadwaita webkitgtk_6_0 ]; + + postInstall = '' + install -Dm644 data/io.github.gavindi.Lookout.desktop -t $out/share/applications + install -Dm644 data/io.github.gavindi.Lookout.metainfo.xml -t $out/share/metainfo + install -Dm644 data/icons/hicolor/scalable/apps/io.github.gavindi.Lookout.svg \ + -t $out/share/icons/hicolor/scalable/apps + install -Dm644 data/gschema/io.github.gavindi.Lookout.gschema.xml \ + -t $out/share/glib-2.0/schemas + ''; + + meta = { + description = "Native GNOME mail, calendar and contacts client shaped like Outlook"; + homepage = "https://github.com/gavindi/lookout"; + license = lib.licenses.gpl3Plus; + mainProgram = "lookout"; + platforms = lib.platforms.linux; + }; + }); +in +{ + config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]) { + environment.systemPackages = [ + lookout + # Lookout reads accounts from GOA over D-Bus; nothing on Hyprland can add + # one without this settings panel. + pkgs.gnome-online-accounts-gtk + ]; + services.gnome.gnome-online-accounts.enable = true; + }; +} diff --git a/common.nix b/common.nix index c544812..02d0779 100644 --- a/common.nix +++ b/common.nix @@ -89,6 +89,7 @@ in ./settings/users.nix ./settings/shell.nix ./apps/zen.nix + ./apps/lookout.nix # Services # ./services/server-permissions.nix