2022-03-30 09:31:56 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, substituteAll
|
|
|
|
, pkg-config
|
|
|
|
, gnome
|
2022-09-09 14:08:57 +00:00
|
|
|
, _experimental-update-script-combinators
|
2022-03-30 09:31:56 +00:00
|
|
|
, python3
|
|
|
|
, gobject-introspection
|
|
|
|
, gettext
|
2022-10-21 18:38:19 +00:00
|
|
|
, libsoup_3
|
2022-03-30 09:31:56 +00:00
|
|
|
, libxml2
|
|
|
|
, libsecret
|
|
|
|
, icu
|
|
|
|
, sqlite
|
|
|
|
, tzdata
|
|
|
|
, libcanberra-gtk3
|
|
|
|
, p11-kit
|
|
|
|
, db
|
|
|
|
, nspr
|
|
|
|
, nss
|
|
|
|
, libical
|
|
|
|
, gperf
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2022-03-30 09:31:56 +00:00
|
|
|
, glib-networking
|
2024-01-02 11:29:13 +00:00
|
|
|
, gsettings-desktop-schemas
|
2022-03-30 09:31:56 +00:00
|
|
|
, pcre
|
|
|
|
, vala
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, libkrb5
|
|
|
|
, openldap
|
2024-09-26 11:04:55 +00:00
|
|
|
, enableOAuth2 ? stdenv.hostPlatform.isLinux
|
2022-10-21 18:38:19 +00:00
|
|
|
, webkitgtk_4_1
|
2023-04-12 12:48:02 +00:00
|
|
|
, webkitgtk_6_0
|
2022-03-30 09:31:56 +00:00
|
|
|
, json-glib
|
|
|
|
, glib
|
|
|
|
, gtk3
|
2022-10-21 18:38:19 +00:00
|
|
|
, gtk4
|
|
|
|
, withGtk3 ? true
|
|
|
|
, withGtk4 ? false
|
2022-03-30 09:31:56 +00:00
|
|
|
, libphonenumber
|
|
|
|
, gnome-online-accounts
|
|
|
|
, libgweather
|
|
|
|
, boost
|
|
|
|
, protobuf
|
2022-10-30 15:09:59 +00:00
|
|
|
, libiconv
|
2022-12-28 21:21:41 +00:00
|
|
|
, makeHardcodeGsettingsPatch
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "evolution-data-server";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "3.52.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
2024-09-19 14:19:46 +00:00
|
|
|
url = "mirror://gnome/sources/evolution-data-server/${lib.versions.majorMinor version}/evolution-data-server-${version}.tar.xz";
|
|
|
|
hash = "sha256-GzaoOdscjYmAZuGb54uZWTCgovKohvFJ5PZOF1XwZPc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit tzdata;
|
|
|
|
})
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
# Avoid using wrapper function, which the hardcode gsettings
|
|
|
|
# patch generator cannot handle.
|
|
|
|
./drop-tentative-settings-constructor.patch
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
prePatch = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
substitute ${./hardcode-gsettings.patch} hardcode-gsettings.patch \
|
2024-09-19 14:19:46 +00:00
|
|
|
--subst-var-by EDS ${glib.makeSchemaPath "$out" "evolution-data-server-${version}"} \
|
2024-01-02 11:29:13 +00:00
|
|
|
--subst-var-by GDS ${glib.getSchemaPath gsettings-desktop-schemas}
|
2020-04-24 23:36:52 +00:00
|
|
|
patches="$patches $PWD/hardcode-gsettings.patch"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
gettext
|
|
|
|
python3
|
|
|
|
gperf
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2022-03-30 09:31:56 +00:00
|
|
|
gobject-introspection
|
|
|
|
vala
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
glib
|
2024-01-02 11:29:13 +00:00
|
|
|
libsecret
|
2022-10-21 18:38:19 +00:00
|
|
|
libsoup_3
|
2022-03-30 09:31:56 +00:00
|
|
|
gnome-online-accounts
|
|
|
|
p11-kit
|
|
|
|
libgweather
|
|
|
|
icu
|
|
|
|
sqlite
|
|
|
|
libkrb5
|
|
|
|
openldap
|
|
|
|
glib-networking
|
|
|
|
libcanberra-gtk3
|
|
|
|
pcre
|
|
|
|
libphonenumber
|
|
|
|
boost
|
|
|
|
protobuf
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2022-10-30 15:09:59 +00:00
|
|
|
libiconv
|
2022-10-21 18:38:19 +00:00
|
|
|
] ++ lib.optionals withGtk3 [
|
|
|
|
gtk3
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals (withGtk3 && enableOAuth2) [
|
2022-10-21 18:38:19 +00:00
|
|
|
webkitgtk_4_1
|
|
|
|
] ++ lib.optionals withGtk4 [
|
|
|
|
gtk4
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals (withGtk4 && enableOAuth2) [
|
2023-04-12 12:48:02 +00:00
|
|
|
webkitgtk_6_0
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
db
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
libical
|
2022-10-21 18:38:19 +00:00
|
|
|
libsoup_3
|
|
|
|
libxml2
|
|
|
|
json-glib
|
2022-01-19 23:45:15 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DENABLE_VALA_BINDINGS=ON"
|
|
|
|
"-DENABLE_INTROSPECTION=ON"
|
|
|
|
"-DINCLUDE_INSTALL_DIR=${placeholder "dev"}/include"
|
2021-03-15 08:37:03 +00:00
|
|
|
"-DWITH_PHONENUMBER=ON"
|
2022-10-21 18:38:19 +00:00
|
|
|
"-DENABLE_GTK=${lib.boolToString withGtk3}"
|
|
|
|
"-DENABLE_EXAMPLES=${lib.boolToString withGtk3}"
|
|
|
|
"-DENABLE_CANBERRA=${lib.boolToString withGtk3}"
|
|
|
|
"-DENABLE_GTK4=${lib.boolToString withGtk4}"
|
2022-10-30 15:09:59 +00:00
|
|
|
"-DENABLE_OAUTH2_WEBKITGTK=${lib.boolToString (withGtk3 && enableOAuth2)}"
|
|
|
|
"-DENABLE_OAUTH2_WEBKITGTK4=${lib.boolToString (withGtk4 && enableOAuth2)}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2022-10-30 15:09:59 +00:00
|
|
|
substituteInPlace cmake/modules/SetupBuildFlags.cmake \
|
|
|
|
--replace "-Wl,--no-undefined" ""
|
|
|
|
substituteInPlace src/services/evolution-alarm-notify/e-alarm-notify.c \
|
|
|
|
--replace "G_OS_WIN32" "__APPLE__"
|
|
|
|
'';
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2024-09-19 14:19:46 +00:00
|
|
|
ln -s $out/lib/evolution-data-server/*.dylib $out/lib/
|
2022-10-30 15:09:59 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
hardcodeGsettingsPatch = makeHardcodeGsettingsPatch {
|
|
|
|
schemaIdToVariableMapping = {
|
2022-11-21 17:40:18 +00:00
|
|
|
"org.gnome.Evolution.DefaultSources" = "EDS";
|
|
|
|
"org.gnome.evolution.shell.network-config" = "EDS";
|
|
|
|
"org.gnome.evolution-data-server.addressbook" = "EDS";
|
|
|
|
"org.gnome.evolution-data-server.calendar" = "EDS";
|
|
|
|
"org.gnome.evolution-data-server" = "EDS";
|
2024-01-02 11:29:13 +00:00
|
|
|
"org.gnome.desktop.interface" = "GDS";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit src patches;
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
2022-09-09 14:08:57 +00:00
|
|
|
updateScript =
|
|
|
|
let
|
|
|
|
updateSource = gnome.updateScript {
|
|
|
|
packageName = "evolution-data-server";
|
|
|
|
versionPolicy = "odd-unstable";
|
|
|
|
};
|
2022-11-21 17:40:18 +00:00
|
|
|
updatePatch = _experimental-update-script-combinators.copyAttrOutputToFile "evolution-data-server.hardcodeGsettingsPatch" ./hardcode-gsettings.patch;
|
2022-09-09 14:08:57 +00:00
|
|
|
in
|
|
|
|
_experimental-update-script-combinators.sequence [
|
|
|
|
updateSource
|
2022-11-21 17:40:18 +00:00
|
|
|
updatePatch
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Unified backend for programs that work with contacts, tasks, and calendar information";
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/evolution-data-server";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = teams.gnome.members;
|
2022-10-30 15:09:59 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|