postfix: add TLSRPT support (#415460)

This commit is contained in:
Aleksana
2025-06-12 10:21:10 +08:00
committed by GitHub
2 changed files with 43 additions and 1 deletions
+37
View File
@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libtlsrpt";
version = "0.5.0";
outputs = [
"out"
"dev"
"man"
];
src = fetchFromGitHub {
owner = "sys4";
repo = "libtlsrpt";
tag = "v${finalAttrs.version}";
hash = "sha256-h7bWxxllKFj8+/FfC4yHSmz+Qij1BcgV4OCQZr1OkA8=";
};
nativeBuildInputs = [ autoreconfHook ];
separateDebugInfo = true;
meta = {
description = "Low-level C Library to implement TLSRPT into a MTA";
homepage = "https://github.com/sys4/libtlsrpt";
changelog = "https://github.com/sys4/libtlsrpt/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.lgpl3Plus;
maintainers = with lib.maintainers; [ hexa ];
platforms = lib.platforms.all;
};
})
+6 -1
View File
@@ -26,6 +26,8 @@
libmysqlclient,
withSQLite ? false,
sqlite,
withTLSRPT ? true,
libtlsrpt,
}:
let
@@ -48,6 +50,7 @@ let
"-DHAS_LDAP"
"-DUSE_LDAP_SASL"
]
++ lib.optional withTLSRPT "-DUSE_TLSRPT"
);
auxlibs = lib.concatStringsSep " " (
[
@@ -62,6 +65,7 @@ let
++ lib.optional withMySQL "-lmysqlclient"
++ lib.optional withSQLite "-lsqlite3"
++ lib.optional withLDAP "-lldap"
++ lib.optional withTLSRPT "-ltlsrpt"
);
in
@@ -90,7 +94,8 @@ stdenv.mkDerivation rec {
++ lib.optional withPgSQL libpq
++ lib.optional withMySQL libmysqlclient
++ lib.optional withSQLite sqlite
++ lib.optional withLDAP openldap;
++ lib.optional withLDAP openldap
++ lib.optional withTLSRPT libtlsrpt;
hardeningDisable = [ "format" ];
hardeningEnable = [ "pie" ];