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
WIP: Evolution with plugins #92775
WIP: Evolution with plugins #92775
Conversation
|
||
postBuild = '' | ||
wrapProgram $out/bin/evolution \ | ||
--set LD_LIBRARY_PATH "$out/lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, cool trick. That circumvents the nested patching issue. But we will need to make sure there are no side effects to child processes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this still does not deal with the fact that the desktop file points to the unwrapped evolution in pkgs.evolution
.
pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix
Outdated
Show resolved
Hide resolved
pkgs/applications/networking/mailreaders/evolution/evolution/default.nix
Outdated
Show resolved
Hide resolved
6425f39
to
dc9dbf3
Compare
@@ -156,8 +156,6 @@ lib.makeScope pkgs.newScope (self: with self; { | |||
|
|||
cheese = callPackage ./apps/cheese { }; | |||
|
|||
evolution = callPackage ./apps/evolution { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also delete the old file.
And add alias to the bottom of this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That file was moved to pkgs/applications/networking/mailreaders/evolution/evolution/default.nix .
It does not show on my system anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, GitHub still has that https://github.com/dasj19/nixpkgs/blob/evolution-with-plugins/pkgs/desktops/gnome-3/apps/evolution/default.nix
]; | ||
|
||
buildInputs = [ | ||
adwaita-icon-theme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to use these as gnome3.adwaita-icon-theme
, otherwise overriding the canonical location of adwaita in overlays will not have an effect on evolution.
pkgs/applications/networking/mailreaders/evolution/evolution/default.nix
Outdated
Show resolved
Hide resolved
edd3849
to
42a318c
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/running-evolution-without-gnome-is-it-sane-possible/8328/2 |
I tried running evolution-with-plugins but it does not seem to load the plugin at all. I don't see the option to add an EWS server. |
@symphorien I was struggling to get evolution to "see" the evolution-ews plugin as well, unfortunately without much luck |
To recapitulate, The former has an advantage that it can be done in advance during the initial build and there is no need to rebuild programs that depend on e-d-s (e.g. geary or gnome-shell) but it also requires a global location to install plug-ins. The latter will allow us to have self-contained And we cannot forget that So I think the easiest way forward would be patching |
42a318c
to
e26d0ec
Compare
I can get the plugin to load this way: diff --git a/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix b/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix
index ebad920d895..e4d5bbda2ef 100644
--- a/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix
+++ b/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix
@@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
pname = "evolution-ews";
- version = "3.36.5";
+ version = "3.36.4";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
- sha256 = "0h1wz4hxsasihdvvsaxnmzka4afjw7603gn0qcw8rxpw114ib1bl";
+ sha256 = "0zfq02h3r1qbxak04i49564q4s2ykvkgcyc3krjgndan9lq3kvvn";
};
nativeBuildInputs = [ cmake gettext intltool pkg-config ];
diff --git a/pkgs/applications/networking/mailreaders/evolution/evolution/default.nix b/pkgs/applications/networking/mailreaders/evolution/evolution/default.nix
index 819ab97ec34..d2d420fa78a 100644
--- a/pkgs/applications/networking/mailreaders/evolution/evolution/default.nix
+++ b/pkgs/applications/networking/mailreaders/evolution/evolution/default.nix
@@ -48,6 +48,10 @@ stdenv.mkDerivation rec {
sha256 = "0vgd3i5zrs4r0i0700hhl89c66j41bgdzg9j8wdf0w8irlqj5xv2";
};
+ patches = [
+ ./moduledir_from_env.patch
+ ];
+
nativeBuildInputs = [
cmake
intltool
diff --git a/pkgs/applications/networking/mailreaders/evolution/evolution/moduledir_from_env.patch b/pkgs/applications/networking/mailreaders/evolution/evolution/moduledir_from_env.patch
new file mode 100644
index 00000000000..36b3bbacc1c
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/evolution/evolution/moduledir_from_env.patch
@@ -0,0 +1,21 @@
+diff --git a/src/shell/main.c b/src/shell/main.c
+index 5d089225ca..030908d684 100644
+--- a/src/shell/main.c
++++ b/src/shell/main.c
+@@ -407,7 +407,15 @@ create_default_shell (void)
+ }
+
+ /* Load all shared library modules. */
+- module_types = e_module_load_all_in_directory (EVOLUTION_MODULEDIR);
++ const gchar *modules_directory = EVOLUTION_MODULEDIR;
++ const gchar *modules_directory_env;
++
++ modules_directory_env = g_getenv ("EVOLUTION_MODULEDIR");
++ if (modules_directory_env &&
++ g_file_test (modules_directory_env, G_FILE_TEST_IS_DIR))
++ modules_directory = g_strdup (modules_directory_env);
++
++ module_types = e_module_load_all_in_directory (modules_directory);
+ g_list_free_full (module_types, (GDestroyNotify) g_type_module_unuse);
+
+ flags = G_APPLICATION_HANDLES_OPEN |
diff --git a/pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix b/pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix
index 1a0fdab7092..091f7b6ae2a 100644
--- a/pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix
+++ b/pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix
@@ -8,7 +8,12 @@ symlinkJoin {
postBuild = ''
wrapProgram $out/bin/evolution \
- --set LD_LIBRARY_PATH "$out/lib"
+ --set LD_LIBRARY_PATH "$out/lib" \
+ --set EDS_ADDRESS_BOOK_MODULES "$out/lib/evolution-data-server/addressbook-backends/" \
+ --set EDS_CALENDAR_MODULES "$out/lib/evolution-data-server/calendar-backends/" \
+ --set EDS_CAMEL_PROVIDER_DIR "$out/lib/evolution-data-server/camel-providers/" \
+ --set EDS_REGISTRY_MODULES "$out/lib/evolution-data-server/registry-modules/" \
+ --set EVOLUTION_MODULEDIR "$out/lib/evolution/modules"
LIBRARIES=$(ls -d ${lib.makeLibraryPath [evolution-ews]}/*)
for library in $LIBRARIES; do But I currently have no access to an ews account to test beyond "the option to add an ews account is offered to me" |
@symphorien thanks, that is huge progress, I am building with your changes right now... and I have an exchange email address to test. |
@symphorien I tested and I am unable to add an exchange account. The terminal does not reveal anything disturbing either... |
maybe retry with |
Thanks for the advice. I have applied that flag but I still can't see anything out of the ordinary. You can take a look here: https://pastebin.com/8DVFcK82 |
Looking at the environment of the various |
So I got it to work by also changing the module as well 92eda380bb3a61fe66ffd924ba84b708849c0fad . It's very hacky, I think the API of the module must be changed. But you have to be very careful to not have anything depending on an old version of evolution-data-server in the system (I had installed gnome-calendar with home-manager) otherwise for a reason I cannot fathom, dbus starts the old (unwrapped) version of the evolution-data-server helpers. So if it does not work for you, check with htop and lsof that the right helpers are launched. |
84ddfd0
to
cfb247a
Compare
Thanks a lot @symphorien ... I have tried with version 3.36.4 and 3.36.5 for So I pushed your changes in my branch and rebased to master. We finally have a working prototype for |
cfb247a
to
06c994f
Compare
I reworked the evolution data server module to install evolution plugins in 09f09facbd0 |
I reopened this properly as #103135 |
Motivation for this change
WIP wrapper for evolution to incorporate plugins like evolution-ews.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)