summary refs log tree commit diff
path: root/pkgs/servers/matrix-synapse/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/matrix-synapse/default.nix')
-rw-r--r--pkgs/servers/matrix-synapse/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix
new file mode 100644
index 00000000000..66d9e7258f4
--- /dev/null
+++ b/pkgs/servers/matrix-synapse/default.nix
@@ -0,0 +1,45 @@
+{ pkgs, stdenv, buildPythonPackage, pythonPackages, fetchurl, fetchFromGitHub }:
+let
+  matrix-angular-sdk = buildPythonPackage rec {
+    name = "matrix-angular-sdk-${version}";
+    version = "0.6.6";
+
+    src = fetchurl {
+      url = "https://pypi.python.org/packages/source/m/matrix-angular-sdk/matrix-angular-sdk-${version}.tar.gz";
+      sha256 = "1vknhmibb8gh8lng50va2cdvng5xm7vqv9dl680m3gj38pg0bv8a";
+    };
+  };
+in
+buildPythonPackage rec {
+  name = "matrix-synapse-${version}";
+  version = "0.12.0";
+
+  src = fetchFromGitHub {
+    owner = "matrix-org";
+    repo = "synapse";
+    rev = "f35f8d06ea58e2d0cdccd82924c7a44fd93f4c38";
+    sha256 = "0b0k1am9lh0qglagc06m91qs26ybv37k7wpbg5333x8jaf5d1si4";
+  };
+
+  patches = [ ./matrix-synapse.patch ];
+
+  propagatedBuildInputs = with pythonPackages; [
+    blist canonicaljson daemonize dateutil frozendict pillow pybcrypt pyasn1
+    pydenticon pymacaroons-pynacl pynacl pyopenssl pysaml2 pytz requests2
+    service-identity signedjson systemd twisted15 ujson unpaddedbase64 pyyaml
+    matrix-angular-sdk
+  ];
+
+  # Checks fail because of Tox.
+  doCheck = false;
+
+  buildInputs = with pythonPackages; [
+    mock setuptoolsTrial
+  ];
+
+  meta = {
+    homepage = https://matrix.org;
+    description = "Matrix reference homeserver";
+    license = stdenv.lib.licenses.asl20;
+  };
+}