Build failing dependency to make sure it is correctly included.

This commit is contained in:
Gonne 2025-02-23 22:23:36 +01:00
parent 184ca03624
commit 475c0c20bb
3 changed files with 27 additions and 8356 deletions

8323
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -62,18 +62,34 @@
(final: prev: {
alias-to-sieve = inputs.alias-to-sieve.packages.x86_64-linux.default; # add custom package to convert alias files to sieve scripts on the stalwart machine
stalwart-mail = assert lib.assertMsg (prev.stalwart-mail.version == "0.11.6-unstable-2025-02-04") "Copy the Cargo.lock file from upstream and reintroduce the patch to sieve-rs, then update this assert statement.";
prev.stalwart-mail.overrideAttrs (
finalAttrs: prevAttrs:
prevAttrs
// rec {
cargoDeps = final.rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
/*
prev.stalwart-mail.overrideAttrs (
finalAttrs: prevAttrs:
prevAttrs
*/
prev.stalwart-mail.override (
let
rp = pkgs.rustPlatform;
in {
rustPlatform =
rp
// {
buildRustPackage = args:
rp.buildRustPackage (
args
// rec {
src = final.fetchFromGitea {
domain = "gitea.mathebau.de";
owner = "gonne";
repo = "stalwart-mail";
rev = "b5405060cd3cebc86e66b46510b0a8efb23a1c5a"; # Working dependency on broken sieve-rs
hash = "sha256-+dcJ2aJ/DVcJIIp22gfmNJicI3w2Kc3K45bERlixtGo=";
};
cargoHash = "sha256-qs06nkl9/zPoMcUiHTdEcXq25S0X/6kKhmyP86xWu5Q=";
}
);
};
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
cargoHash = "";
}
}
);
})
];

View file

@ -1,22 +0,0 @@
diff --git a/src/runtime/actions/action_redirect.rs b/src/runtime/actions/action_redirect.rs
index 5b4599d..bfb46b0 100644
--- a/src/runtime/actions/action_redirect.rs
+++ b/src/runtime/actions/action_redirect.rs
@@ -41,17 +41,6 @@ impl Redirect {
.count()
< ctx.runtime.max_received_headers
{
- // Try to avoid forwarding loops
- if !self.list
- && (address.eq_ignore_ascii_case(ctx.user_address.as_ref())
- || ctx.envelope.iter().any(|(e, v)| {
- matches!(e, Envelope::From)
- && v.to_string().eq_ignore_ascii_case(address.as_str())
- }))
- {
- return;
- }
-
if !self.copy && matches!(&ctx.final_event, Some(Event::Keep { .. })) {
ctx.final_event = None;
}