1{stdenv, makeWrapper, fetchurl, perl, openssl, perlPackages }:
2
3stdenv.mkDerivation rec {
4 name = "imapsync-1.684";
5 src = fetchurl {
6 url = "https://fedorahosted.org/released/imapsync/${name}.tgz";
7 sha256 = "1ilqdaabh6xiwpjfdg2mrhygvjlxj6jdkmqjqadq5z29172hji5b";
8 };
9
10 patchPhase = ''
11 sed -i -e s@/usr@$out@ Makefile
12 '';
13
14 postInstall = ''
15 wrapProgram $out/bin/imapsync --set PERL5LIB $PERL5LIB
16 '';
17
18 nativeBuildInputs = [ makeWrapper ];
19
20 buildInputs = with perlPackages; [ perl openssl MailIMAPClient TermReadKey
21 IOSocketSSL DigestHMAC URI FileCopyRecursive IOTee UnicodeString
22 DataUniqid JSONWebToken TestMockGuard LWP CryptOpenSSLRSA
23 LWPProtocolHttps
24 ];
25
26 meta = with stdenv.lib; {
27 homepage = http://www.linux-france.org/prj/imapsync/;
28 description = "Mail folder synchronizer between IMAP servers";
29 license = licenses.gpl2Plus;
30 platforms = platforms.linux;
31 maintainers = with maintainers; [ pSub ];
32 };
33}