diff --git a/pkgs/servers/matrix-synapse/sliding-sync/default.nix b/pkgs/servers/matrix-synapse/sliding-sync/default.nix new file mode 100644 index 000000000000..a2c6f79fb338 --- /dev/null +++ b/pkgs/servers/matrix-synapse/sliding-sync/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "matrix-sliding-sync"; + version = "0.99.3"; + + src = fetchFromGitHub { + owner = "matrix-org"; + repo = "sliding-sync"; + rev = "v${version}"; + hash = "sha256-lmmOq0gkvrIXQmy3rbTga0cC85t0LWjDOqrH1NWUpdA="; + }; + + vendorHash = "sha256-447P2TbBUEHmHubHiiZCrFVCj2/tmEuYFzLo27UyCk4="; + + subPackages = [ "cmd/syncv3" ]; + + ldflags = [ + "-s" + "-w" + "-X main.GitCommit=${src.rev}" + ]; + + # requires a running matrix-synapse + doCheck = false; + + meta = with lib; { + description = "A sliding sync implementation of MSC3575 for matrix"; + homepage = "https://github.com/matrix-org/sliding-sync"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ SuperSandro2000 emilylange ]; + mainProgram = "syncv3"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e1e5ba389773..c117333ee4e0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9544,6 +9544,8 @@ with pkgs; matrix-conduit = callPackage ../servers/matrix-conduit { }; + matrix-sliding-sync = callPackage ../servers/matrix-synapse/sliding-sync { }; + matrix-synapse = callPackage ../servers/matrix-synapse { }; matrix-synapse-plugins = recurseIntoAttrs matrix-synapse.plugins;