forked from Fachschaft/nixConfig
Enable redirects to sender using less own repositories
This commit is contained in:
parent
ca5aefa0b9
commit
86e1841131
2 changed files with 41 additions and 14 deletions
|
@ -59,14 +59,16 @@
|
||||||
config.permittedInsecurePackages = ["jitsi-meet-1.0.8043"];
|
config.permittedInsecurePackages = ["jitsi-meet-1.0.8043"];
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev: {
|
(_: 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
|
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.";
|
stalwart-mail = assert lib.assertMsg (prev.stalwart-mail.version == "0.11.6-unstable-2025-02-04") ''
|
||||||
/*
|
1. If the bug https://github.com/stalwartlabs/sieve/issues/11 is resolved to our satisfaction, try to remove this overlay.
|
||||||
prev.stalwart-mail.overrideAttrs (
|
2. Check whether sieve-rs recieved new updates that our patch needs to be rebased upon.
|
||||||
finalAttrs: prevAttrs:
|
3. Check whether the sieve-rs patch below that exchanges the dependency needs updates.
|
||||||
prevAttrs
|
4. Then update the version comparison in this assert statement.
|
||||||
*/
|
5. Update the `cargoHash` by setting it to `lib.fakeHash` and then inserting the result.
|
||||||
|
6. Check if we can get rid of alias-to-sieve when stalwart-mail has a builtin alias feature.
|
||||||
|
'';
|
||||||
prev.stalwart-mail.override (
|
prev.stalwart-mail.override (
|
||||||
let
|
let
|
||||||
rp = pkgs.rustPlatform;
|
rp = pkgs.rustPlatform;
|
||||||
|
@ -78,13 +80,11 @@
|
||||||
rp.buildRustPackage (
|
rp.buildRustPackage (
|
||||||
args
|
args
|
||||||
// rec {
|
// rec {
|
||||||
src = final.fetchFromGitea {
|
cargoPatches = [
|
||||||
domain = "gitea.mathebau.de";
|
# Let stalwart-mail depend on our own version of the sieve crate that does not have some “loop prevention” that disables redirects to the original sender.
|
||||||
owner = "gonne";
|
# We want to redirect to sender if we simulate alias files and not doing so barely prevents loops in my opinion.
|
||||||
repo = "stalwart-mail";
|
./sieve-rs.patch
|
||||||
rev = "549b7055f6419079bf0b0ddab5367f6e6834d265"; # Depend on sieve-rs without loop prevention
|
];
|
||||||
hash = "sha256-6+EyQC9hIDbmf0VGhU4XzNxtw/OgdNSOkm4dTClrowM=";
|
|
||||||
};
|
|
||||||
cargoHash = "sha256-fdOU2W/EtkBk+1VmNMkFZTGbwBTQQRelrheVFhiUqlg=";
|
cargoHash = "sha256-fdOU2W/EtkBk+1VmNMkFZTGbwBTQQRelrheVFhiUqlg=";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
27
sieve-rs.patch
Normal file
27
sieve-rs.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
diff --git a/Cargo.lock b/Cargo.lock
|
||||||
|
index be36759b..b4316639 100644
|
||||||
|
--- a/Cargo.lock
|
||||||
|
+++ b/Cargo.lock
|
||||||
|
@@ -6404,8 +6404,7 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||||
|
[[package]]
|
||||||
|
name = "sieve-rs"
|
||||||
|
version = "0.6.0"
|
||||||
|
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
-checksum = "15ac54053752c25a0e545dd1953de716abcc80b12cfe0b6c2f2c1c73759d4f45"
|
||||||
|
+source = "git+https://gitea.mathebau.de/Gonne/sieve-rs.git#71324550504c0f84fe3e814d05cbe22f90a3b228"
|
||||||
|
dependencies = [
|
||||||
|
"ahash 0.8.11",
|
||||||
|
"bincode",
|
||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index f055474f..2b64c9ac 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -63,3 +63,7 @@ incremental = false
|
||||||
|
debug-assertions = false
|
||||||
|
overflow-checks = false
|
||||||
|
rpath = false
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+[patch.crates-io]
|
||||||
|
+sieve-rs = { git = 'https://gitea.mathebau.de/Gonne/sieve-rs.git' }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue