1- { lib , stdenv , fetchFromGitHub , gettext , makeWrapper , tcl , which
2- , ncurses , perl , cyrus_sasl , gss , gpgme , libkrb5 , libidn2 , libxml2 , notmuch , openssl
3- , lua , lmdb , libxslt , docbook_xsl , docbook_xml_dtd_42 , w3m , mailcap , sqlite , zlib , lndir
4- , pkg-config , zstd , enableZstd ? true , enableMixmaster ? false , enableLua ? false
5- , withContrib ? true
1+ {
2+ lib ,
3+ stdenv ,
4+ fetchFromGitHub ,
5+ gettext ,
6+ makeWrapper ,
7+ tcl ,
8+ which ,
9+ ncurses ,
10+ perl ,
11+ cyrus_sasl ,
12+ gss ,
13+ gpgme ,
14+ libkrb5 ,
15+ libidn2 ,
16+ libxml2 ,
17+ notmuch ,
18+ openssl ,
19+ lua ,
20+ lmdb ,
21+ libxslt ,
22+ docbook_xsl ,
23+ docbook_xml_dtd_42 ,
24+ w3m ,
25+ mailcap ,
26+ sqlite ,
27+ zlib ,
28+ lndir ,
29+ pkg-config ,
30+ zstd ,
31+ enableZstd ? true ,
32+ enableMixmaster ? false ,
33+ enableLua ? false ,
34+ enableSmimeKeys ? true ,
35+ withContrib ? true ,
636} :
737
838stdenv . mkDerivation ( finalAttrs : {
939 pname = "neomutt" ;
1040 version = "20240425" ;
1141
1242 src = fetchFromGitHub {
13- owner = "neomutt" ;
14- repo = "neomutt" ;
15- rev = finalAttrs . version ;
16- hash = "sha256-QBqPFteoAm3AdQN0XTWpho8DEW2BFCCzBcHUZIiSxyQ=" ;
43+ owner = "neomutt" ;
44+ repo = "neomutt" ;
45+ rev = finalAttrs . version ;
46+ hash = "sha256-QBqPFteoAm3AdQN0XTWpho8DEW2BFCCzBcHUZIiSxyQ=" ;
1747 } ;
1848
1949 buildInputs = [
20- cyrus_sasl gss gpgme libkrb5 libidn2 ncurses
21- notmuch openssl perl lmdb
22- mailcap sqlite
23- ]
24- ++ lib . optional enableZstd zstd
25- ++ lib . optional enableLua lua ;
50+ cyrus_sasl
51+ gss
52+ gpgme
53+ libkrb5
54+ libidn2
55+ ncurses
56+ notmuch
57+ openssl
58+ perl
59+ lmdb
60+ mailcap
61+ sqlite
62+ ] ++ lib . optional enableZstd zstd ++ lib . optional enableLua lua ;
2663
2764 nativeBuildInputs = [
28- docbook_xsl docbook_xml_dtd_42 gettext libxml2 libxslt . bin makeWrapper tcl which zlib w3m
65+ docbook_xsl
66+ docbook_xml_dtd_42
67+ gettext
68+ libxml2
69+ libxslt . bin
70+ makeWrapper
71+ tcl
72+ which
73+ zlib
74+ w3m
2975 pkg-config
3076 ] ;
3177
@@ -49,31 +95,38 @@ stdenv.mkDerivation (finalAttrs: {
4995 --replace /etc/mime.types ${ mailcap } /etc/mime.types
5096 '' ;
5197
52- configureFlags = [
53- "--enable-autocrypt"
54- "--gpgme"
55- "--gss"
56- "--lmdb"
57- "--notmuch"
58- "--ssl"
59- "--sasl"
60- "--with-homespool=mailbox"
61- "--with-mailpath="
62- # To make it not reference .dev outputs. See:
63- # https://github.com/neomutt/neomutt/pull/2367
64- "--disable-include-path-in-cflags"
65- "--zlib"
66- ]
67- ++ lib . optional enableZstd "--zstd"
68- ++ lib . optional enableLua "--lua"
69- ++ lib . optional enableMixmaster "--mixmaster" ;
70-
71- postInstall = ''
72- wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/libexec/neomutt"
73- ''
74- # https://github.com/neomutt/neomutt-contrib
75- # Contains vim-keys, keybindings presets and more.
76- + lib . optionalString withContrib "${ lib . getExe lndir } ${ finalAttrs . passthru . contrib } $out/share/doc/neomutt" ;
98+ configureFlags =
99+ [
100+ "--enable-autocrypt"
101+ "--gpgme"
102+ "--gss"
103+ "--lmdb"
104+ "--notmuch"
105+ "--ssl"
106+ "--sasl"
107+ "--with-homespool=mailbox"
108+ "--with-mailpath="
109+ # To make it not reference .dev outputs. See:
110+ # https://github.com/neomutt/neomutt/pull/2367
111+ "--disable-include-path-in-cflags"
112+ "--zlib"
113+ ]
114+ ++ lib . optional enableZstd "--zstd"
115+ ++ lib . optional enableLua "--lua"
116+ ++ lib . optional enableMixmaster "--mixmaster" ;
117+
118+ postInstall =
119+ ''
120+ wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/libexec/neomutt"
121+ ''
122+ + lib . optionalString enableSmimeKeys ''
123+ install -m 755 $src/contrib/smime_keys $out/bin;
124+ substituteInPlace $out/bin/smime_keys \
125+ --replace-fail '/usr/bin/openssl' '${ openssl } /bin/openssl';
126+ ''
127+ # https://github.com/neomutt/neomutt-contrib
128+ # Contains vim-keys, keybindings presets and more.
129+ + lib . optionalString withContrib "${ lib . getExe lndir } ${ finalAttrs . passthru . contrib } $out/share/doc/neomutt" ;
77130
78131 doCheck = true ;
79132
@@ -111,9 +164,12 @@ stdenv.mkDerivation (finalAttrs: {
111164 meta = {
112165 description = "Small but very powerful text-based mail client" ;
113166 mainProgram = "neomutt" ;
114- homepage = "https://www.neomutt.org" ;
115- license = lib . licenses . gpl2Plus ;
116- maintainers = with lib . maintainers ; [ erikryb raitobezarius ] ;
117- platforms = lib . platforms . unix ;
167+ homepage = "https://www.neomutt.org" ;
168+ license = lib . licenses . gpl2Plus ;
169+ maintainers = with lib . maintainers ; [
170+ erikryb
171+ raitobezarius
172+ ] ;
173+ platforms = lib . platforms . unix ;
118174 } ;
119175} )
0 commit comments