mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-05 02:23:07 +03:00
Merge pull request #103135 from symphorien/pr/92775
Evolution ews: wrap evolution and evolution data server, fix nixos module.
This commit is contained in:
commit
7ed3d2df76
@ -15,31 +15,45 @@ with lib;
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
services.gnome3.evolution-data-server = {
|
services.gnome3.evolution-data-server = {
|
||||||
|
enable = mkEnableOption "Evolution Data Server, a collection of services for storing addressbooks and calendars.";
|
||||||
enable = mkOption {
|
plugins = mkOption {
|
||||||
type = types.bool;
|
type = types.listOf types.package;
|
||||||
default = false;
|
default = [ ];
|
||||||
description = ''
|
description = "Plugins for Evolution Data Server.";
|
||||||
Whether to enable Evolution Data Server, a collection of services for
|
};
|
||||||
storing addressbooks and calendars.
|
};
|
||||||
'';
|
programs.evolution = {
|
||||||
|
enable = mkEnableOption "Evolution, a Personal information management application that provides integrated mail, calendaring and address book functionality.";
|
||||||
|
plugins = mkOption {
|
||||||
|
type = types.listOf types.package;
|
||||||
|
default = [ ];
|
||||||
|
example = literalExample "[ pkgs.evolution-ews ]";
|
||||||
|
description = "Plugins for Evolution.";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.services.gnome3.evolution-data-server.enable {
|
config =
|
||||||
|
let
|
||||||
|
bundle = pkgs.evolutionWithPlugins.override { inherit (config.services.gnome3.evolution-data-server) plugins; };
|
||||||
|
in
|
||||||
|
mkMerge [
|
||||||
|
(mkIf config.services.gnome3.evolution-data-server.enable {
|
||||||
|
environment.systemPackages = [ bundle ];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.gnome3.evolution-data-server ];
|
services.dbus.packages = [ bundle ];
|
||||||
|
|
||||||
services.dbus.packages = [ pkgs.gnome3.evolution-data-server ];
|
|
||||||
|
|
||||||
systemd.packages = [ pkgs.gnome3.evolution-data-server ];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
systemd.packages = [ bundle ];
|
||||||
|
})
|
||||||
|
(mkIf config.programs.evolution.enable {
|
||||||
|
services.gnome3.evolution-data-server = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [ pkgs.evolution ] ++ config.programs.evolution.plugins;
|
||||||
|
};
|
||||||
|
services.gnome3.gnome-keyring.enable = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
, cairo
|
, cairo
|
||||||
, desktop-file-utils
|
, desktop-file-utils
|
||||||
, evolution-data-server
|
, evolution-data-server
|
||||||
|
, evolution
|
||||||
, gcr
|
, gcr
|
||||||
, gettext
|
, gettext
|
||||||
, glib
|
, glib
|
||||||
@ -48,7 +49,7 @@ stdenv.mkDerivation rec {
|
|||||||
evolution-data-server
|
evolution-data-server
|
||||||
gcr
|
gcr
|
||||||
glib
|
glib
|
||||||
gnome3.evolution
|
evolution
|
||||||
gpgme
|
gpgme
|
||||||
gtk3
|
gtk3
|
||||||
gtksourceview3
|
gtksourceview3
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchurl, gnome3, cmake, gettext, intltool, pkg-config, evolution-data-server
|
{ lib, stdenv, fetchurl, gnome3, cmake, gettext, intltool, pkg-config, evolution-data-server, evolution
|
||||||
, sqlite, gtk3, webkitgtk, libgdata, libmspack }:
|
, sqlite, gtk3, webkitgtk, libgdata, libmspack }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ cmake gettext intltool pkg-config ];
|
nativeBuildInputs = [ cmake gettext intltool pkg-config ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
evolution-data-server gnome3.evolution
|
evolution-data-server evolution
|
||||||
sqlite libgdata
|
sqlite libgdata
|
||||||
gtk3 webkitgtk
|
gtk3 webkitgtk
|
||||||
libmspack
|
libmspack
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
, libnotify
|
, libnotify
|
||||||
, gspell
|
, gspell
|
||||||
, evolution-data-server
|
, evolution-data-server
|
||||||
, adwaita-icon-theme
|
|
||||||
, gnome-desktop
|
|
||||||
, libgdata
|
, libgdata
|
||||||
, libgweather
|
, libgweather
|
||||||
, glib-networking
|
, glib-networking
|
||||||
@ -61,7 +59,7 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
adwaita-icon-theme
|
gnome3.adwaita-icon-theme
|
||||||
bogofilter
|
bogofilter
|
||||||
db
|
db
|
||||||
evolution-data-server
|
evolution-data-server
|
||||||
@ -69,7 +67,7 @@ stdenv.mkDerivation rec {
|
|||||||
gdk-pixbuf
|
gdk-pixbuf
|
||||||
glib
|
glib
|
||||||
glib-networking
|
glib-networking
|
||||||
gnome-desktop
|
gnome3.gnome-desktop
|
||||||
gsettings-desktop-schemas
|
gsettings-desktop-schemas
|
||||||
gst_all_1.gst-plugins-base
|
gst_all_1.gst-plugins-base
|
||||||
gst_all_1.gstreamer
|
gst_all_1.gstreamer
|
||||||
@ -115,6 +113,10 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./moduledir_from_env.patch
|
||||||
|
];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = gnome3.updateScript {
|
updateScript = gnome3.updateScript {
|
||||||
packageName = "evolution";
|
packageName = "evolution";
|
@ -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 |
|
@ -0,0 +1,41 @@
|
|||||||
|
{ lib, makeWrapper, symlinkJoin, gnome3, plugins }:
|
||||||
|
|
||||||
|
symlinkJoin {
|
||||||
|
name = "evolution-with-plugins";
|
||||||
|
paths = [ gnome3.evolution-data-server ] ++ plugins;
|
||||||
|
|
||||||
|
buildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
for i in $out/bin/* $out/libexec/**; do
|
||||||
|
if [ ! -d $i ]; then
|
||||||
|
echo wrapping $i
|
||||||
|
wrapProgram $i \
|
||||||
|
--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"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
fixSymlink () {
|
||||||
|
local link=$1
|
||||||
|
local target=$(readlink $link);
|
||||||
|
local newtarget=$(sed "s@/nix/store/[^/]*/@$out/@" <<< "$target")
|
||||||
|
if [[ $target != $newtarget ]] && [[ -d $newtarget ]]; then
|
||||||
|
echo fixing link to point to $newtarget instead of $target
|
||||||
|
rm $link
|
||||||
|
ln -s $newtarget $link
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
fixSymlink $out/share/dbus-1/service
|
||||||
|
fixSymlink $out/lib/systemd/user
|
||||||
|
for i in $out/share/dbus-1/services/*.service $out/lib/systemd/user/*.service; do
|
||||||
|
echo fixing service file $i to point to $out
|
||||||
|
sed -i "s@/nix/store/[^/]*/@$out/@" $i
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
}
|
@ -158,8 +158,6 @@ lib.makeScope pkgs.newScope (self: with self; {
|
|||||||
|
|
||||||
cheese = callPackage ./apps/cheese { };
|
cheese = callPackage ./apps/cheese { };
|
||||||
|
|
||||||
evolution = callPackage ./apps/evolution { };
|
|
||||||
|
|
||||||
file-roller = callPackage ./apps/file-roller { };
|
file-roller = callPackage ./apps/file-roller { };
|
||||||
|
|
||||||
gedit = callPackage ./apps/gedit { };
|
gedit = callPackage ./apps/gedit { };
|
||||||
|
@ -21688,6 +21688,8 @@ in
|
|||||||
inherit (gnome3) evince;
|
inherit (gnome3) evince;
|
||||||
evolution-data-server = gnome3.evolution-data-server;
|
evolution-data-server = gnome3.evolution-data-server;
|
||||||
evolution-ews = callPackage ../applications/networking/mailreaders/evolution/evolution-ews { };
|
evolution-ews = callPackage ../applications/networking/mailreaders/evolution/evolution-ews { };
|
||||||
|
evolution = callPackage ../applications/networking/mailreaders/evolution/evolution { };
|
||||||
|
evolutionWithPlugins = callPackage ../applications/networking/mailreaders/evolution/evolution/wrapper.nix { plugins = [ evolution evolution-ews ]; };
|
||||||
|
|
||||||
keepass = callPackage ../applications/misc/keepass { };
|
keepass = callPackage ../applications/misc/keepass { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user