git.iko.soy/typeable/nixpkgs
on master help sign in
aerc: 0.2.1 -> 0.3.0

- bump version - build with notmuch support - substitute @SHAREDIR@ in aerc.conf for the `template-dirs` key - place ncurses instead of ncurses.dev in PATH (cannot find infocmp otherwise)

commitcb8aa201e26551b2d6d9c2d11b4f9bbf593ac129 authorDavid Terry <me@xwvvvvwx.com> dateMon 25 Nov 2019, 10:43 (7 years ago) parent053f6ff
2 files changed+29−13
pkgs/applications/networking/mailreaders/aerc/default.nix+8−5 pkgs/applications/networking/mailreaders/aerc/runtime-sharedir.patch+21−8
pkgs/applications/networking/mailreaders/aerc/default.nix+8−5
@@ -1,21 +1,22 @@
11{ stdenv, buildGoModule, fetchurl
2−, go, ncurses, scdoc
2+, go, ncurses, notmuch, scdoc
33, python3, perl, w3m, dante
44}:
55
66buildGoModule rec {
77 pname = "aerc";
8− version = "0.2.1";
8+ version = "0.3.0";
99
1010 src = fetchurl {
1111 url = "https://git.sr.ht/~sircmpwn/aerc/archive/${version}.tar.gz";
12− sha256 = "1ky1nl5b54lf5jnac2kb5404fplwnwypjplas8imdlsf517fw32n";
12+ sha256 = "188jln8hmgiqn5il5m54bns0wk4grj09di8y6mmid58ibw6spma4";
1313 };
1414
1515 nativeBuildInputs = [
1616 go
1717 scdoc
1818 python3.pkgs.wrapPython
19+ notmuch
1920 ];
2021
2122 patches = [
@@ -28,6 +29,8 @@ buildGoModule rec {
2829
2930 buildInputs = [ python3 perl ];
3031
32+ GOFLAGS="-tags=notmuch";
33+
3134 buildPhase = "
3235 runHook preBuild
3336 # we use make instead of go build
@@ -43,12 +46,12 @@ buildGoModule rec {
4346
4447 postFixup = ''
4548 wrapProgram $out/bin/aerc --prefix PATH ":" \
46− "$out/share/aerc/filters:${stdenv.lib.makeBinPath [ ncurses.dev ]}"
49+ "$out/share/aerc/filters:${stdenv.lib.makeBinPath [ ncurses ]}"
4750 wrapProgram $out/share/aerc/filters/html --prefix PATH ":" \
4851 ${stdenv.lib.makeBinPath [ w3m dante ]}
4952 '';
5053
51− modSha256 = "0fc9m1qb8innypc8cxzbqyrfkawawyaqq3gqy7lqwmyh32f300jh";
54+ modSha256 = "0pxbv4zfhii0g41cy0ycfpkkxw6nnd4ibavic6zqw30j476jnm2x";
5255
5356 meta = with stdenv.lib; {
5457 description = "aerc is an email client for your terminal";
pkgs/applications/networking/mailreaders/aerc/runtime-sharedir.patch+21−8
@@ -1,18 +1,19 @@
1−From 7ea68a2eef026723903d72f54ca54b629881ec06 Mon Sep 17 00:00:00 2001
1+From 6cf3c2e42d219b9665a43ca65f321c653b0aa102 Mon Sep 17 00:00:00 2001
22From: Tadeo Kondrak <me@tadeo.ca>
33Date: Mon, 28 Oct 2019 08:36:36 -0600
44Subject: [PATCH] Fix aerc breaking every time the package is rebuilt.
55
66On NixOS, the SHAREDIR changes on every rebuild to the package, but aerc
7−fills it in as part of the default config. Fix this by not substituting
8−@SHAREDIR@ in the default config until runtime.
7+fills it in as part of the default config and then installs that config
8+to the users home folder. Fix this by not substituting @SHAREDIR@ in the
9+default config until runtime.
910---
1011 Makefile | 2 +-
11− config/config.go | 3 +++
12− 2 files changed, 4 insertions(+), 1 deletion(-)
12+ config/config.go | 8 ++++++++
13+ 2 files changed, 9 insertions(+), 1 deletion(-)
1314
1415diff --git a/Makefile b/Makefile
15−index d3072d3..17ca0be 100644
16+index d1c755d..1185a96 100644
1617--- a/Makefile
1718+++ b/Makefile
1819@@ -24,7 +24,7 @@ aerc: $(GOSRC)
@@ -25,10 +26,22 @@ index d3072d3..17ca0be 100644
2526 DOCS := \
2627 aerc.1 \
2728diff --git a/config/config.go b/config/config.go
28−index bfcbecf..2f4e703 100644
29+index 32d07fc..8ffd3e8 100644
2930--- a/config/config.go
3031+++ b/config/config.go
31−@@ -377,6 +377,9 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) {
32+@@ -355,6 +355,11 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) {
33+ return nil, err
34+ }
35+ }
36++ if sec, err := file.GetSection("templates"); err == nil {
37++ if key, err := sec.GetKey("template-dirs"); err == nil {
38++ sec.NewKey("template-dirs", strings.ReplaceAll(key.String(), "@SHAREDIR@", sharedir))
39++ }
40++ }
41+ file.NameMapper = mapName
42+ config := &AercConfig{
43+ Bindings: BindingConfig{
44+@@ -423,6 +428,9 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) {
3245 if err = config.LoadConfig(file); err != nil {
3346 return nil, err
3447 }