Merge pull request #30401 from peterhoeg/u/mutt
neomutt: minor cleanups and introduce wrapper for users invoking `mutt`
This commit is contained in:
commit
2542944a95
|
@ -1,7 +1,19 @@
|
||||||
{ stdenv, fetchFromGitHub, which, autoreconfHook, ncurses, perl
|
{ stdenv, fetchFromGitHub, which, autoreconfHook, writeScript, ncurses, perl
|
||||||
, cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
|
, cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
muttWrapper = writeScript "mutt" ''
|
||||||
|
#!${stdenv.shell} -eu
|
||||||
|
|
||||||
|
echo 'The neomutt project has renamed the main binary from `mutt` to `neomutt`.'
|
||||||
|
echo ""
|
||||||
|
echo 'This wrapper is provided for compatibility purposes only. You should start calling `neomutt` instead.'
|
||||||
|
echo ""
|
||||||
|
read -p 'Press any key to launch NeoMutt...' -n1 -s
|
||||||
|
exec neomutt "$@"
|
||||||
|
'';
|
||||||
|
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
version = "20171013";
|
version = "20171013";
|
||||||
name = "neomutt-${version}";
|
name = "neomutt-${version}";
|
||||||
|
|
||||||
|
@ -12,24 +24,35 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0zn8imqfa76bxpkpy111c4vn6vjarbxc8gqv6m18qkksk0ly26l1";
|
sha256 = "0zn8imqfa76bxpkpy111c4vn6vjarbxc8gqv6m18qkksk0ly26l1";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook docbook_xsl docbook_xml_dtd_42 libxslt.bin which ];
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
cyrus_sasl gss gpgme kerberos libidn ncurses
|
cyrus_sasl gss gpgme kerberos libidn ncurses
|
||||||
notmuch openssl perl lmdb
|
notmuch openssl perl lmdb
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ autoreconfHook docbook_xsl docbook_xml_dtd_42 libxslt.bin which ];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
for f in doc/*.{xml,xsl}* ; do
|
||||||
|
substituteInPlace $f \
|
||||||
|
--replace http://docbook.sourceforge.net/release/xsl/current ${docbook_xsl}/share/xml/docbook-xsl \
|
||||||
|
--replace http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd ${docbook_xml_dtd_42}/xml/dtd/docbook/docbookx.dtd
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-debug"
|
"--enable-debug"
|
||||||
"--enable-gpgme"
|
"--enable-gpgme"
|
||||||
"--enable-notmuch"
|
"--enable-notmuch"
|
||||||
"--with-homespool=mailbox"
|
|
||||||
"--with-gss"
|
|
||||||
"--with-mailpath="
|
|
||||||
"--with-ssl"
|
|
||||||
"--with-sasl"
|
|
||||||
"--with-curses"
|
"--with-curses"
|
||||||
|
"--with-gss"
|
||||||
|
"--with-homespool=mailbox"
|
||||||
"--with-idn"
|
"--with-idn"
|
||||||
"--with-lmdb"
|
"--with-lmdb"
|
||||||
|
"--with-mailpath="
|
||||||
|
"--with-sasl"
|
||||||
|
"--with-ssl"
|
||||||
|
|
||||||
# Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
|
# Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
|
||||||
"ac_cv_path_SENDMAIL=sendmail"
|
"ac_cv_path_SENDMAIL=sendmail"
|
||||||
|
@ -40,9 +63,9 @@ stdenv.mkDerivation rec {
|
||||||
# like pgpring, pgpewrap, ...
|
# like pgpring, pgpewrap, ...
|
||||||
NIX_LDFLAGS = "-lidn";
|
NIX_LDFLAGS = "-lidn";
|
||||||
|
|
||||||
configureScript = "./prepare";
|
postInstall = ''
|
||||||
|
cp ${muttWrapper} $out/bin/mutt
|
||||||
enableParallelBuilding = true;
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A small but very powerful text-based mail client";
|
description = "A small but very powerful text-based mail client";
|
||||||
|
|
Loading…
Reference in a new issue