about summary refs log tree commit diff
path: root/pkgs/applications/networking/mailreaders/aerc
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2019-06-04 07:07:56 +0100
committerTadeo Kondrak <me@tadeo.ca>2019-06-07 09:11:32 -0600
commit6abbf8e15f797313a33de7906dbc6f2d62bfcda1 (patch)
tree38594f27654e3330caffda2d037a83cde39afb41 /pkgs/applications/networking/mailreaders/aerc
parent95fbb1207d016285f821103084a9caa5d8f5e763 (diff)
aerc: init at 0.1.0
Co-authored-by: Tadeo Kondrak <me@tadeo.ca>
Diffstat (limited to 'pkgs/applications/networking/mailreaders/aerc')
-rw-r--r--pkgs/applications/networking/mailreaders/aerc/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/applications/networking/mailreaders/aerc/default.nix b/pkgs/applications/networking/mailreaders/aerc/default.nix
new file mode 100644
index 0000000000000..e4585f345ea21
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/aerc/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, buildGoModule, fetchurl
+, go, scdoc
+, python3, perl, w3m, dante
+}:
+
+buildGoModule rec {
+  pname = "aerc";
+  version = "0.1.0";
+
+  src = fetchurl {
+    url = "https://git.sr.ht/~sircmpwn/aerc/archive/${version}.tar.gz";
+    sha256 = "0wx9l097s51ih4khk231f9fs3vw55an8l2jx3q13v7y20522wgnk";
+  };
+
+  nativeBuildInputs = [
+    go
+    scdoc
+    python3.pkgs.wrapPython
+  ];
+
+  pythonPath = [
+    python3.pkgs.colorama
+  ];
+
+  buildInputs = [ python3 perl ];
+
+  buildPhase = "
+    runHook preBuild
+    # we use make instead of go build
+    runHook postBuild
+  ";
+
+  installPhase = ''
+    runHook preInstall
+    make PREFIX=$out install
+    wrapPythonProgramsIn $out/share/aerc/filters "$out $pythonPath"
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/aerc --prefix PATH ":" "$out/share/aerc/filters"
+    wrapProgram $out/share/aerc/filters/html --prefix PATH ":" \
+      ${stdenv.lib.makeBinPath [ w3m dante ]}
+  '';
+
+  modSha256 = "1h0vr01s2y0k3jjigz0h8ngjv1mhk6kw8mdisp5pr017jbhijfsi";
+
+  meta = with stdenv.lib; {
+    description = "aerc is an email client for your terminal";
+    homepage = https://aerc-mail.org/;
+    maintainers = with maintainers; [ tadeokondrak ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}