about summary refs log tree commit diff
path: root/pkgs/applications/networking/mailreaders/lumail
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-02-17 09:11:03 +0000
committerRobin Gloster <mail@glob.in>2017-02-17 12:14:20 +0100
commit47ded42788caf8c8ec939de387341b9c113943e6 (patch)
tree6162edf32b41733a5c259ecbf86a104c66fa0e1e /pkgs/applications/networking/mailreaders/lumail
parentcc4fd4f7156860fc7056fc86f271870394c1f59c (diff)
lumail: init at 2.9
Diffstat (limited to 'pkgs/applications/networking/mailreaders/lumail')
-rw-r--r--pkgs/applications/networking/mailreaders/lumail/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/networking/mailreaders/lumail/default.nix b/pkgs/applications/networking/mailreaders/lumail/default.nix
new file mode 100644
index 0000000000000..d28144f92ba8e
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/lumail/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchurl, pkgconfig, lua5_2, file, ncurses, gmime, pcre-cpp
+, perl, perlPackages }:
+
+let
+  version = "2.9";
+in
+stdenv.mkDerivation {
+  name = "lumail-${version}";
+
+  src = fetchurl {
+    url = "https://lumail.org/download/lumail-${version}.tar.gz";
+    sha256 = "1rni5lbic36v4cd1r0l28542x0hlmfqkl6nac79gln491in2l2sc";
+  };
+
+  buildInputs = [
+    pkgconfig lua5_2 file ncurses gmime pcre-cpp
+    perl perlPackages.JSON perlPackages.NetIMAPClient
+  ];
+
+  preConfigure = ''
+    sed -e 's|"/etc/lumail2|LUMAIL_LUAPATH"/..|' -i src/lumail2.cc src/imap_proxy.cc
+
+    perlFlags=
+    for i in $(IFS=:; echo $PERL5LIB); do
+        perlFlags="$perlFlags -I$i"
+    done
+
+    sed -e "s|^#\!\(.*/perl.*\)$|#\!\1$perlFlags|" -i perl.d/imap-proxy
+  '';
+
+  makeFlags = [
+    "LVER=lua"
+    "PREFIX=$(out)"
+    "SYSCONFDIR=$(out)/etc"
+  ];
+
+  postInstall = ''
+    cp lumail2.user.lua $out/etc/lumail2/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Console-based email client";
+    homepage = https://lumail.org/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [orivej];
+  };
+}