From 735a825eed9cfa1e3eb414d1b3f8aa85fabc25d1 Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Sat, 26 Apr 2025 18:31:52 +0200 Subject: [PATCH] stalwart-mail: make foundationdb support optional Prior to this foundationdb was include in the closure, but stalwart wasn't compiled with the nesseary cargo feature. This commit introduces a package option to enable foundationdb, this option was disable by default as: - the foundationdb package breaks quite frequently - support was broken and nobody complaint - even upstream doesn't enable foundationdb by default in its docker image --- pkgs/by-name/st/stalwart-mail/package.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/st/stalwart-mail/package.nix b/pkgs/by-name/st/stalwart-mail/package.nix index 65cbec0134c5..2b1820dcd7cd 100644 --- a/pkgs/by-name/st/stalwart-mail/package.nix +++ b/pkgs/by-name/st/stalwart-mail/package.nix @@ -15,6 +15,7 @@ nixosTests, rocksdb, callPackage, + withFoundationdb ? false, }: rustPlatform.buildRustPackage rec { @@ -44,7 +45,7 @@ rustPlatform.buildRustPackage rec { sqlite zstd ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ foundationdb ] + ++ lib.optionals (stdenv.hostPlatform.isLinux && withFoundationdb) [ foundationdb ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation darwin.apple_sdk.frameworks.Security @@ -61,7 +62,7 @@ rustPlatform.buildRustPackage rec { "elastic" "s3" "redis" - ]; + ] ++ lib.optionals withFoundationdb [ "foundationdb" ]; env = { OPENSSL_NO_VENDOR = true;