{ fetchurl, stdenv, openssl, pkgconfig, db, zlib, cyrus_sasl, perl }:

stdenv.mkDerivation rec {
  name = "isync-1.3.1";

  src = fetchurl {
    url = "mirror://sourceforge/isync/${name}.tar.gz";
    sha256 = "1sphd30jplii58y2zmw365bckm6pszmapcy905zhjll1sm1ldjv8";
  };

  nativeBuildInputs = [ pkgconfig perl ];
  buildInputs = [ openssl db cyrus_sasl zlib ];

  meta = with stdenv.lib; {
    homepage = "http://isync.sourceforge.net/";
    description = "Free IMAP and MailDir mailbox synchronizer";
    license = licenses.gpl2Plus;
    platforms = platforms.unix;
  };
}

{ stdenv, fetchurl, pkg-config, perl
, openssl, db, zlib, cyrus_sasl
}:

stdenv.mkDerivation rec {
  pname = "isync";
  version = "1.3.1";

  src = fetchurl {
    url = "mirror://sourceforge/isync/${pname}-${version}.tar.gz";
    sha256 = "1sphd30jplii58y2zmw365bckm6pszmapcy905zhjll1sm1ldjv8";
  };

  nativeBuildInputs = [ pkg-config perl ];
  buildInputs = [ openssl db cyrus_sasl zlib ];

  meta = with stdenv.lib; {
    homepage = "http://isync.sourceforge.net/";
    # https://sourceforge.net/projects/isync/
    changelog = "https://sourceforge.net/p/isync/isync/ci/v${version}/tree/NEWS";
    description = "Free IMAP and MailDir mailbox synchronizer";
    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.
    '';
    license = licenses.gpl2Plus;
    platforms = platforms.unix;
    maintainers = with maintainers; [ primeos ];
  };
}

Add myself (@primeos) as maintainer
isync: Add myself (@primeos) as maintainer

Since 887295fd2d8 we need a new maintainer and I depend on this
software. The rest of the changes is just a refactoring (apart from
meta attributes).
