aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/pkgs/dovecot/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'flakes/mypackages/pkgs/dovecot/plugins')
-rw-r--r--flakes/mypackages/pkgs/dovecot/plugins/deleted_to_trash/default.nix30
-rw-r--r--flakes/mypackages/pkgs/dovecot/plugins/deleted_to_trash/fix_mbox.patch12
2 files changed, 42 insertions, 0 deletions
diff --git a/flakes/mypackages/pkgs/dovecot/plugins/deleted_to_trash/default.nix b/flakes/mypackages/pkgs/dovecot/plugins/deleted_to_trash/default.nix
new file mode 100644
index 0000000..f270032
--- /dev/null
+++ b/flakes/mypackages/pkgs/dovecot/plugins/deleted_to_trash/default.nix
@@ -0,0 +1,30 @@
1{ stdenv, fetchurl, dovecot, fetchFromGitHub, fetchpatch }:
2
3stdenv.mkDerivation ({
4 pname = "dovecot-deleted_to_trash";
5 version = "81b0754-master";
6 src = fetchFromGitHub {
7 owner = "lexbrugman";
8 repo = "dovecot_deleted_to_trash";
9 rev = "81b07549accfc36467bf8527a53c295c7a02dbb9";
10 sha256 = "1b3k31g898s4fa0a9l4kvjsdyds772waaay84sjdxv09jw6mqs0f";
11 fetchSubmodules = true;
12 };
13 buildInputs = [ dovecot ];
14 patches = [
15 (fetchpatch {
16 name = "fix-dovecot-2.3.diff";
17 url = "https://github.com/lexbrugman/dovecot_deleted_to_trash/commit/c52a3799a96104a603ade33404ef6aa1db647b2f.diff";
18 sha256 = "0pld3rdcjp9df2qxbp807k6v4f48lyk0xy5q508ypa57d559y6dq";
19 })
20 ./fix_mbox.patch
21 ];
22 preConfigure = ''
23 substituteInPlace Makefile --replace \
24 "/usr/include/dovecot" \
25 "${dovecot}/include/dovecot"
26 substituteInPlace Makefile --replace \
27 "/usr/lib/dovecot/modules" \
28 "$out/lib/dovecot"
29 '';
30})
diff --git a/flakes/mypackages/pkgs/dovecot/plugins/deleted_to_trash/fix_mbox.patch b/flakes/mypackages/pkgs/dovecot/plugins/deleted_to_trash/fix_mbox.patch
new file mode 100644
index 0000000..0060fb4
--- /dev/null
+++ b/flakes/mypackages/pkgs/dovecot/plugins/deleted_to_trash/fix_mbox.patch
@@ -0,0 +1,12 @@
1diff --git a/src/deleted-to-trash-plugin.c b/src/deleted-to-trash-plugin.c
2index bb4cc78..66bad53 100644
3--- a/src/deleted-to-trash-plugin.c
4+++ b/src/deleted-to-trash-plugin.c
5@@ -82,6 +82,7 @@ static struct mailbox *mailbox_open_or_create(struct mailbox_list *list, const c
6 *error_r = mail_storage_get_last_error(mailbox_get_storage(box), &error);
7 if (error != MAIL_ERROR_NOTFOUND)
8 {
9+ i_error("%s", *error_r);
10 mailbox_free(&box);
11 return NULL;
12 }