stalwart-mail: 0.10.0 -> 0.10.2 and some improvements (#346555)

This commit is contained in:
Yt
2024-10-05 13:13:39 -04:00
committed by GitHub

View File

@@ -26,7 +26,7 @@ let
# See upstream issue for rocksdb 9.X support
# https://github.com/stalwartlabs/mail-server/issues/407
rocksdb = rocksdb_8_11;
version = "0.10.0";
version = "0.10.2";
in
rustPlatform.buildRustPackage {
pname = "stalwart-mail";
@@ -36,21 +36,11 @@ rustPlatform.buildRustPackage {
owner = "stalwartlabs";
repo = "mail-server";
rev = "refs/tags/v${version}";
hash = "sha256-9qk7+LJntEmCIuxp0707OOHBVkywlAJA1QmWllR9ZHg=";
hash = "sha256-wH26uwaYzfqiamiJ/oosVEiTfCOItwVGbHdRh6Ykpgk=";
fetchSubmodules = true;
};
cargoHash = "sha256-O1LuEHH5VD/6875Psfp5N/oWYlo1cuTlHzwcgG9RrpI=";
patches = [
# Remove "PermissionsStartOnly" from systemd service files,
# which is deprecated and conflicts with our module's ExecPreStart.
# Upstream PR: https://github.com/stalwartlabs/mail-server/pull/528
(fetchpatch {
url = "https://github.com/stalwartlabs/mail-server/pull/528/commits/6e292b3d7994441e58e367b87967c9a277bce490.patch";
hash = "sha256-j/Li4bYNE7IppxG3FGfljra70/rHyhRvDgOkZOlhMHY=";
})
];
cargoHash = "sha256-1AFDyZpkcvFzWBczMAPfajmhBmVl4ou4JdKnrK2KlQI=";
nativeBuildInputs = [
pkg-config
@@ -58,22 +48,31 @@ rustPlatform.buildRustPackage {
rustPlatform.bindgenHook
];
buildInputs = [
bzip2
openssl
sqlite
zstd
] ++ lib.optionals stdenv.hostPlatform.isLinux [
foundationdb
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
buildInputs =
[
bzip2
openssl
sqlite
zstd
]
++ lib.optionals stdenv.hostPlatform.isLinux [ foundationdb ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
# skip defaults on darwin because foundationdb is not available
buildNoDefaultFeatures = stdenv.hostPlatform.isDarwin;
buildFeatures = lib.optional (stdenv.hostPlatform.isDarwin) [ "sqlite" "postgres" "mysql" "rocks" "elastic" "s3" "redis" ];
buildFeatures = lib.optional (stdenv.hostPlatform.isDarwin) [
"sqlite"
"postgres"
"mysql"
"rocks"
"elastic"
"s3"
"redis"
];
env = {
OPENSSL_NO_VENDOR = true;
@@ -154,11 +153,16 @@ rustPlatform.buildRustPackage {
tests.stalwart-mail = nixosTests.stalwart-mail;
};
meta = with lib; {
meta = {
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/${version}/CHANGELOG";
license = licenses.agpl3Only;
maintainers = with maintainers; [ happysalada onny oddlama ];
changelog = "https://github.com/stalwartlabs/mail-server/blob/main/CHANGELOG.md";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
happysalada
onny
oddlama
pandapip1
];
};
}