forked from Fachschaft/nixConfig
Enable redirects to sender using less own repositories
This commit is contained in:
parent
450edd60db
commit
00c753debc
2 changed files with 39 additions and 13 deletions
|
@ -61,12 +61,13 @@
|
|||
overlays = [
|
||||
(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
|
||||
*/
|
||||
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.
|
||||
2. Check whether sieve-rs recieved new updates that our patch needs to be rebased upon.
|
||||
3. Check whether the sieve-rs patch below that exchanges the dependency needs updates.
|
||||
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.
|
||||
'';
|
||||
prev.stalwart-mail.override (
|
||||
let
|
||||
rp = pkgs.rustPlatform;
|
||||
|
@ -78,13 +79,11 @@
|
|||
rp.buildRustPackage (
|
||||
args
|
||||
// rec {
|
||||
src = final.fetchFromGitea {
|
||||
domain = "gitea.mathebau.de";
|
||||
owner = "gonne";
|
||||
repo = "stalwart-mail";
|
||||
rev = "549b7055f6419079bf0b0ddab5367f6e6834d265"; # Depend on sieve-rs without loop prevention
|
||||
hash = "sha256-6+EyQC9hIDbmf0VGhU4XzNxtw/OgdNSOkm4dTClrowM=";
|
||||
};
|
||||
cargoPatches = [
|
||||
# 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.
|
||||
# We want to redirect to sender if we simulate alias files and not doing so barely prevents loops in my opinion.
|
||||
./sieve-rs.patch
|
||||
];
|
||||
cargoHash = "sha256-fdOU2W/EtkBk+1VmNMkFZTGbwBTQQRelrheVFhiUqlg=";
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue