From 05a31160913d2ae91b7e71d5ced12416d2049d24 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Tue, 16 Nov 2021 18:31:01 +0100 Subject: [PATCH] offlineimap: Fix for OfflineIMAP 8 (#2479) Nixpkgs switched to OfflineIMAP version 8 which means that Python 3 is now used instead of Python 2. As a result, get_pass() now returns a byte array instead of a string and the argument to get_pass() must be a byte array too. See https://github.com/OfflineIMAP/offlineimap3/issues/103. --- modules/programs/offlineimap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/offlineimap.nix b/modules/programs/offlineimap.nix index 842daa3d..83a31dd2 100644 --- a/modules/programs/offlineimap.nix +++ b/modules/programs/offlineimap.nix @@ -65,7 +65,7 @@ let remotePassEval = let arglist = concatMapStringsSep "," (x: "'${x}'") passwordCommand; in optionalAttrs (passwordCommand != null) { - remotepasseval = ''get_pass("${name}", [${arglist}]).strip("\n")''; + remotepasseval = ''get_pass("${name}", [${arglist}]).strip(b"\n")''; }; in toIni { "Account ${name}" = {