5 , matrix-sdk-crypto-nodejs
15 src = fetchFromGitHub {
18 rev = "refs/tags/v${version}";
19 hash = "sha256-yD7QGsS2Em8Z95po9pGRUDmHgHe4z0j0Jnvy3IG7xKY=";
23 # TODO: Fix tfjs-node dependency
24 ./001-disable-nsfwprotection.patch
27 packageJSON = ./package.json;
29 offlineCache = fetchYarnDeps {
30 yarnLock = src + "/yarn.lock";
31 hash = "sha256-05DqddK8+136Qq/JGeiITZkVJ8Dw9K9HfACKW86989U=";
34 packageResolutions = {
35 "@matrix-org/matrix-sdk-crypto-nodejs" = "${matrix-sdk-crypto-nodejs}/lib/node_modules/@matrix-org/matrix-sdk-crypto-nodejs";
38 nativeBuildInputs = [ makeWrapper ];
51 makeWrapper ${nodejs}/bin/node "$out/bin/mjolnir" \
52 --add-flags "$out/libexec/mjolnir/deps/mjolnir/lib/index.js"
57 inherit (nixosTests) mjolnir;
62 description = "Moderation tool for Matrix";
63 homepage = "https://github.com/matrix-org/mjolnir";
65 As an all-in-one moderation tool, it can protect your server from
66 malicious invites, spam messages, and whatever else you don't want.
67 In addition to server-level protection, Mjolnir is great for communities
68 wanting to protect their rooms without having to use their personal
69 accounts for moderation.
71 The bot by default includes support for bans, redactions, anti-spam,
72 server ACLs, room directory changes, room alias transfers, account
73 deactivation, room shutdown, and more.
75 A Synapse module is also available to apply the same rulesets the bot
76 uses across an entire homeserver.
78 license = licenses.asl20;
79 maintainers = with maintainers; [ jojosch ];
80 mainProgram = "mjolnir";