1{ lib
2, fetchFromGitHub
3, makeWrapper
4, perl
5, perlPackages
6, stdenv
7}:
8
9stdenv.mkDerivation rec {
10 pname = "imapsync";
11 version = "2.229";
12
13 src = fetchFromGitHub {
14 owner = "imapsync";
15 repo = "imapsync";
16 rev = "imapsync-${version}";
17 sha256 = "sha256-nlNePOV3Y0atEPSRByRo3dHj/WjIaefEDeWdMKTo4gc=";
18 };
19
20 postPatch = ''
21 sed -i -e s@/usr@$out@ Makefile
22 substituteInPlace INSTALL.d/prerequisites_imapsync --replace "PAR::Packer" ""
23 '';
24
25 postInstall = ''
26 wrapProgram $out/bin/imapsync --set PERL5LIB $PERL5LIB
27 '';
28
29 nativeBuildInputs = [ makeWrapper ];
30
31 buildInputs = with perlPackages; [
32 Appcpanminus
33 CGI
34 CryptOpenSSLRSA
35 DataUniqid
36 DistCheckConflicts
37 EncodeIMAPUTF7
38 FileCopyRecursive
39 FileTail
40 IOSocketINET6
41 IOTee
42 JSONWebToken
43 LWP
44 MailIMAPClient
45 ModuleImplementation
46 ModuleScanDeps
47 NTLM
48 PackageStash
49 PackageStashXS
50 ProcProcessTable
51 Readonly
52 RegexpCommon
53 SysMemInfo
54 TermReadKey
55 TestDeep
56 TestFatal
57 TestMockGuard
58 TestMockObject
59 TestPod
60 TestRequires
61 UnicodeString
62 perl
63 ];
64
65 meta = with lib; {
66 description = "Mail folder synchronizer between IMAP servers";
67 homepage = "https://imapsync.lamiral.info/";
68 license = licenses.nlpl;
69 maintainers = with maintainers; [ pSub ];
70 platforms = platforms.unix;
71 };
72}