mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
2ef36f2ee5
- neomutt has changed the binary name so we enable "mutt" via a wrapper script with a warning - we don't have to manually run the prepare.sh script as autoreconfHook handles everything for us - doc generation was previously trying to fetch DTDs from the net
78 lines
2.2 KiB
Nix
78 lines
2.2 KiB
Nix
{ stdenv, fetchFromGitHub, which, autoreconfHook, writeScript, ncurses, perl
|
|
, cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
|
|
|
|
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";
|
|
name = "neomutt-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "neomutt";
|
|
repo = "neomutt";
|
|
rev = "neomutt-${version}";
|
|
sha256 = "0zn8imqfa76bxpkpy111c4vn6vjarbxc8gqv6m18qkksk0ly26l1";
|
|
};
|
|
|
|
buildInputs = [
|
|
cyrus_sasl gss gpgme kerberos libidn ncurses
|
|
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 = [
|
|
"--enable-debug"
|
|
"--enable-gpgme"
|
|
"--enable-notmuch"
|
|
"--with-curses"
|
|
"--with-gss"
|
|
"--with-homespool=mailbox"
|
|
"--with-idn"
|
|
"--with-lmdb"
|
|
"--with-mailpath="
|
|
"--with-sasl"
|
|
"--with-ssl"
|
|
|
|
# Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
|
|
"ac_cv_path_SENDMAIL=sendmail"
|
|
];
|
|
|
|
# Fix missing libidn in mutt;
|
|
# this fix is ugly since it links all binaries in mutt against libidn
|
|
# like pgpring, pgpewrap, ...
|
|
NIX_LDFLAGS = "-lidn";
|
|
|
|
postInstall = ''
|
|
cp ${muttWrapper} $out/bin/mutt
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A small but very powerful text-based mail client";
|
|
homepage = http://www.neomutt.org;
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ cstrahan erikryb jfrankenau vrthra ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|