Merge pull request #128048 from dali99/add-txredisapi-synapse
Add txredisapi to matrix-synapse dependencies
This commit is contained in:
commit
eb5013d20d
6 changed files with 60 additions and 1 deletions
|
@ -161,6 +161,7 @@ with lib.maintainers; {
|
|||
ekleog
|
||||
ralith
|
||||
mjlbach
|
||||
dandellion
|
||||
];
|
||||
scope = "Maintain the ecosystem around Matrix, a decentralized messenger.";
|
||||
};
|
||||
|
|
|
@ -431,6 +431,7 @@ in
|
|||
trezord = handleTest ./trezord.nix {};
|
||||
trickster = handleTest ./trickster.nix {};
|
||||
trilium-server = handleTestOn ["x86_64-linux"] ./trilium-server.nix {};
|
||||
txredisapi = handleTest ./txredisapi.nix {};
|
||||
tuptime = handleTest ./tuptime.nix {};
|
||||
turbovnc-headless-server = handleTest ./turbovnc-headless-server.nix {};
|
||||
ucarp = handleTest ./ucarp.nix {};
|
||||
|
|
27
nixos/tests/txredisapi.nix
Normal file
27
nixos/tests/txredisapi.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
{
|
||||
name = "txredisapi";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ dandellion ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
machine =
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.redis.enable = true;
|
||||
services.redis.unixSocket = "/run/redis/redis.sock";
|
||||
|
||||
environment.systemPackages = with pkgs; [ (python38.withPackages (ps: [ ps.twisted ps.txredisapi ps.mock ]))];
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("redis")
|
||||
machine.wait_for_open_port("6379")
|
||||
|
||||
tests = machine.succeed("PYTHONPATH=\"${pkgs.python3Packages.txredisapi.src}\" python -m twisted.trial ${pkgs.python3Packages.txredisapi.src}/tests")
|
||||
'';
|
||||
})
|
28
pkgs/development/python-modules/txredisapi/default.nix
Normal file
28
pkgs/development/python-modules/txredisapi/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, nixosTests, six, twisted }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "txredisapi";
|
||||
version = "1.4.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "IlyaSkriblovsky";
|
||||
repo = "txredisapi";
|
||||
rev = "1.4.7";
|
||||
sha256 = "1f7j3c5l7jcfphvsk7nqmgyb4jaydbzq081m555kw0f9xxak0pgq";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ six twisted ];
|
||||
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "txredisapi" ];
|
||||
|
||||
passthru.tests.unit-tests = nixosTests.txredisapi;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/IlyaSkriblovsky/txredisapi";
|
||||
description = "non-blocking redis client for python";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ dandellion ];
|
||||
};
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ buildPythonApplication rec {
|
|||
typing-extensions
|
||||
unpaddedbase64
|
||||
] ++ lib.optional enableSystemd systemd
|
||||
++ lib.optional enableRedis hiredis;
|
||||
++ lib.optionals enableRedis [ hiredis txredisapi ];
|
||||
|
||||
checkInputs = [ mock parameterized openssl ];
|
||||
|
||||
|
|
|
@ -8711,6 +8711,8 @@ in {
|
|||
|
||||
txgithub = callPackage ../development/python-modules/txgithub { };
|
||||
|
||||
txredisapi = callPackage ../development/python-modules/txredisapi { };
|
||||
|
||||
txrequests = callPackage ../development/python-modules/txrequests { };
|
||||
|
||||
txtorcon = callPackage ../development/python-modules/txtorcon { };
|
||||
|
|
Loading…
Reference in a new issue