diff options
Diffstat (limited to 'pkgs/by-name/st/stalwart-mail/package.nix')
-rw-r--r-- | pkgs/by-name/st/stalwart-mail/package.nix | 74 |
1 files changed, 40 insertions, 34 deletions
diff --git a/pkgs/by-name/st/stalwart-mail/package.nix b/pkgs/by-name/st/stalwart-mail/package.nix index 7175714c8778..5c97acbb0f8b 100644 --- a/pkgs/by-name/st/stalwart-mail/package.nix +++ b/pkgs/by-name/st/stalwart-mail/package.nix @@ -2,7 +2,6 @@ lib, rustPlatform, fetchFromGitHub, - fetchpatch, pkg-config, protobuf, bzip2, @@ -26,7 +25,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.5"; in rustPlatform.buildRustPackage { pname = "stalwart-mail"; @@ -36,21 +35,11 @@ rustPlatform.buildRustPackage { owner = "stalwartlabs"; repo = "mail-server"; rev = "refs/tags/v${version}"; - hash = "sha256-9qk7+LJntEmCIuxp0707OOHBVkywlAJA1QmWllR9ZHg="; + hash = "sha256-MD9zAWeitP3cXxzR4znqL551AGFbOcRzhV3goY6l/iY="; 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-ug49H6RWLlDdJNVW/BJcqNsG/NDNgWiqR8GiZ/HVrvY="; nativeBuildInputs = [ pkg-config @@ -58,22 +47,31 @@ rustPlatform.buildRustPackage { rustPlatform.bindgenHook ]; - buildInputs = [ - bzip2 - openssl - sqlite - zstd - ] ++ lib.optionals stdenv.isLinux [ - foundationdb - ] ++ lib.optionals stdenv.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.isDarwin; - buildFeatures = lib.optional (stdenv.isDarwin) [ "sqlite" "postgres" "mysql" "rocks" "elastic" "s3" "redis" ]; + buildNoDefaultFeatures = stdenv.hostPlatform.isDarwin; + buildFeatures = lib.optional (stdenv.hostPlatform.isDarwin) [ + "sqlite" + "postgres" + "mysql" + "rocks" + "elastic" + "s3" + "redis" + ]; env = { OPENSSL_NO_VENDOR = true; @@ -143,22 +141,30 @@ rustPlatform.buildRustPackage { # Failed to read system DNS config: io error: No such file or directory (os error 2) "--skip=smtp::inbound::auth::auth" # Failed to read system DNS config: io error: No such file or directory (os error 2) + "--skip=smtp::inbound::antispam::antispam" + # Failed to read system DNS config: io error: No such file or directory (os error 2) "--skip=smtp::inbound::vrfy::vrfy_expn" ]; - doCheck = !(stdenv.isLinux && stdenv.isAarch64); + doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); passthru = { + inherit rocksdb; # make used rocksdb version available (e.g., for backup scripts) webadmin = callPackage ./webadmin.nix { }; - update-script = nix-update-script { }; + updateScript = nix-update-script { }; 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 + ]; }; } |