aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/st/stalwart-mail-free
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkgs/by-name/st/stalwart-mail-free/package.nix77
-rw-r--r--pkgs/by-name/st/stalwart-mail-free/patches/crates-main-Cargo.toml-Use-libre-features.patch25
-rw-r--r--pkgs/by-name/st/stalwart-mail-patched/mail-send.nix (renamed from pkgs/by-name/st/stalwart-mail-free/mail-send.nix)0
-rw-r--r--pkgs/by-name/st/stalwart-mail-patched/patches/crates-Use-the-platform-CA-bundle-instead-of-the-bun.patch (renamed from pkgs/by-name/st/stalwart-mail-free/patches/crates-Use-the-platform-CA-bundle-instead-of-the-bun.patch)0
-rw-r--r--pkgs/by-name/st/stalwart-mail-patched/spam-filter.nix (renamed from pkgs/by-name/st/stalwart-mail-free/spam-filter.nix)0
5 files changed, 0 insertions, 102 deletions
diff --git a/pkgs/by-name/st/stalwart-mail-free/package.nix b/pkgs/by-name/st/stalwart-mail-free/package.nix
deleted file mode 100644
index 19405c7..0000000
--- a/pkgs/by-name/st/stalwart-mail-free/package.nix
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- pkgsUnstable,
- callPackage,
- nixLib,
-}: let
- spamfilter = callPackage ./spam-filter.nix {};
-
- mail-send = callPackage ./mail-send.nix {};
-
- # Need to use the newer `rustPlatform`
- inherit (pkgsUnstable) rustPlatform;
-in
- pkgsUnstable.stalwart-mail.override {
- rustPlatform =
- rustPlatform
- // {
- buildRustPackage = prev:
- rustPlatform.buildRustPackage (
- prev
- // {
- pname = "stalwart-mail-free";
- passthru = nixLib.warnMerge (prev.passthru or {}) {
- inherit spamfilter;
- } "stalwart-mail passthru";
-
- useFetchCargoVendor = true;
- cargoHash = "sha256-FCRsmH9ZGYaf9ss3ECjZQkknIxAaDj9cedW32dWmBGY=";
-
- # The tests should check if this works.
- # And this shaves of around 50% of the build time.
- doCheck = false;
-
- buildNoDefaultFeatures = true;
- buildFeatures = [
- "rocks"
- "redis"
- ];
-
- postUnpack =
- (prev.postUnpack or "")
- + ''
- cp --recursive "${mail-send}" ./source/crates/mail-send
- chmod --recursive +w "./source/crates/mail-send"
- '';
-
- cargoPatches =
- (prev.cargoPatches or [])
- ++ [
- # `stalwart-mail` does enable their `enterprise` feature per default.
- # We want a AGPL only build (i.e., without unfree dependencies), therefore disable the
- # `enterprise` feature here.
- # We cannot use the `buildFeatures` attribute because it does not actually change the
- # correct features. As such we simply patch the correct `Cargo.toml` file.
- ./patches/crates-main-Cargo.toml-Use-libre-features.patch
-
- # `stalwart-mail` uses their bundled store, which makes it impossible to use our
- # own CA certificate (e.g., for tests). Thus use a native version.
- ./patches/crates-Use-the-platform-CA-bundle-instead-of-the-bun.patch
- ];
-
- # Check that the enterprise feature is really disabled.
- postCheck =
- (prev.postCheck or "")
- +
- # bash
- ''
- if grep "enterprise" ./target/*/release/stalwart-mail.d; then
- echo "ERROR: Proprietary 'enterprise' feature active."
- exit 1
- fi
- '';
-
- meta.mainProgram = prev.meta.mainProgram or "stalwart-mail";
- }
- );
- };
- }
diff --git a/pkgs/by-name/st/stalwart-mail-free/patches/crates-main-Cargo.toml-Use-libre-features.patch b/pkgs/by-name/st/stalwart-mail-free/patches/crates-main-Cargo.toml-Use-libre-features.patch
deleted file mode 100644
index 5844793..0000000
--- a/pkgs/by-name/st/stalwart-mail-free/patches/crates-main-Cargo.toml-Use-libre-features.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 763d22e53a9c99addbd7f9ca84f0083733f3d10d Mon Sep 17 00:00:00 2001
-From: Benedikt Peetz <benedikt.peetz@b-peetz.de>
-Date: Tue, 4 Mar 2025 19:00:15 +0100
-Subject: [PATCH] crates/main/Cargo.toml: Use libre features
-
----
- crates/main/Cargo.toml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/crates/main/Cargo.toml b/crates/main/Cargo.toml
-index 036d2dcf..709ae5da 100644
---- a/crates/main/Cargo.toml
-+++ b/crates/main/Cargo.toml
-@@ -35,7 +35,7 @@ jemallocator = "0.5.0"
-
- [features]
- #default = ["sqlite", "postgres", "mysql", "rocks", "elastic", "s3", "redis", "azure", "enterprise"]
--default = ["rocks", "enterprise"]
-+default = ["rocks", "redis"]
- sqlite = ["store/sqlite"]
- foundationdb = ["store/foundation", "common/foundation"]
- postgres = ["store/postgres"]
---
-2.47.2
-
diff --git a/pkgs/by-name/st/stalwart-mail-free/mail-send.nix b/pkgs/by-name/st/stalwart-mail-patched/mail-send.nix
index e0d8c57..e0d8c57 100644
--- a/pkgs/by-name/st/stalwart-mail-free/mail-send.nix
+++ b/pkgs/by-name/st/stalwart-mail-patched/mail-send.nix
diff --git a/pkgs/by-name/st/stalwart-mail-free/patches/crates-Use-the-platform-CA-bundle-instead-of-the-bun.patch b/pkgs/by-name/st/stalwart-mail-patched/patches/crates-Use-the-platform-CA-bundle-instead-of-the-bun.patch
index e6c3d4b..e6c3d4b 100644
--- a/pkgs/by-name/st/stalwart-mail-free/patches/crates-Use-the-platform-CA-bundle-instead-of-the-bun.patch
+++ b/pkgs/by-name/st/stalwart-mail-patched/patches/crates-Use-the-platform-CA-bundle-instead-of-the-bun.patch
diff --git a/pkgs/by-name/st/stalwart-mail-free/spam-filter.nix b/pkgs/by-name/st/stalwart-mail-patched/spam-filter.nix
index ce3466d..ce3466d 100644
--- a/pkgs/by-name/st/stalwart-mail-free/spam-filter.nix
+++ b/pkgs/by-name/st/stalwart-mail-patched/spam-filter.nix