about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/mailreaders/evolution
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/mailreaders/evolution')
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution/default.nix133
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix35
3 files changed, 211 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix
new file mode 100644
index 000000000000..4d4e33c6373c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, gnome, cmake, gettext, intltool, pkg-config, evolution-data-server, evolution
+, sqlite, gtk3, webkitgtk, libgdata, libmspack }:
+
+stdenv.mkDerivation rec {
+  pname = "evolution-ews";
+  version = "3.42.4";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "gpIW4GBXT0GCtV7Q8EfdEeK56gCACi+PJ/jbwQkVQbk=";
+  };
+
+  nativeBuildInputs = [ cmake gettext intltool pkg-config ];
+
+  buildInputs = [
+    evolution-data-server evolution
+    sqlite libgdata
+    gtk3 webkitgtk
+    libmspack
+  ];
+
+  cmakeFlags = [
+    # Building with libmspack as recommended: https://wiki.gnome.org/Apps/Evolution/Building#Build_evolution-ews
+    "-DWITH_MSPACK=ON"
+    # don't try to install into ${evolution}
+    "-DFORCE_INSTALL_PREFIX=ON"
+  ];
+
+   passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "evolution-ews";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Evolution connector for Microsoft Exchange Server protocols";
+    homepage = "https://gitlab.gnome.org/GNOME/evolution-ews";
+    license = licenses.lgpl21Plus; # https://gitlab.gnome.org/GNOME/evolution-ews/issues/111
+    maintainers = [ maintainers.dasj19 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution/default.nix
new file mode 100644
index 000000000000..9aac3db3594c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution/default.nix
@@ -0,0 +1,133 @@
+{ lib, stdenv
+, cmake
+, ninja
+, intltool
+, fetchurl
+, libxml2
+, webkitgtk
+, highlight
+, pkg-config
+, gtk3
+, glib
+, libnotify
+, libpst
+, gspell
+, evolution-data-server
+, libgdata
+, libgweather
+, glib-networking
+, gsettings-desktop-schemas
+, wrapGAppsHook
+, itstool
+, shared-mime-info
+, libical
+, db
+, gcr
+, sqlite
+, gnome
+, librsvg
+, gdk-pixbuf
+, libsecret
+, nss
+, nspr
+, icu
+, libcanberra-gtk3
+, bogofilter
+, gst_all_1
+, procps
+, p11-kit
+, openldap
+, spamassassin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "evolution";
+  version = "3.42.4";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/evolution/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "+oprem1GsinbXfIv3nZCVFIjV/4b7NexjlNt/piJCmU=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    intltool
+    itstool
+    libxml2
+    ninja
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gnome.adwaita-icon-theme
+    bogofilter
+    db
+    evolution-data-server
+    gcr
+    gdk-pixbuf
+    glib
+    glib-networking
+    gnome.gnome-desktop
+    gsettings-desktop-schemas
+    gst_all_1.gst-plugins-base
+    gst_all_1.gstreamer
+    gtk3
+    gspell
+    highlight
+    icu
+    libcanberra-gtk3
+    libgdata
+    libgweather
+    libical
+    libnotify
+    libpst
+    librsvg
+    libsecret
+    nspr
+    nss
+    openldap
+    p11-kit
+    procps
+    shared-mime-info
+    sqlite
+    webkitgtk
+  ];
+
+  propagatedUserEnvPkgs = [
+    evolution-data-server
+  ];
+
+  cmakeFlags = [
+    "-DENABLE_AUTOAR=OFF"
+    "-DENABLE_LIBCRYPTUI=OFF"
+    "-DENABLE_YTNEF=OFF"
+    "-DWITH_SPAMASSASSIN=${spamassassin}/bin/spamassassin"
+    "-DWITH_SA_LEARN=${spamassassin}/bin/sa-learn"
+    "-DWITH_BOGOFILTER=${bogofilter}/bin/bogofilter"
+    "-DWITH_OPENLDAP=${openldap}"
+  ];
+
+  requiredSystemFeatures = [
+    "big-parallel"
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "evolution";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  PKG_CONFIG_LIBEDATASERVERUI_1_2_UIMODULEDIR = "${placeholder "out"}/lib/evolution-data-server/ui-modules";
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Apps/Evolution";
+    description = "Personal information management application that provides integrated mail, calendaring and address book functionality";
+    maintainers = teams.gnome.members;
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix b/nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix
new file mode 100644
index 000000000000..7837393926f6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix
@@ -0,0 +1,35 @@
+{ lib, makeWrapper, symlinkJoin, gnome, plugins }:
+
+symlinkJoin {
+  name = "evolution-with-plugins";
+  paths = [ gnome.evolution-data-server ] ++ plugins;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    for i in $out/bin/* $out/libexec/**; do
+    if [ ! -d $i ]; then
+      echo wrapping $i
+      wrapProgram $i --set EDS_EXTRA_PREFIXES "${lib.concatStringsSep ":" plugins}"
+    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
+  '';
+}