diff options
author | Dmitry Bogatov <serenity@kaction.cc> | 2022-11-11 20:23:46 -0500 |
---|---|---|
committer | Yt <happysalada@tuta.io> | 2023-05-24 20:04:07 -0400 |
commit | 21eb6c6ba74dcbe3ea5926ee46287300fb066630 (patch) | |
tree | ed14e1f93fe65e5a99f01b5aaa1833ca8ad545b9 /pkgs/applications/networking/mpop | |
parent | 105037c7cfc60c48c075a0ed2ba49597e0e59bcd (diff) |
mpop: export more configuration flags
Introduce options to disable support for NLS, IDN and GSASL, and also add option to use openssl instead of gnutls. While upstream marks openssl option as discouraged, it works and it may be considered desirable to have one SSL library in system instead of multiple ones.
Diffstat (limited to 'pkgs/applications/networking/mpop')
-rw-r--r-- | pkgs/applications/networking/mpop/default.nix | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/pkgs/applications/networking/mpop/default.nix b/pkgs/applications/networking/mpop/default.nix index 1d15ed3c26585..efc782e832833 100644 --- a/pkgs/applications/networking/mpop/default.nix +++ b/pkgs/applications/networking/mpop/default.nix @@ -2,11 +2,17 @@ , stdenv , fetchurl , gnutls +, openssl , gsasl , libidn , pkg-config , Security +, nlsSupport ? true +, idnSupport ? true +, gsaslSupport ? true +, sslLibrary ? "gnutls" }: +assert lib.assertOneOf "sslLibrary" sslLibrary ["gnutls" "openssl" "no"]; stdenv.mkDerivation rec { pname = "mpop"; @@ -21,17 +27,19 @@ stdenv.mkDerivation rec { pkg-config ]; - buildInputs = [ - gnutls - gsasl - libidn - ] ++ lib.optionals stdenv.isDarwin [ - Security - ]; + buildInputs = + lib.optional stdenv.isDarwin Security + ++ lib.optional gsaslSupport gsasl + ++ lib.optional idnSupport libidn + ++ lib.optional (sslLibrary == "gnutls") gnutls + ++ lib.optional (sslLibrary == "openssl") openssl; - configureFlags = lib.optionals stdenv.isDarwin [ - "--with-macosx-keyring" - ]; + configureFlags = [ + (lib.enableFeature nlsSupport "nls") + (lib.withFeature idnSupport "idn") + (lib.withFeature gsaslSupport "gsasl") + "--with-tls=${sslLibrary}" + ] ++ lib.optional stdenv.isDarwin "--with-macosx-keyring"; meta = with lib;{ description = "POP3 mail retrieval agent"; |