aboutsummaryrefslogtreecommitdiff
path: root/overlays
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-06-07 19:12:08 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-06-07 19:13:10 +0200
commit6080a8e3c2af13907c444cd2f17fcfdf14c5475d (patch)
tree004f7f071956c04fdabc0f80b5d1268997c94798 /overlays
parentb26e1b456922d585fb8039635a7ce0cb206009c2 (diff)
downloadNix-6080a8e3c2af13907c444cd2f17fcfdf14c5475d.tar.gz
Nix-6080a8e3c2af13907c444cd2f17fcfdf14c5475d.tar.zst
Nix-6080a8e3c2af13907c444cd2f17fcfdf14c5475d.zip
Add patched neomutt overlay
Diffstat (limited to 'overlays')
-rw-r--r--overlays/default.nix1
-rw-r--r--overlays/neomutt/default.nix7
-rw-r--r--overlays/neomutt/tx.patch44
3 files changed, 52 insertions, 0 deletions
diff --git a/overlays/default.nix b/overlays/default.nix
index a87ace1..e63daa0 100644
--- a/overlays/default.nix
+++ b/overlays/default.nix
@@ -14,6 +14,7 @@
14 ldapvi = import ./ldapvi; 14 ldapvi = import ./ldapvi;
15 lesspipe = import ./lesspipe; 15 lesspipe = import ./lesspipe;
16 mysql = import ./databases/mysql; 16 mysql = import ./databases/mysql;
17 neomutt = import ./neomutt;
17 nixops = import ./nixops; 18 nixops = import ./nixops;
18 pass = import ./pass; 19 pass = import ./pass;
19 pelican = import ./pelican; 20 pelican = import ./pelican;
diff --git a/overlays/neomutt/default.nix b/overlays/neomutt/default.nix
new file mode 100644
index 0000000..f03290a
--- /dev/null
+++ b/overlays/neomutt/default.nix
@@ -0,0 +1,7 @@
1self: super: {
2 neomutt = super.neomutt.overrideAttrs(old: {
3 patches = old.patches or [] ++ [
4 ./tx.patch
5 ];
6 });
7}
diff --git a/overlays/neomutt/tx.patch b/overlays/neomutt/tx.patch
new file mode 100644
index 0000000..c8736df
--- /dev/null
+++ b/overlays/neomutt/tx.patch
@@ -0,0 +1,44 @@
1commit 61ae454e1579d02736c48e3468a3237429214cdf
2Author: Ismaël Bouya <ismael.bouya@normalesup.org>
3Date: Tue Jun 2 13:03:04 2020 +0200
4
5 Add %tx to index_format
6
7diff --git a/hdrline.c b/hdrline.c
8index 9224c6641..1594ed729 100644
9--- a/hdrline.c
10+++ b/hdrline.c
11@@ -575,6 +575,7 @@ static const char *index_format_str(char *buf, size_t buflen, size_t col, int co
12 const struct Address *from = TAILQ_FIRST(&e->env->from);
13 const struct Address *to = TAILQ_FIRST(&e->env->to);
14 const struct Address *cc = TAILQ_FIRST(&e->env->cc);
15+ const struct Address *x_orig_to = TAILQ_FIRST(&e->env->x_original_to);
16
17 buf[0] = '\0';
18 switch (op)
19@@ -1192,13 +1193,18 @@ static const char *index_format_str(char *buf, size_t buflen, size_t col, int co
20
21 case 't':
22 tmp[0] = '\0';
23- if (!check_for_mailing_list(&e->env->to, "To ", tmp, sizeof(tmp)) &&
24- !check_for_mailing_list(&e->env->cc, "Cc ", tmp, sizeof(tmp)))
25- {
26- if (to)
27- snprintf(tmp, sizeof(tmp), "To %s", mutt_get_name(to));
28- else if (cc)
29- snprintf(tmp, sizeof(tmp), "Cc %s", mutt_get_name(cc));
30+ if (src[0] == 'x') {
31+ snprintf(tmp, sizeof(tmp), "%s", mutt_get_name(x_orig_to));
32+ src++;
33+ } else {
34+ if (!check_for_mailing_list(&e->env->to, "To ", tmp, sizeof(tmp)) &&
35+ !check_for_mailing_list(&e->env->cc, "Cc ", tmp, sizeof(tmp)))
36+ {
37+ if (to)
38+ snprintf(tmp, sizeof(tmp), "To %s", mutt_get_name(to));
39+ else if (cc)
40+ snprintf(tmp, sizeof(tmp), "Cc %s", mutt_get_name(cc));
41+ }
42 }
43 mutt_format_s(buf, buflen, prec, tmp);
44 break;