Merge pull request #196577 from wegank/evolution-data-server-darwin

This commit is contained in:
Sandro
2022-10-25 17:08:23 +02:00
committed by GitHub
3 changed files with 52 additions and 16 deletions
@@ -32,6 +32,7 @@
, ninja
, libkrb5
, openldap
, enableOAuth2 ? stdenv.isLinux
, webkitgtk_4_1
, webkitgtk_5_0
, libaccounts-glib
@@ -46,6 +47,7 @@
, libgweather
, boost
, protobuf
, libiconv
}:
stdenv.mkDerivation rec {
@@ -90,7 +92,6 @@ stdenv.mkDerivation rec {
gnome-online-accounts
p11-kit
libgweather
libaccounts-glib
icu
sqlite
libkrb5
@@ -101,11 +102,17 @@ stdenv.mkDerivation rec {
libphonenumber
boost
protobuf
] ++ lib.optionals stdenv.isLinux [
libaccounts-glib
] ++ lib.optionals stdenv.isDarwin [
libiconv
] ++ lib.optionals withGtk3 [
gtk3
] ++ lib.optionals (withGtk3 && enableOAuth2) [
webkitgtk_4_1
] ++ lib.optionals withGtk4 [
gtk4
] ++ lib.optionals (withGtk4 && enableOAuth2) [
webkitgtk_5_0
];
@@ -130,8 +137,21 @@ stdenv.mkDerivation rec {
"-DENABLE_EXAMPLES=${lib.boolToString withGtk3}"
"-DENABLE_CANBERRA=${lib.boolToString withGtk3}"
"-DENABLE_GTK4=${lib.boolToString withGtk4}"
"-DENABLE_OAUTH2_WEBKITGTK=${lib.boolToString (withGtk3 && enableOAuth2)}"
"-DENABLE_OAUTH2_WEBKITGTK4=${lib.boolToString (withGtk4 && enableOAuth2)}"
];
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/modules/SetupBuildFlags.cmake \
--replace "-Wl,--no-undefined" ""
substituteInPlace src/services/evolution-alarm-notify/e-alarm-notify.c \
--replace "G_OS_WIN32" "__APPLE__"
'';
postInstall = lib.optionalString stdenv.isDarwin ''
ln -s $out/lib/${pname}/*.dylib $out/lib/
'';
passthru = {
# In order for GNOME not to depend on OCaml through Coccinelle,
# we materialize the SmPL patch into a unified diff-style patch.
@@ -175,6 +195,6 @@ stdenv.mkDerivation rec {
homepage = "https://wiki.gnome.org/Apps/Evolution";
license = licenses.lgpl2Plus;
maintainers = teams.gnome.members;
platforms = platforms.linux;
platforms = platforms.unix;
};
}
@@ -8,6 +8,7 @@
, ninja
, libxslt
, gtk3
, enableBackend ? stdenv.isLinux
, webkitgtk_4_1
, json-glib
, librest_1_0
@@ -33,7 +34,7 @@ stdenv.mkDerivation rec {
pname = "gnome-online-accounts";
version = "3.46.0";
outputs = [ "out" "man" "dev" "devdoc" ];
outputs = [ "out" "dev" ] ++ lib.optionals enableBackend [ "man" "devdoc" ];
# https://gitlab.gnome.org/GNOME/gnome-online-accounts/issues/87
src = fetchFromGitLab {
@@ -46,8 +47,9 @@ stdenv.mkDerivation rec {
mesonFlags = [
"-Dfedora=false" # not useful in NixOS or for NixOS users.
"-Dgtk_doc=true"
"-Dman=true"
"-Dgoabackend=${lib.boolToString enableBackend}"
"-Dgtk_doc=${lib.boolToString enableBackend}"
"-Dman=${lib.boolToString enableBackend}"
"-Dmedia_server=true"
];
@@ -79,6 +81,7 @@ stdenv.mkDerivation rec {
libxml2
libsecret
libsoup_3
] ++ lib.optionals enableBackend [
webkitgtk_4_1
];
@@ -94,7 +97,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://wiki.gnome.org/Projects/GnomeOnlineAccounts";
description = "Single sign-on framework for GNOME";
platforms = platforms.linux;
platforms = platforms.unix;
license = licenses.lgpl2Plus;
maintainers = teams.gnome.members;
};
+23 -10
View File
@@ -7,6 +7,7 @@
, gettext
, dbus
, glib
, udevSupport ? stdenv.isLinux
, libgudev
, udisks2
, libgcrypt
@@ -72,26 +73,27 @@ stdenv.mkDerivation rec {
buildInputs = [
glib
libgudev
udisks2
libgcrypt
dbus
libgphoto2
avahi
libarchive
libimobiledevice
libbluray
libnfs
openssh
gsettings-desktop-schemas
libsoup_3
] ++ lib.optionals udevSupport [
libgudev
udisks2
fuse3
libcdio
samba
libmtp
libcap
polkit
libimobiledevice
libbluray
libcdio-paranoia
libnfs
openssh
gsettings-desktop-schemas
libsoup_3
] ++ lib.optionals gnomeSupport [
gcr
glib-networking # TLS support
@@ -103,6 +105,17 @@ stdenv.mkDerivation rec {
mesonFlags = [
"-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
"-Dtmpfilesdir=no"
] ++ lib.optionals (!udevSupport) [
"-Dgudev=false"
"-Dudisks2=false"
"-Dfuse=false"
"-Dcdda=false"
"-Dsmb=false"
"-Dmtp=false"
"-Dadmin=false"
"-Dgphoto2=false"
"-Dlibusb=false"
"-Dlogind=false"
] ++ lib.optionals (!gnomeSupport) [
"-Dgcr=false"
"-Dgoa=false"
@@ -128,7 +141,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Virtual Filesystem support library" + optionalString gnomeSupport " (full GNOME support)";
license = licenses.lgpl2Plus;
platforms = platforms.linux;
maintainers = [ ] ++ teams.gnome.members;
platforms = platforms.unix;
maintainers = teams.gnome.members;
};
}