diff --git a/pkgs/by-name/st/stalwart-mail/package.nix b/pkgs/by-name/st/stalwart-mail/package.nix index 77f48d5cadfe..0a9ed8b7d733 100644 --- a/pkgs/by-name/st/stalwart-mail/package.nix +++ b/pkgs/by-name/st/stalwart-mail/package.nix @@ -15,10 +15,11 @@ rocksdb, callPackage, withFoundationdb ? false, + stalwartEnterprise ? false, }: rustPlatform.buildRustPackage rec { - pname = "stalwart-mail"; + pname = "stalwart-mail" + (lib.optionalString stalwartEnterprise "-enterprise"); version = "0.11.8"; src = fetchFromGitHub { @@ -46,15 +47,18 @@ rustPlatform.buildRustPackage rec { # Issue: https://github.com/stalwartlabs/mail-server/issues/1104 buildNoDefaultFeatures = true; - buildFeatures = [ - "sqlite" - "postgres" - "mysql" - "rocks" - "elastic" - "s3" - "redis" - ] ++ lib.optionals withFoundationdb [ "foundationdb" ]; + buildFeatures = + [ + "sqlite" + "postgres" + "mysql" + "rocks" + "elastic" + "s3" + "redis" + ] + ++ lib.optionals withFoundationdb [ "foundationdb" ] + ++ lib.optionals stalwartEnterprise [ "enterprise" ]; env = { OPENSSL_NO_VENDOR = true; @@ -154,7 +158,17 @@ rustPlatform.buildRustPackage rec { description = "Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP)"; homepage = "https://github.com/stalwartlabs/mail-server"; changelog = "https://github.com/stalwartlabs/mail-server/blob/main/CHANGELOG.md"; - license = lib.licenses.agpl3Only; + license = + [ lib.licenses.agpl3Only ] + ++ lib.optionals stalwartEnterprise [ + { + fullName = "Stalwart Enterprise License 1.0 (SELv1) Agreement"; + url = "https://github.com/stalwartlabs/mail-server/blob/main/LICENSES/LicenseRef-SEL.txt"; + free = false; + redistributable = false; + } + ]; + maintainers = with lib.maintainers; [ happysalada onny diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd0d5c8acd75..b892b79f281e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10909,6 +10909,10 @@ with pkgs; stalwart-mail-webadmin = stalwart-mail.webadmin; + stalwart-mail-enterprise = stalwart-mail.override { + stalwartEnterprise = true; + }; + ruby-zoom = callPackage ../tools/text/ruby-zoom { }; inherit (callPackages ../servers/monitoring/sensu-go { })