15 python3.pkgs.buildPythonApplication rec {
16 pname = "offlineimap";
20 src = fetchFromGitHub {
21 owner = "OfflineIMAP";
22 repo = "offlineimap3";
24 hash = "sha256-XLxKqO5OCXsFu8S3lMp2Ke5hp6uer9npZ3ujmL6Kb3g=";
29 name = "sqlite-version-aware-threadsafety-check.patch";
30 url = "https://github.com/OfflineIMAP/offlineimap3/pull/139/commits/7cd32cf834b34a3d4675b29bebcd32dc1e5ef128.patch";
31 hash = "sha256-xNq4jFHMf9XZaa9BFF1lOzZrEGa5BEU8Dr+gMOBkJE4=";
34 # https://github.com/OfflineIMAP/offlineimap3/pull/120
35 name = "python312-comaptibility.patch";
36 url = "https://github.com/OfflineIMAP/offlineimap3/commit/a1951559299b297492b8454850fcfe6eb9822a38.patch";
37 hash = "sha256-CBGMHi+ZzOBJt3TxBf6elrTRMIQ+8wr3JgptL2etkoA=";
40 # https://github.com/OfflineIMAP/offlineimap3/pull/161
41 name = "python312-compatibility.patch";
42 url = "https://github.com/OfflineIMAP/offlineimap3/commit/3dd8ebc931e3f3716a90072bd34e50ac1df629fa.patch";
43 hash = "sha256-2IJ0yzESt+zk+r+Z+9js3oKhFF0+xok0xK8Jd3G/gYY=";
48 # Skip xmllint to stop failures due to no network access
49 sed -i docs/Makefile -e "s|a2x -v -d |a2x -L -v -d |"
51 # Provide CA certificates (Used when "sslcacertfile = OS-DEFAULT" is configured")
52 sed -i offlineimap/utils/distro_utils.py -e '/def get_os_sslcertfile():/a\ \ \ \ return "${cacert}/etc/ssl/certs/ca-bundle.crt"'
55 build-system = [ python3.pkgs.setuptools ];
65 dependencies = with python3.pkgs; [
76 installManPage docs/offlineimap.1
77 installManPage docs/offlineimapui.7
80 # Test requires credentials
83 pythonImportsCheck = [
87 passthru.tests.version = testers.testVersion { package = offlineimap; };
90 description = "Synchronize emails between two repositories, so that you can read the same mailbox from multiple computers";
91 homepage = "http://offlineimap.org";
92 license = licenses.gpl2Plus;
94 mainProgram = "offlineimap";