diff options
-rw-r--r-- | pkgs/servers/matrix-synapse/default.nix | 3 | ||||
-rw-r--r-- | pkgs/servers/matrix-synapse/tools/default.nix | 4 | ||||
-rw-r--r-- | pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state.nix | 22 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
4 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index e6266268a9358..e93c72ea51b69 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -1,12 +1,14 @@ { lib, stdenv, python3, openssl , enableSystemd ? stdenv.isLinux, nixosTests , enableRedis ? false +, callPackage }: with python3.pkgs; let plugins = python3.pkgs.callPackage ./plugins { }; + tools = callPackage ./tools { }; in buildPythonApplication rec { pname = "matrix-synapse"; @@ -68,6 +70,7 @@ buildPythonApplication rec { passthru.tests = { inherit (nixosTests) matrix-synapse; }; passthru.plugins = plugins; + passthru.tools = tools; passthru.python = python3; meta = with stdenv.lib; { diff --git a/pkgs/servers/matrix-synapse/tools/default.nix b/pkgs/servers/matrix-synapse/tools/default.nix new file mode 100644 index 0000000000000..43667f9e16de9 --- /dev/null +++ b/pkgs/servers/matrix-synapse/tools/default.nix @@ -0,0 +1,4 @@ +{ callPackage }: +{ + rust-synapse-compress-state = callPackage ./rust-synapse-compress-state.nix { }; +} diff --git a/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state.nix b/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state.nix new file mode 100644 index 0000000000000..f770da75fd0d5 --- /dev/null +++ b/pkgs/servers/matrix-synapse/tools/rust-synapse-compress-state.nix @@ -0,0 +1,22 @@ +{ lib, rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage rec { + pname = "rust-synapse-compress-state"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "matrix-org"; + repo = pname; + rev = "v${version}"; + sha256 = "15jvkpbq6pgdc91wnni8fj435yqlwqgx3bb0vqjgsdyxs5lzalfh"; + }; + + cargoSha256 = "1zdf091s0wyribsqp8l6arkablchqxmdyg2xdc57hh06p4fjiw48"; + + meta = with lib; { + description = "A tool to compress some state in a Synapse instance's database"; + homepage = "https://github.com/matrix-org/rust-synapse-compress-state"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa maralorn ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 184632f492465..3d31f892bbf40 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5222,6 +5222,8 @@ in matrix-synapse-plugins = recurseIntoAttrs matrix-synapse.plugins; + matrix-synapse-tools = recurseIntoAttrs matrix-synapse.tools; + matrix-appservice-slack = callPackage ../servers/matrix-synapse/matrix-appservice-slack {}; matrix-appservice-discord = callPackage ../servers/matrix-appservice-discord { }; |