2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python2Packages
|
|
|
|
, asciidoc
|
|
|
|
, cacert
|
|
|
|
, docbook_xsl
|
|
|
|
, installShellFiles
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python2Packages.buildPythonApplication rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "7.3.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "offlineimap";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OfflineIMAP";
|
|
|
|
repo = "offlineimap";
|
|
|
|
rev = "v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-sra2H0+5+LAIU3+uJnii+AYA05nuDyKVMW97rbaFOfI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
asciidoc
|
|
|
|
docbook_xsl
|
|
|
|
installShellFiles
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python2Packages; [
|
|
|
|
six
|
|
|
|
kerberos
|
|
|
|
rfc6555
|
|
|
|
pysocks
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Skip xmllint to stop failures due to no network access
|
|
|
|
sed -i docs/Makefile -e "s|a2x -v -d |a2x -L -v -d |"
|
|
|
|
|
|
|
|
# Provide CA certificates (Used when "sslcacertfile = OS-DEFAULT" is configured")
|
|
|
|
sed -i offlineimap/utils/distro.py -e '/def get_os_sslcertfile():/a\ \ \ \ return "${cacert}/etc/ssl/certs/ca-bundle.crt"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
make -C docs man
|
2021-09-18 10:52:07 +00:00
|
|
|
installManPage docs/offlineimap.1
|
|
|
|
installManPage docs/offlineimapui.7
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# Test requires credentials
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Synchronize emails between two repositories, so that you can read the same mailbox from multiple computers";
|
|
|
|
homepage = "http://offlineimap.org";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ endocrimes ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|