From 85ae8c21ae5803657a165ac40419e19f65ba9b79 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Sun, 26 Jan 2025 09:23:31 +0100 Subject: [PATCH] opensmtpd.table-mysql: init at 1.2.1 The opensmtpd-extra package has been deprecated in favor of standalone repositories for each of the filters. Introduce table-mysql, which is one of these new standalone filters to read login info from a MySQL or MariaDB database. --- .../op/opensmtpd-table-mysql/package.nix | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 pkgs/by-name/op/opensmtpd-table-mysql/package.nix diff --git a/pkgs/by-name/op/opensmtpd-table-mysql/package.nix b/pkgs/by-name/op/opensmtpd-table-mysql/package.nix new file mode 100644 index 000000000000..c1bd227783b0 --- /dev/null +++ b/pkgs/by-name/op/opensmtpd-table-mysql/package.nix @@ -0,0 +1,53 @@ +{ + lib, + stdenv, + fetchFromGitHub, + autoconf, + automake, + libmysqlclient, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "opensmtpd-table-mysql"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "OpenSMTPD"; + repo = "table-mysql"; + tag = finalAttrs.version; + hash = "sha256-0N1fuYJvJKAoOJMH2bX0pdvAqb26w/6JSuv6ycnRZHU="; + }; + + strictDeps = true; + + buildInputs = [ + libmysqlclient + ]; + + nativeBuildInputs = [ + autoconf + automake + libmysqlclient + ]; + + configureFlags = [ + "--sysconfdir=/etc" + "--localstatedir=/var" + "--with-path-socket=/run" + "--with-path-pidfile=/run" + ]; + + preConfigure = '' + sh bootstrap + ''; + + meta = { + homepage = "https://www.opensmtpd.org/"; + description = "ldap table for the OpenSMTPD mail server"; + changelog = "https://github.com/OpenSMTPD/table-mysql/releases/tag/${finalAttrs.version}"; + license = lib.licenses.isc; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ + pks + ]; + }; +})