2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, python3
|
2021-09-18 10:52:07 +00:00
|
|
|
, asciidoc
|
|
|
|
, cacert
|
|
|
|
, docbook_xsl
|
|
|
|
, installShellFiles
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
2023-08-22 20:05:09 +00:00
|
|
|
, testers
|
|
|
|
, offlineimap
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "offlineimap";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "8.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OfflineIMAP";
|
2021-12-06 16:07:01 +00:00
|
|
|
repo = "offlineimap3";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "0y3giaz9i8vvczlxkbwymfkn3vi9fv599dy4pc2pn2afxsl4mg2w";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
asciidoc
|
|
|
|
docbook_xsl
|
|
|
|
installShellFiles
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
certifi
|
|
|
|
distro
|
|
|
|
imaplib2
|
2021-09-18 10:52:07 +00:00
|
|
|
pysocks
|
2021-12-06 16:07:01 +00:00
|
|
|
rfc6555
|
|
|
|
urllib3
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
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")
|
2021-12-06 16:07:01 +00:00
|
|
|
sed -i offlineimap/utils/distro_utils.py -e '/def get_os_sslcertfile():/a\ \ \ \ return "${cacert}/etc/ssl/certs/ca-bundle.crt"'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"offlineimap"
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = offlineimap; };
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
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 ];
|
2023-08-22 20:05:09 +00:00
|
|
|
mainProgram = "offlineimap";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|