diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2022-10-25 16:08:28 +0200 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2022-10-25 16:08:28 +0200 |
commit | b082de986e23822fb63984e908e87abdd40ed239 (patch) | |
tree | e2a85603dce2402acc981b1001705fbdcf048722 /pkgs/desktops/gnome/core/evolution-data-server | |
parent | 079a950f524db708d59491b1f84a528925766790 (diff) |
evolution-data-server: add darwin support
Diffstat (limited to 'pkgs/desktops/gnome/core/evolution-data-server')
-rw-r--r-- | pkgs/desktops/gnome/core/evolution-data-server/default.nix | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/pkgs/desktops/gnome/core/evolution-data-server/default.nix b/pkgs/desktops/gnome/core/evolution-data-server/default.nix index 73890d27a002d..9f5721fcd54d8 100644 --- a/pkgs/desktops/gnome/core/evolution-data-server/default.nix +++ b/pkgs/desktops/gnome/core/evolution-data-server/default.nix @@ -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; }; } |