Merge pull request #31791 from peterhoeg/f/neomutt

neomutt: use mime.types from mime_types
This commit is contained in:
Graham Christensen 2017-11-19 19:36:34 -05:00 committed by GitHub
commit 6a83ee4af8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, which, autoreconfHook, makeWrapper, writeScript, { stdenv, fetchFromGitHub, which, autoreconfHook, makeWrapper, writeScript,
ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl, ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, notmuch, openssl,
lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42 }: lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mime-types }:
let let
muttWrapper = writeScript "mutt" '' muttWrapper = writeScript "mutt" ''
@ -28,6 +28,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
cyrus_sasl gss gpgme kerberos libidn ncurses cyrus_sasl gss gpgme kerberos libidn ncurses
notmuch openssl perl lmdb notmuch openssl perl lmdb
mime-types
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
@ -44,8 +45,9 @@ in stdenv.mkDerivation rec {
done done
# allow neomutt to map attachments to their proper mime.types if specified wrongly # allow neomutt to map attachments to their proper mime.types if specified wrongly
# and use a far more comprehensive list than the one shipped with neomutt
substituteInPlace sendlib.c \ substituteInPlace sendlib.c \
--replace /etc/mime.types $out/etc/mime.types --replace /etc/mime.types ${mime-types}/etc/mime.types
''; '';
configureFlags = [ configureFlags = [
@ -72,7 +74,6 @@ in stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
cp ${muttWrapper} $out/bin/mutt cp ${muttWrapper} $out/bin/mutt
mv $out/share/doc/neomutt/mime.types $out/etc
wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/lib/neomutt" wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/lib/neomutt"
''; '';