mailutils: make Python and Guile support optional

Disabling both reduces the closure size from 232MB -> 92MB.
This commit is contained in:
Stefan Frijters 2023-02-18 13:19:45 +01:00
parent 4c16406089
commit 027f219714
No known key found for this signature in database
GPG Key ID: 7619A6BC6E7DFA6F

View File

@ -23,6 +23,9 @@
, sasl
, system-sendmail
, libxcrypt
, pythonSupport ? true
, guileSupport ? true
}:
stdenv.mkDerivation rec {
@ -56,16 +59,16 @@ stdenv.mkDerivation rec {
gdbm
gnutls
gss
guile
libmysqlclient
mailcap
ncurses
pam
python3
readline
sasl
libxcrypt
] ++ lib.optionals stdenv.isLinux [ nettools ];
] ++ lib.optionals stdenv.isLinux [ nettools ]
++ lib.optionals pythonSupport [ python3 ]
++ lib.optionals guileSupport [ guile ];
patches = [
./fix-build-mb-len-max.patch
@ -88,7 +91,8 @@ stdenv.mkDerivation rec {
"--with-path-sendmail=${system-sendmail}/bin/sendmail"
"--with-mail-rc=/etc/mail.rc"
"DEFAULT_CUPS_CONFDIR=${mailcap}/etc" # provides mime.types to mimeview
];
] ++ lib.optional (!pythonSupport) "--without-python"
++ lib.optional (!guileSupport) "--without-guile";
readmsg-tests = let
p = "https://raw.githubusercontent.com/gentoo/gentoo/9c921e89d51876fd876f250324893fd90c019326/net-mail/mailutils/files";