depot/third_party/nixpkgs/pkgs/servers/matrix-synapse/plugins/mjolnir-antispam.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

33 lines
1 KiB
Nix

{ lib, stdenv, buildPythonPackage, fetchFromGitHub, matrix-synapse-unwrapped }:
buildPythonPackage rec {
pname = "matrix-synapse-mjolnir-antispam";
version = "1.6.5";
src = fetchFromGitHub {
owner = "matrix-org";
repo = "mjolnir";
rev = "refs/tags/v${version}";
sha256 = "sha256-xejFKz2MmdjMFU0X0SdI+qXTBRAwIvkcfZPQqXB9LV0=";
};
sourceRoot = "${src.name}/synapse_antispam";
buildInputs = [ matrix-synapse-unwrapped ];
doCheck = false; # no tests
pythonImportsCheck = [ "mjolnir" ];
meta = with lib; {
description = "AntiSpam / Banlist plugin to be used with mjolnir";
longDescription = ''
Primarily meant to block invites from undesired homeservers/users,
Mjolnir's Synapse module is a way to interpret ban lists and apply
them to your entire homeserver.
'';
homepage = "https://github.com/matrix-org/mjolnir/blob/main/docs/synapse_module.md";
license = licenses.asl20;
maintainers = with maintainers; [ jojosch ];
broken = stdenv.isDarwin;
};
}