From 69ae3ba1f6efc74f668a66fcc43710ab9eefbb12 Mon Sep 17 00:00:00 2001 From: oddlama Date: Tue, 20 May 2025 22:23:08 +0200 Subject: [PATCH 1/3] stalwart-mail: 0.11.8 -> 0.12.2 --- pkgs/by-name/st/stalwart-mail/package.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/st/stalwart-mail/package.nix b/pkgs/by-name/st/stalwart-mail/package.nix index b8aaa8bb7dc6..58c902e34236 100644 --- a/pkgs/by-name/st/stalwart-mail/package.nix +++ b/pkgs/by-name/st/stalwart-mail/package.nix @@ -21,17 +21,17 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "stalwart-mail" + (lib.optionalString stalwartEnterprise "-enterprise"); - version = "0.11.8"; + version = "0.12.2"; src = fetchFromGitHub { owner = "stalwartlabs"; - repo = "mail-server"; + repo = "stalwart"; tag = "v${finalAttrs.version}"; - hash = "sha256-VqGosbSQxNeOS+kGtvXAmz6vyz5mJlXvKZM57B1Xue4="; + hash = "sha256-P19jeEzFE8Gu6hqHZJiPoJ70r+zOmzOpEwfFqPQczZY="; }; useFetchCargoVendor = true; - cargoHash = "sha256-iheURWxO0cOvO+FV01l2Vmo0B+S2mXzue6mx3gapftQ="; + cargoHash = "sha256-WVvDapCA9pTgOtPpbsK78u2AC2hUfo3sOejZ6pJSlQk="; nativeBuildInputs = [ pkg-config @@ -47,7 +47,7 @@ rustPlatform.buildRustPackage (finalAttrs: { rust-jemalloc-sys ] ++ lib.optionals (stdenv.hostPlatform.isLinux && withFoundationdb) [ foundationdb ]; - # Issue: https://github.com/stalwartlabs/mail-server/issues/1104 + # Issue: https://github.com/stalwartlabs/stalwart/issues/1104 buildNoDefaultFeatures = true; buildFeatures = [ @@ -118,6 +118,10 @@ rustPlatform.buildRustPackage (finalAttrs: { "--skip=smtp::queue::retry::queue_retry" # Missing store type. Try running `STORE= cargo test`: NotPresent "--skip=store::store_tests" + # Missing store type. Try running `STORE= cargo test`: NotPresent + "--skip=cluster::cluster_tests" + # Missing store type. Try running `STORE= cargo test`: NotPresent + "--skip=webdav::webdav_tests" # thread 'config::parser::tests::toml_parse' panicked at crates/utils/src/config/parser.rs:463:58: # called `Result::unwrap()` on an `Err` value: "Expected ['\\n'] but found '!' in value at line 70." "--skip=config::parser::tests::toml_parse" @@ -174,6 +178,7 @@ rustPlatform.buildRustPackage (finalAttrs: { } ]; + mainProgram = "stalwart"; maintainers = with lib.maintainers; [ happysalada onny From 1069853a494592d2314bbda61fe68a930b3ca780 Mon Sep 17 00:00:00 2001 From: oddlama Date: Tue, 20 May 2025 22:23:32 +0200 Subject: [PATCH 2/3] nixos/stalwart-mail: utilize lib.getExe --- nixos/modules/services/mail/stalwart-mail.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/mail/stalwart-mail.nix b/nixos/modules/services/mail/stalwart-mail.nix index 42198573ec09..0809df816b7a 100644 --- a/nixos/modules/services/mail/stalwart-mail.nix +++ b/nixos/modules/services/mail/stalwart-mail.nix @@ -162,7 +162,7 @@ in serviceConfig = { ExecStart = [ "" - "${cfg.package}/bin/stalwart-mail --config=${configFile}" + "${lib.getExe cfg.package} --config=${configFile}" ]; LoadCredential = lib.mapAttrsToList (key: value: "${key}:${value}") cfg.credentials; @@ -175,6 +175,10 @@ in CacheDirectory = "stalwart-mail"; StateDirectory = "stalwart-mail"; + # Upstream uses "stalwart" as the username since 0.12.0 + User = "stalwart-mail"; + Group = "stalwart-mail"; + # Bind standard privileged ports AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ]; CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ]; From c901728be9b6f6ac34fddc1fb3703b2f4f8ab8be Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 26 May 2025 20:45:13 +0200 Subject: [PATCH 3/3] stalwart-mail.webadmin: 0.1.25 -> 0.1.26 --- pkgs/by-name/st/stalwart-mail/webadmin.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/st/stalwart-mail/webadmin.nix b/pkgs/by-name/st/stalwart-mail/webadmin.nix index 5ed67c2b45c2..72466a751a02 100644 --- a/pkgs/by-name/st/stalwart-mail/webadmin.nix +++ b/pkgs/by-name/st/stalwart-mail/webadmin.nix @@ -16,13 +16,13 @@ rustPlatform.buildRustPackage rec { pname = "webadmin"; - version = "0.1.25"; + version = "0.1.26"; src = fetchFromGitHub { owner = "stalwartlabs"; repo = "webadmin"; tag = "v${version}"; - hash = "sha256-Hv7FojY/SZgbzS8XGVj0uRfynZCZPEbPiSHRuBtt/Jc="; + hash = "sha256-TWzXSBXLZd4b02cfiERZqNaXcfxx1pH7OFUcdEugH7k="; }; npmDeps = fetchNpmDeps { @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { }; useFetchCargoVendor = true; - cargoHash = "sha256-/BoGeAF4GbM8ddWCnxAueJQYgQZvAL0pQ0pDUW0mXI0="; + cargoHash = "sha256-Eh5wu3RHNPWIPDZPUlh8L6OvghkfmMp0eAOTbk9Fs+0="; postPatch = '' # Using local tailwindcss for compilation