mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
Merge pull request #304812 from onny/stalwart-update
stalwart-mail: 0.6.0 -> 0.8.0; rocksdb_8_11: init at 8.11.4
This commit is contained in:
commit
46334c6b31
@ -602,6 +602,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
||||
- `buildDubPackage` can now be used to build Programs written in [D](https://dlang.org/) using the `dub` build system and package manager.
|
||||
See the [D section](https://nixos.org/manual/nixpkgs/unstable#dlang) in the manual for more information.
|
||||
|
||||
- `stalwart-mail` service uses the legacy version 0.6.X as default because newer `stalwart-mail` versions require a [manual upgrade process](https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md). Change [`services.stalwart-mail.package`](#opt-services.stalwart-mail.package) to `pkgs.stalwart-mail` if you wish to switch to the new version.
|
||||
|
||||
- [`portunus`](https://github.com/majewsky/portunus) has been updated to major version 2.
|
||||
This version of Portunus supports strong password hashes, but the legacy hash SHA-256 is also still supported to ensure a smooth migration of existing user accounts.
|
||||
After upgrading, follow the instructions on the [upstream release notes](https://github.com/majewsky/portunus/releases/tag/v2.0.0) to upgrade all user accounts to strong password hashes.
|
||||
|
@ -7,11 +7,28 @@ let
|
||||
configFormat = pkgs.formats.toml { };
|
||||
configFile = configFormat.generate "stalwart-mail.toml" cfg.settings;
|
||||
dataDir = "/var/lib/stalwart-mail";
|
||||
stalwartAtLeast = versionAtLeast cfg.package.version;
|
||||
|
||||
in {
|
||||
options.services.stalwart-mail = {
|
||||
enable = mkEnableOption "the Stalwart all-in-one email server";
|
||||
package = mkPackageOption pkgs "stalwart-mail" { };
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = ''
|
||||
Which package to use for the Stalwart mail server.
|
||||
|
||||
::: {.note}
|
||||
Upgrading from version 0.6.0 to version 0.7.0 or higher requires manual
|
||||
intervention. See <https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md>
|
||||
for upgrade instructions.
|
||||
:::
|
||||
'';
|
||||
default = pkgs.stalwart-mail_0_6;
|
||||
defaultText = lib.literalExpression "pkgs.stalwart-mail_0_6";
|
||||
example = lib.literalExpression "pkgs.stalwart-mail";
|
||||
relatedPackages = [ "stalwart-mail_0_6" "stalwart-mail" ];
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
inherit (configFormat) type;
|
||||
@ -26,6 +43,18 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
warnings = lib.optionals (!stalwartAtLeast "0.7.0") [
|
||||
''
|
||||
Versions of stalwart-mail < 0.7.0 will get deprecated in NixOS 24.11.
|
||||
Please set services.stalwart-mail.package to pkgs.stalwart-mail to
|
||||
upgrade to the latest version.
|
||||
Please note that upgrading to version >= 0.7 requires manual
|
||||
intervention, see <https://github.com/stalwartlabs/mail-server/blob/main/UPGRADING.md>
|
||||
for upgrade instructions.
|
||||
''
|
||||
];
|
||||
|
||||
# Default config: all local
|
||||
services.stalwart-mail.settings = {
|
||||
global.tracing.method = mkDefault "stdout";
|
||||
|
@ -11,12 +11,18 @@
|
||||
, darwin
|
||||
, nix-update-script
|
||||
, nixosTests
|
||||
, rocksdb_8_3
|
||||
, rocksdb_8_11
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.6.0";
|
||||
rocksdb = rocksdb_8_3;
|
||||
# Stalwart depends on rocksdb crate:
|
||||
# https://github.com/stalwartlabs/mail-server/blob/v0.8.0/crates/store/Cargo.toml#L10
|
||||
# which expects a specific rocksdb versions:
|
||||
# https://github.com/rust-rocksdb/rust-rocksdb/blob/v0.22.0/librocksdb-sys/Cargo.toml#L3
|
||||
# See upstream issue for rocksdb 9.X support
|
||||
# https://github.com/stalwartlabs/mail-server/issues/407
|
||||
rocksdb = rocksdb_8_11;
|
||||
version = "0.8.0";
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "stalwart-mail";
|
||||
@ -26,13 +32,11 @@ rustPlatform.buildRustPackage {
|
||||
owner = "stalwartlabs";
|
||||
repo = "mail-server";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-OHwUWSUW6ovLQTxnuUrolQGhxbhp4YqKSH+ZTpe2WXc=";
|
||||
hash = "sha256-V6Gl59938AplFW7pbrbGWB42+zRQBEaTUSW0+TMBo8I=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
cargoHash = "sha256-LWA08GNCrDlSwcSAlAi58OkoLs41fL6J5DPCsacozsM=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
7088
pkgs/servers/mail/stalwart/Cargo.lock
generated
7088
pkgs/servers/mail/stalwart/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -9361,8 +9361,6 @@ with pkgs;
|
||||
inherit (darwin.apple_sdk.frameworks) AppKit;
|
||||
};
|
||||
|
||||
stalwart-mail = callPackage ../servers/mail/stalwart { };
|
||||
|
||||
jmespath = callPackage ../development/tools/jmespath { };
|
||||
|
||||
juicefs = callPackage ../tools/filesystems/juicefs { };
|
||||
@ -24085,6 +24083,17 @@ with pkgs;
|
||||
|
||||
rocksdb = callPackage ../development/libraries/rocksdb { };
|
||||
|
||||
rocksdb_8_11 = rocksdb.overrideAttrs rec {
|
||||
pname = "rocksdb";
|
||||
version = "8.11.4";
|
||||
src = fetchFromGitHub {
|
||||
owner = "facebook";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ZrU7G3xeimF3H2LRGBDHOq936u5pH/3nGecM4XEoWc8=";
|
||||
};
|
||||
};
|
||||
|
||||
rocksdb_8_3 = rocksdb.overrideAttrs rec {
|
||||
pname = "rocksdb";
|
||||
version = "8.3.2";
|
||||
@ -26566,6 +26575,23 @@ with pkgs;
|
||||
|
||||
thttpd = callPackage ../servers/http/thttpd { };
|
||||
|
||||
stalwart-mail_0_6 = (stalwart-mail.override { rocksdb_8_11 = rocksdb_8_3; }).overrideAttrs (old: rec {
|
||||
pname = "stalwart-mail_0_6";
|
||||
version = "0.6.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stalwartlabs";
|
||||
repo = "mail-server";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-OHwUWSUW6ovLQTxnuUrolQGhxbhp4YqKSH+ZTpe2WXc=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
cargoDeps = old.cargoDeps.overrideAttrs (_: {
|
||||
inherit src;
|
||||
name = "${pname}-${version}-vendor.tar.gz";
|
||||
outputHash = "sha256-mW3OXQj6DcIMO1YlTG3G+a1ORRcuvp5/h7BU+b4QbnE=";
|
||||
});
|
||||
});
|
||||
|
||||
static-web-server = callPackage ../servers/static-web-server { };
|
||||
|
||||
stone = callPackage ../servers/stone { };
|
||||
|
Loading…
Reference in New Issue
Block a user