2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, perl
|
2021-02-05 17:12:51 +00:00
|
|
|
, openssl, db, cyrus_sasl, zlib
|
|
|
|
, Security
|
2023-07-15 17:15:38 +00:00
|
|
|
# Disabled by default as XOAUTH2 is an "OBSOLETE" SASL mechanism and this relies
|
|
|
|
# on a package that isn't really maintained anymore:
|
|
|
|
, withCyrusSaslXoauth2 ? false, cyrus-sasl-xoauth2, makeWrapper
|
2020-05-15 21:57:56 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-15 21:57:56 +00:00
|
|
|
pname = "isync";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.4.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-05-15 21:57:56 +00:00
|
|
|
url = "mirror://sourceforge/isync/${pname}-${version}.tar.gz";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "1zq0wwvmqsl9y71546dr0aygzn9gjjfiw19hlcq87s929y4p6ckw";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
patches = [
|
|
|
|
# Fixes "Fatal: buffer too small" error
|
|
|
|
./0001-Increase-imap_vprintf-buffer-size.patch
|
2022-12-02 08:20:57 +00:00
|
|
|
# Fix #202595: SSL error "Socket error: ... unexpected eof while reading"
|
|
|
|
# Source: https://sourceforge.net/p/isync/isync/ci/b6c36624f04cd388873785c0631df3f2f9ac4bf0/
|
|
|
|
./work-around-unexpected-EOF-error-messages-at-end-of-SSL-connections.patch
|
2022-11-21 17:40:18 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ pkg-config perl ]
|
|
|
|
++ lib.optionals withCyrusSaslXoauth2 [ makeWrapper ];
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = [ openssl db cyrus_sasl zlib ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Security ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postInstall = lib.optionalString withCyrusSaslXoauth2 ''
|
|
|
|
wrapProgram "$out/bin/mbsync" \
|
|
|
|
--prefix SASL_PATH : "${lib.makeSearchPath "lib/sasl2" [ cyrus-sasl-xoauth2 ]}"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://isync.sourceforge.net/";
|
2020-05-15 21:57:56 +00:00
|
|
|
# https://sourceforge.net/projects/isync/
|
|
|
|
changelog = "https://sourceforge.net/p/isync/isync/ci/v${version}/tree/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Free IMAP and MailDir mailbox synchronizer";
|
2020-05-15 21:57:56 +00:00
|
|
|
longDescription = ''
|
|
|
|
mbsync (formerly isync) is a command line application which synchronizes
|
|
|
|
mailboxes. Currently Maildir and IMAP4 mailboxes are supported. New
|
|
|
|
messages, message deletions and flag changes can be propagated both ways.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2020-06-18 07:06:33 +00:00
|
|
|
maintainers = with maintainers; [ primeos lheckemann ];
|
2022-06-16 17:23:12 +00:00
|
|
|
mainProgram = "mbsync";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|