From e695459b40dec1368a66ffb67302d25dfc60396e Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 9 Mar 2024 00:58:44 +0000 Subject: [PATCH] geary-gtk4: init (broken!) --- pkgs/additional/geary-gtk4/default.nix | 106 ++++++++++++++++++++++++- pkgs/default.nix | 1 + 2 files changed, 105 insertions(+), 2 deletions(-) diff --git a/pkgs/additional/geary-gtk4/default.nix b/pkgs/additional/geary-gtk4/default.nix index 20f534be..607bb37e 100644 --- a/pkgs/additional/geary-gtk4/default.nix +++ b/pkgs/additional/geary-gtk4/default.nix @@ -1,13 +1,115 @@ -{ +# STATUS +# - DOES NOT BUILD +# - gets to 412/703, then fails when compiling all the src/client/ vala files +# basic stuff like `Gtk.BindingSet` could not be found; `Gtk.Container`, `Gtk.EventButton`, `Gtk.Menu`... +# - seems i have been mislead by the commit messages/discussion and this port is only halfway to buildable. +{ lib, stdenv +, appstream-glib +, desktop-file-utils +, enchant2 +, fetchFromGitLab +, folks +, gcr_4 +, gmime3 +, gnome-online-accounts +, gobject-introspection +, gsound +, gspell +, gtk4 +, icu +, isocodes +, itstool +, json-glib +, libadwaita +, libpeas +, libsecret +, libstemmer +, libunwind +, libxml2 +, libytnef +, meson +, ninja +, pkg-config +, python3 +, sqlite +, vala +, webkitgtk_6_0 +, wrapGAppsHook4 }: stdenv.mkDerivation { pname = "geary-gtk4"; version = "44.1-unstable-2023-10-17"; - src = fetchFromGitlab { + src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "GNOME"; repo = "geary"; rev = "gnumdk/gtk4"; + hash = "sha256-gs9ZdNZL+Elm71OPg+Uk1+EGM9g5ac1HvHwlMGaLJv0="; + }; + + # --replace-fail "'client/web-process/web-process-extension.vala'" "# 'client/web-process/web-process-extension.vala'" + postPatch = '' + substituteInPlace src/console/main.vala \ + --replace-fail 'Gtk.ScrolledWindow(null, null);' 'Gtk.ScrolledWindow();' \ + --replace-fail 'scrolled_console.add' 'scrolled_console.set_child' + substituteInPlace meson.build \ + --replace-fail 'webkitgtk_web_extension = dependency' '# webkitgtk_web_extension = dependency' + substituteInPlace src/meson.build \ + --replace-fail 'web_process_sources,' "" \ + --replace-fail 'webkitgtk_web_extension,' "" + + chmod +x build-aux/git_version.py + patchShebangs build-aux/git_version.py + ''; + + nativeBuildInputs = [ + appstream-glib + desktop-file-utils + gobject-introspection + itstool + meson + ninja + pkg-config + python3 + vala + wrapGAppsHook4 + ]; + + buildInputs = [ + appstream-glib + enchant2 + folks + gcr_4 + gmime3 + gnome-online-accounts + gsound + gspell + gtk4 + icu + isocodes + json-glib + libadwaita + libpeas + libsecret + libstemmer + libunwind + libxml2 + libytnef + sqlite + webkitgtk_6_0 + ]; + + mesonFlags = [ + "-Dprofile=release" + ]; + + meta = with lib; { + broken = true; + homepage = "https://wiki.gnome.org/Apps/Geary"; + description = "GNOME mail client, patched for gtk4"; + maintainers = with maintainers; [ colinsane ]; + license = licenses.lgpl21Plus; + platforms = platforms.linux; }; } diff --git a/pkgs/default.nix b/pkgs/default.nix index 6fcdf718..527a92ec 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -31,6 +31,7 @@ let feeds = lib.recurseIntoAttrs (callPackage ./additional/feeds { }); firefox-extensions = lib.recurseIntoAttrs (callPackage ./additional/firefox-extensions { }); flare-signal-nixified = callPackage ./additional/flare-signal-nixified { }; + geary-gtk4 = callPackage ./additional/geary-gtk4 { }; gopass-native-messaging-host = callPackage ./additional/gopass-native-messaging-host { }; gpodder-adaptive = callPackage ./additional/gpodder-adaptive { }; gpodder-adaptive-configured = callPackage ./additional/gpodder-configured {