nixpkgs/pkgs/tools/networking/offlineimap/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
1.4 KiB
Nix
Raw Normal View History

2021-08-31 15:17:09 +02:00
{ lib
, fetchFromGitHub
2021-11-14 01:46:19 +01:00
, python3
2021-08-31 15:17:09 +02:00
, asciidoc
, cacert
, docbook_xsl
, installShellFiles
, libxml2
, libxslt
}:
2021-11-14 01:46:19 +01:00
python3.pkgs.buildPythonApplication rec {
2018-06-03 03:18:29 +02:00
pname = "offlineimap";
2021-11-14 01:46:19 +01:00
version = "8.0.0";
2016-01-02 17:58:36 +01:00
src = fetchFromGitHub {
owner = "OfflineIMAP";
2021-11-14 01:46:19 +01:00
repo = "offlineimap3";
2016-01-02 17:58:36 +01:00
rev = "v${version}";
2021-11-14 01:46:19 +01:00
sha256 = "0y3giaz9i8vvczlxkbwymfkn3vi9fv599dy4pc2pn2afxsl4mg2w";
};
2021-08-31 15:17:09 +02:00
nativeBuildInputs = [
asciidoc
docbook_xsl
installShellFiles
libxml2
libxslt
];
2021-11-14 01:46:19 +01:00
propagatedBuildInputs = with python3.pkgs; [
certifi
distro
imaplib2
2021-08-31 15:17:09 +02:00
pysocks
2021-11-14 01:46:19 +01:00
rfc6555
urllib3
2021-08-31 15:17:09 +02:00
];
2017-02-14 19:36:02 +01: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-11-14 01:46:19 +01:00
sed -i offlineimap/utils/distro_utils.py -e '/def get_os_sslcertfile():/a\ \ \ \ return "${cacert}/etc/ssl/certs/ca-bundle.crt"'
2017-02-14 19:36:02 +01:00
'';
postInstall = ''
make -C docs man
2021-08-31 15:17:09 +02:00
installManPage docs/offlineimap.1
installManPage docs/offlineimapui.7
2017-02-14 19:36:02 +01:00
'';
2021-08-31 15:17:09 +02:00
# Test requires credentials
doCheck = false;
2021-11-14 01:46:19 +01:00
pythonImportsCheck = [
"offlineimap"
];
2021-08-31 15:17:09 +02:00
meta = with lib; {
description = "Synchronize emails between two repositories, so that you can read the same mailbox from multiple computers";
2020-04-13 02:51:42 +02:00
homepage = "http://offlineimap.org";
2021-08-31 15:17:09 +02:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ endocrimes ];
};
}