Skip to content

Commit

Permalink
fix: matix-synapse
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Jan 9, 2025
1 parent b5b5748 commit b9c0fd7
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 23 deletions.
23 changes: 20 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
ref = "nixpkgs-unstable";
};

# TODO: remove after https://github.com/NixOS/nixpkgs/pull/371815
nixpkgs-regression.url = "github:Mic92/nixpkgs/matrix-synapse";

# lix a good fork of nix
lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
Expand Down
9 changes: 7 additions & 2 deletions modules/base/nix/overlays/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ self, config, ... }:
{
self,
inputs,
config,
...
}:
{
nixpkgs.overlays = [
# i want to use my own overlays
Expand All @@ -8,7 +13,7 @@

# this file exists to work around issues with nixpkgs that may arise
# hopefully that means its empty a lot
(final: prev: import ./fixes.nix final prev)
(final: prev: import ./fixes.nix { inherit final prev inputs; })

# we minimize the amount of packages that are installed
(_: prev: import ./nix.nix { inherit config prev; })
Expand Down
23 changes: 5 additions & 18 deletions modules/base/nix/overlays/fixes.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
_: prev: {
{ inputs, prev, ... }:
{
# https://github.com/NixOS/nixpkgs/pull/371815
matrix-synapse-unwrapped = prev.matrix-synapse-unwrapped.overrideAttrs (oa: {
patches = [
(prev.fetchpatch2 {
url = "https://github.com/element-hq/synapse/commit/3eb92369ca14012a07da2fbf9250e66f66afb710.patch";
sha256 = "sha256-VDn3kQy23+QC2WKhWfe0FrUOnLuI1YwH5GxdTTVWt+A=";
})
];

postPatch =
oa.postPatch or ""
+ ''
substituteInPlace tests/storage/databases/main/test_events_worker.py \
--replace-fail "def test_recovery" "def no_test_recovery"
'';

nativeCheckInputs = builtins.filter (p: !p.meta.broken) oa.nativeCheckInputs;
});
inherit (inputs.nixpkgs-regression.legacyPackages.${prev.stdenv.hostPlatform.system})
matrix-synapse-unwrapped
;
}
2 changes: 2 additions & 0 deletions modules/base/nix/substituters.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
beapkgs.cache.enable = true;

# substituters to use
nix.settings = {
# don't worry that you cannot see cache.nixos.org here, it is added by default
Expand Down

0 comments on commit b9c0fd7

Please sign in to comment.