2021-10-12 07:30:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, gnutls
|
2022-11-12 01:23:46 +00:00
|
|
|
, openssl
|
2021-10-12 07:30:43 +00:00
|
|
|
, gsasl
|
|
|
|
, libidn
|
|
|
|
, pkg-config
|
|
|
|
, Security
|
2022-11-12 01:23:46 +00:00
|
|
|
, nlsSupport ? true
|
|
|
|
, idnSupport ? true
|
|
|
|
, gsaslSupport ? true
|
|
|
|
, sslLibrary ? "gnutls"
|
2021-10-12 07:30:43 +00:00
|
|
|
}:
|
2022-11-12 01:23:46 +00:00
|
|
|
assert lib.assertOneOf "sslLibrary" sslLibrary ["gnutls" "openssl" "no"];
|
2017-03-18 01:02:23 +00:00
|
|
|
|
2016-05-14 17:03:47 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-04-25 00:28:04 +00:00
|
|
|
pname = "mpop";
|
2023-02-28 02:41:29 +00:00
|
|
|
version = "1.4.18";
|
2016-05-14 17:03:47 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-04-25 00:28:04 +00:00
|
|
|
url = "https://marlam.de/${pname}/releases/${pname}-${version}.tar.xz";
|
2023-02-28 02:41:29 +00:00
|
|
|
sha256 = "sha256-YJmVAYT30JSngtHnq5gzc28SMI00pUSlm0aoRx2fhbc=";
|
2016-05-14 17:03:47 +00:00
|
|
|
};
|
|
|
|
|
2021-10-12 07:30:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2022-11-12 01:23:46 +00:00
|
|
|
buildInputs =
|
|
|
|
lib.optional stdenv.isDarwin Security
|
|
|
|
++ lib.optional gsaslSupport gsasl
|
|
|
|
++ lib.optional idnSupport libidn
|
|
|
|
++ lib.optional (sslLibrary == "gnutls") gnutls
|
|
|
|
++ lib.optional (sslLibrary == "openssl") openssl;
|
2016-05-14 17:03:47 +00:00
|
|
|
|
2022-11-12 01:23:46 +00:00
|
|
|
configureFlags = [
|
|
|
|
(lib.enableFeature nlsSupport "nls")
|
|
|
|
(lib.withFeature idnSupport "idn")
|
|
|
|
(lib.withFeature gsaslSupport "gsasl")
|
|
|
|
"--with-tls=${sslLibrary}"
|
|
|
|
] ++ lib.optional stdenv.isDarwin "--with-macosx-keyring";
|
2016-05-14 17:03:47 +00:00
|
|
|
|
2021-10-12 07:30:43 +00:00
|
|
|
meta = with lib;{
|
|
|
|
description = "POP3 mail retrieval agent";
|
|
|
|
homepage = "https://marlam.de/mpop";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2016-05-14 17:03:47 +00:00
|
|
|
}
|