diff --git a/nixos/modules/services/mail/stalwart-mail.nix b/nixos/modules/services/mail/stalwart-mail.nix index 12ed97576699..e053bd9400c4 100644 --- a/nixos/modules/services/mail/stalwart-mail.nix +++ b/nixos/modules/services/mail/stalwart-mail.nix @@ -158,7 +158,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; @@ -171,6 +171,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" ]; diff --git a/pkgs/by-name/st/stalwart-mail/package.nix b/pkgs/by-name/st/stalwart-mail/package.nix index 1567814a12a4..6aa5c143921e 100644 --- a/pkgs/by-name/st/stalwart-mail/package.nix +++ b/pkgs/by-name/st/stalwart-mail/package.nix @@ -24,13 +24,13 @@ let in 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="; }; # rocksdb does not properly distinguish between pointers it has allocated itself @@ -45,7 +45,7 @@ rustPlatform.buildRustPackage (finalAttrs: { ''; useFetchCargoVendor = true; - cargoHash = "sha256-iheURWxO0cOvO+FV01l2Vmo0B+S2mXzue6mx3gapftQ="; + cargoHash = "sha256-WVvDapCA9pTgOtPpbsK78u2AC2hUfo3sOejZ6pJSlQk="; nativeBuildInputs = [ pkg-config @@ -62,7 +62,7 @@ rustPlatform.buildRustPackage (finalAttrs: { rocksdbJemalloc ] ++ 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 = [ @@ -133,6 +133,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" @@ -189,6 +193,7 @@ rustPlatform.buildRustPackage (finalAttrs: { } ]; + mainProgram = "stalwart"; maintainers = with lib.maintainers; [ happysalada onny 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