Hi Guix,

The offlineimap3 package is broken in the current version of Guix due
to a longstanding bug in offlineimap3 that makes it incompatible with
Python 3.11 (which is now the default python version in Guix).

For reference, my current Guix version is:

  guix 9fbe196
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 9fbe19661f32270d9e94cbc54905e9d3aafa441b

And `offlineimap -V` reports this information:

  offlineimap v8.0.0, imaplib2 v3.06, Python v3.11.11, OpenSSL 3.0.8 7 Feb 2023

It appears that a patch was submitted to the offlineimap3 repository
on Nov 17, 2022 and was merged into the master branch on Dec 5, 2022.
Unfortunately, the offlineimap3 team hasn't cut a new release since
version 8.0.0 (released Oct 18, 2021). Here's the PR for reference:

  https://github.com/OfflineIMAP/offlineimap3/pull/139

Because I rely on offlineimap3 for reading my email each day, I needed
this fixed ASAP, so I created a new offlineimap3-latest package that
builds the current commit on the master branch.

Here it is for anyone who could also benefit from it:

;;======================= begin code =======================

(define-module (lambdatronic offlineimap)
  #:use-module ((gnu packages documentation)  #:select (asciidoc))
  #:use-module ((gnu packages mail)           #:select (offlineimap3 
python-imaplib2))
  #:use-module ((gnu packages python-build)   #:select (python-setuptools 
python-wheel python-hatch-vcs python-hatchling))
  #:use-module ((gnu packages python-xyz)     #:select (python-distro 
python-rfc6555))
  #:use-module ((guix build-system pyproject) #:select (pyproject-build-system))
  #:use-module ((guix build-system python)    #:select (pypi-uri))
  #:use-module ((guix download)               #:select (url-fetch))
  #:use-module ((guix git-download)           #:select (git-fetch git-reference 
git-file-name))
  #:use-module ((guix packages)               #:select (package origin base32)))

(define-public python-urllib3
  (package
   (name "python-urllib3")
   (version "1.25.9")
   (source
    (origin
     (method url-fetch)
     (uri (pypi-uri "urllib3" version))
     (sha256
      (base32 "09rmjqm5syhhc8fx3v06h3yv6cqy0b1081jg8wm5grpwpr72j61h"))))
   (build-system pyproject-build-system)
   (arguments `(#:tests? #f))
   (native-inputs (list python-setuptools python-wheel python-hatch-vcs 
python-hatchling))
   (home-page #f)
   (synopsis
    "HTTP library with thread-safe connection pooling, file post, and more.")
   (description
    "HTTP library with thread-safe connection pooling, file post, and more.")
   (license #f)))

(define-public offlineimap3-latest
  (package
   (inherit offlineimap3)
   (name "offlineimap3-latest")
   (version "db347452273bb0f1b1a8ea952f6fb46cf95fedbf") ; latest as of 2024.8.26
   (source (origin
            (method git-fetch)
            (uri (git-reference
                  (url "https://github.com/OfflineIMAP/offlineimap3";)
                  (commit version)))
            (file-name (git-file-name name version))
            (sha256
             (base32
              "0af6qxnjihpk29ns5i8545yj5spa0a0w85vrikaja768xc56wkrg"))))
   (native-inputs
    (list asciidoc python-setuptools python-wheel))
   (inputs
    (list python-distro python-imaplib2 python-rfc6555 python-urllib3))))

;;======================= end code =======================

Happy hacking!
  Gary

-- 
GPG Key ID: C4FBEDBD
Use `gpg --search-keys trac...@disroot.org' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Reply via email to