summaryrefslogtreecommitdiff
path: root/.config/guix/modules/packages/offlineimap-patched.scm
blob: df00bfd945eea53737b77bba63d3c0e269ba5732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(define-module (packages offlineimap-patched)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages documentation)
  #:use-module (gnu packages mail)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix build-system python)
  #:use-module (guix git-download)
  #:export (offlineimap3-patched))

;;; Commentary:
;;; provides a fixed offlineimap package
;;; https://issues.guix.gnu.org/77952
;;; Code:

(define python-urllib3-1.25
  (package
    (inherit python-urllib3)
    (version "1.25.19")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "urllib3" version))
       (sha256
        (base32
         "09rmjqm5syhhc8fx3v06h3yv6cqy0b1081jg8wm5grpwpr72j61h"))))
    (native-inputs
     (list python-setuptools
           python-wheel))))

(define offlineimap3-patched
  (let ((commit "db347452273bb0f1b1a8ea952f6fb46cf95fedbf")
        (revision "0"))
    (package
      (name "offlineimap3")
      (version (git-version "8.0.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/OfflineIMAP/offlineimap3")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0af6qxnjihpk29ns5i8545yj5spa0a0w85vrikaja768xc56wkrg"))))
      (build-system python-build-system)
      (native-inputs
       (list asciidoc python-wheel))
      (inputs
       (list python-distro python-imaplib2 python-rfc6555 python-urllib3-1.25))
      (arguments
       `(;; Tests require a modifiable IMAP account.
         #:tests? #f
                  #:phases
                  (modify-phases %standard-phases
                    (add-after 'build 'build-documentation
                      (lambda _
                        (substitute* "docs/Makefile"
                          ;; Prevent xmllint and xsltproc from downloading a DTD file.
                          (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
                        (invoke "make" "-C" "docs" "man")))
                    (add-after 'install 'install-documentation
                      (lambda* (#:key outputs #:allow-other-keys)
                        (let* ((out (assoc-ref outputs "out"))
                               (man (string-append out "/share/man")))
                          (install-file "docs/offlineimap.1" (string-append man "/man1"))
                          (install-file "docs/offlineimapui.7" (string-append man "/man7"))))))))
      (home-page "https://www.offlineimap.org")
      (synopsis "Sync emails between two repositories")
      (description
       "OfflineImap synchronizes emails between two repositories, so that you
can read the same mailbox from multiple computers.  It supports IMAP as REMOTE
repository and Maildir/IMAP as LOCAL repository.")
      (license license:gpl2+))))