summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2017-11-18 17:15:20 +0800
committerPeter Hoeg <peter@hoeg.com>2017-11-20 07:27:30 +0800
commitf16bd1c72d32bba164d5bee395e576999c4647e3 (patch)
tree4aca16ce36c76a1c116a35bb9d90e8004ada588a /pkgs/applications
parentfd565ced04c14eee3446dcbcf93682d9bf8785ca (diff)
downloadnixpkgs-f16bd1c72d32bba164d5bee395e576999c4647e3.tar
nixpkgs-f16bd1c72d32bba164d5bee395e576999c4647e3.tar.gz
nixpkgs-f16bd1c72d32bba164d5bee395e576999c4647e3.tar.bz2
nixpkgs-f16bd1c72d32bba164d5bee395e576999c4647e3.tar.lz
nixpkgs-f16bd1c72d32bba164d5bee395e576999c4647e3.tar.xz
nixpkgs-f16bd1c72d32bba164d5bee395e576999c4647e3.tar.zst
nixpkgs-f16bd1c72d32bba164d5bee395e576999c4647e3.zip
neomutt: use mime.types from dedicated mime-types derivation
The mime.types file shipped with neomutt is pretty basic so we use the one put
together by Gentoo from a dedicated mime-types derivation as it vastly improves
the handling of attachments.
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/mailreaders/neomutt/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/applications/networking/mailreaders/neomutt/default.nix b/pkgs/applications/networking/mailreaders/neomutt/default.nix
index e0e2a42c4b5..f72fdba52f8 100644
--- a/pkgs/applications/networking/mailreaders/neomutt/default.nix
+++ b/pkgs/applications/networking/mailreaders/neomutt/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitHub, which, autoreconfHook, makeWrapper, writeScript,
 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
   muttWrapper = writeScript "mutt" ''
@@ -28,6 +28,7 @@ in stdenv.mkDerivation rec {
   buildInputs = [
     cyrus_sasl gss gpgme kerberos libidn ncurses
     notmuch openssl perl lmdb
+    mime-types
   ];
 
   nativeBuildInputs = [
@@ -44,8 +45,9 @@ in stdenv.mkDerivation rec {
     done
 
     # 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 \
-      --replace /etc/mime.types $out/etc/mime.types
+      --replace /etc/mime.types ${mime-types}/etc/mime.types
   '';
 
   configureFlags = [
@@ -72,7 +74,6 @@ in stdenv.mkDerivation rec {
 
   postInstall = ''
     cp ${muttWrapper} $out/bin/mutt
-    mv $out/share/doc/neomutt/mime.types $out/etc
     wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/lib/neomutt"
   '';