git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #30401 from peterhoeg/u/mutt

neomutt: minor cleanups and introduce wrapper for users invoking `mutt`

commit2542944a95a41c31caaeb6b0765afa1e293d40ac authorPeter Hoeg <peter@hoeg.com> dateFri 27 Oct 2017, 15:02 (9 years ago) parent8f17abf2ef36f2
1 file changed+34−11
pkgs/applications/networking/mailreaders/neomutt/default.nix+34−11
pkgs/applications/networking/mailreaders/neomutt/default.nix+34−11
@@ -1,7 +1,19 @@
1−{ stdenv, fetchFromGitHub, which, autoreconfHook, ncurses, perl
1+{ stdenv, fetchFromGitHub, which, autoreconfHook, writeScript, ncurses, perl
22, cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
33
4−stdenv.mkDerivation rec {
4+let
5+ muttWrapper = writeScript "mutt" ''
6+ #!${stdenv.shell} -eu
7+
8+ echo 'The neomutt project has renamed the main binary from `mutt` to `neomutt`.'
9+ echo ""
10+ echo 'This wrapper is provided for compatibility purposes only. You should start calling `neomutt` instead.'
11+ echo ""
12+ read -p 'Press any key to launch NeoMutt...' -n1 -s
13+ exec neomutt "$@"
14+ '';
15+
16+in stdenv.mkDerivation rec {
517 version = "20171013";
618 name = "neomutt-${version}";
719
@@ -12,24 +24,35 @@ stdenv.mkDerivation rec {
1224 sha256 = "0zn8imqfa76bxpkpy111c4vn6vjarbxc8gqv6m18qkksk0ly26l1";
1325 };
1426
15− nativeBuildInputs = [ autoreconfHook docbook_xsl docbook_xml_dtd_42 libxslt.bin which ];
1627 buildInputs = [
1728 cyrus_sasl gss gpgme kerberos libidn ncurses
1829 notmuch openssl perl lmdb
1930 ];
2031
32+ nativeBuildInputs = [ autoreconfHook docbook_xsl docbook_xml_dtd_42 libxslt.bin which ];
33+
34+ enableParallelBuilding = true;
35+
36+ postPatch = ''
37+ for f in doc/*.{xml,xsl}* ; do
38+ substituteInPlace $f \
39+ --replace http://docbook.sourceforge.net/release/xsl/current ${docbook_xsl}/share/xml/docbook-xsl \
40+ --replace http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd ${docbook_xml_dtd_42}/xml/dtd/docbook/docbookx.dtd
41+ done
42+ '';
43+
2144 configureFlags = [
2245 "--enable-debug"
2346 "--enable-gpgme"
2447 "--enable-notmuch"
25− "--with-homespool=mailbox"
26− "--with-gss"
27− "--with-mailpath="
28− "--with-ssl"
29− "--with-sasl"
3048 "--with-curses"
49+ "--with-gss"
50+ "--with-homespool=mailbox"
3151 "--with-idn"
3252 "--with-lmdb"
53+ "--with-mailpath="
54+ "--with-sasl"
55+ "--with-ssl"
3356
3457 # Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
3558 "ac_cv_path_SENDMAIL=sendmail"
@@ -40,9 +63,9 @@ stdenv.mkDerivation rec {
4063 # like pgpring, pgpewrap, ...
4164 NIX_LDFLAGS = "-lidn";
4265
43− configureScript = "./prepare";
44−
45− enableParallelBuilding = true;
66+ postInstall = ''
67+ cp ${muttWrapper} $out/bin/mutt
68+ '';
4669
4770 meta = with stdenv.lib; {
4871 description = "A small but very powerful text-based mail client";