From 0e9f1e85cd8c6f9d546ef88e971043b909017170 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 7 Nov 2022 20:51:39 +0100 Subject: ... --- overlays/matrix-synapse/1.70.1/plugins/default.nix | 8 ++++++ overlays/matrix-synapse/1.70.1/plugins/ldap3.nix | 17 ++++++++++++ .../1.70.1/plugins/mjolnir-antispam.nix | 32 ++++++++++++++++++++++ overlays/matrix-synapse/1.70.1/plugins/pam.nix | 15 ++++++++++ .../1.70.1/plugins/shared-secret-auth.nix | 26 ++++++++++++++++++ 5 files changed, 98 insertions(+) create mode 100644 overlays/matrix-synapse/1.70.1/plugins/default.nix create mode 100644 overlays/matrix-synapse/1.70.1/plugins/ldap3.nix create mode 100644 overlays/matrix-synapse/1.70.1/plugins/mjolnir-antispam.nix create mode 100644 overlays/matrix-synapse/1.70.1/plugins/pam.nix create mode 100644 overlays/matrix-synapse/1.70.1/plugins/shared-secret-auth.nix (limited to 'overlays/matrix-synapse/1.70.1/plugins') diff --git a/overlays/matrix-synapse/1.70.1/plugins/default.nix b/overlays/matrix-synapse/1.70.1/plugins/default.nix new file mode 100644 index 00000000..e67d9075 --- /dev/null +++ b/overlays/matrix-synapse/1.70.1/plugins/default.nix @@ -0,0 +1,8 @@ +{ callPackage }: + +{ + matrix-synapse-ldap3 = callPackage ./ldap3.nix { }; + matrix-synapse-mjolnir-antispam = callPackage ./mjolnir-antispam.nix { }; + matrix-synapse-pam = callPackage ./pam.nix { }; + matrix-synapse-shared-secret-auth = callPackage ./shared-secret-auth.nix { }; +} diff --git a/overlays/matrix-synapse/1.70.1/plugins/ldap3.nix b/overlays/matrix-synapse/1.70.1/plugins/ldap3.nix new file mode 100644 index 00000000..394c0f5e --- /dev/null +++ b/overlays/matrix-synapse/1.70.1/plugins/ldap3.nix @@ -0,0 +1,17 @@ +{ isPy3k, buildPythonPackage, fetchPypi, service-identity, ldap3, twisted, ldaptor, mock }: + +buildPythonPackage rec { + pname = "matrix-synapse-ldap3"; + version = "0.1.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "9fdf8df7c8ec756642aa0fea53b31c0b2f1924f70d7f049a2090b523125456fe"; + }; + + propagatedBuildInputs = [ service-identity ldap3 twisted ]; + + # ldaptor is not ready for py3 yet + doCheck = !isPy3k; + checkInputs = [ ldaptor mock ]; +} diff --git a/overlays/matrix-synapse/1.70.1/plugins/mjolnir-antispam.nix b/overlays/matrix-synapse/1.70.1/plugins/mjolnir-antispam.nix new file mode 100644 index 00000000..7372c2f7 --- /dev/null +++ b/overlays/matrix-synapse/1.70.1/plugins/mjolnir-antispam.nix @@ -0,0 +1,32 @@ +{ lib, buildPythonPackage, fetchFromGitHub, matrix-synapse }: + +buildPythonPackage rec { + pname = "matrix-synapse-mjolnir-antispam"; + version = "1.5.0"; + + src = fetchFromGitHub { + owner = "matrix-org"; + repo = "mjolnir"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-YmP+r9W5e63Aw66lSQeTTbYwSF/vjPyHkoehJxtcRNw="; + }; + + sourceRoot = "./source/synapse_antispam"; + + propagatedBuildInputs = [ matrix-synapse ]; + + 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#synapse-module"; + license = licenses.asl20; + maintainers = with maintainers; [ jojosch ]; + }; +} diff --git a/overlays/matrix-synapse/1.70.1/plugins/pam.nix b/overlays/matrix-synapse/1.70.1/plugins/pam.nix new file mode 100644 index 00000000..a14fe6d6 --- /dev/null +++ b/overlays/matrix-synapse/1.70.1/plugins/pam.nix @@ -0,0 +1,15 @@ +{ buildPythonPackage, fetchFromGitHub, twisted, python-pam }: + +buildPythonPackage rec { + pname = "matrix-synapse-pam"; + version = "0.1.3"; + + src = fetchFromGitHub { + owner = "14mRh4X0r"; + repo = "matrix-synapse-pam"; + rev = "v${version}"; + sha256 = "0jgz49cwiyih5cg3hr4byva04zjnq8aj7rima9874la9fc5sd2wf"; + }; + + propagatedBuildInputs = [ twisted python-pam ]; +} diff --git a/overlays/matrix-synapse/1.70.1/plugins/shared-secret-auth.nix b/overlays/matrix-synapse/1.70.1/plugins/shared-secret-auth.nix new file mode 100644 index 00000000..a6e22db3 --- /dev/null +++ b/overlays/matrix-synapse/1.70.1/plugins/shared-secret-auth.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchFromGitHub, matrix-synapse, twisted }: + +buildPythonPackage rec { + pname = "matrix-synapse-shared-secret-auth"; + version = "2.0.2"; + + src = fetchFromGitHub { + owner = "devture"; + repo = "matrix-synapse-shared-secret-auth"; + rev = version; + sha256 = "sha256-qzXKwTEOMtdvsxoU3Xh3vQyhK+Q18LfkeSts7EyDIXE="; + }; + + doCheck = false; + pythonImportsCheck = [ "shared_secret_authenticator" ]; + + buildInputs = [ matrix-synapse ]; + propagatedBuildInputs = [ twisted ]; + + meta = with lib; { + description = "Shared Secret Authenticator password provider module for Matrix Synapse"; + homepage = "https://github.com/devture/matrix-synapse-shared-secret-auth"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ sumnerevans ]; + }; +} -- cgit v1.2.3