add n0emis, some packages and pre-yate-n0emis
This commit is contained in:
4
packages/python/default.nix
Normal file
4
packages/python/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
self: super: {
|
||||
python-yate = self.callPackage ./python-yate { };
|
||||
ywsd = self.callPackage ./ywsd { };
|
||||
}
|
15
packages/python/python-yate/default.nix
Normal file
15
packages/python/python-yate/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, async-timeout }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-yate";
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "5e806802dc47a35c855b60cd459a2c98fb0109c7fc099f3e9f83a1a38abf9f90";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ async-timeout ];
|
||||
|
||||
pythonImportsCheck = [ "yate" ];
|
||||
}
|
14
packages/python/ywsd/count.patch
Normal file
14
packages/python/ywsd/count.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/ywsd/objects.py b/ywsd/objects.py
|
||||
index 4ce29fb..a535e76 100644
|
||||
--- a/ywsd/objects.py
|
||||
+++ b/ywsd/objects.py
|
||||
@@ -178,7 +178,8 @@ class ActiveCall:
|
||||
async def is_active_call(cls, username, x_eventphone_id, db_connection):
|
||||
return (
|
||||
await db_connection.scalar(
|
||||
- cls.table.count()
|
||||
+ sa.select(sa.func.count('*'))
|
||||
+ .select_from(cls.table)
|
||||
.where(cls.table.c.username == username)
|
||||
.where(cls.table.c.x_eventphone_id == x_eventphone_id)
|
||||
)
|
20
packages/python/ywsd/default.nix
Normal file
20
packages/python/ywsd/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ lib, buildPythonApplication, fetchFromGitHub, aiopg, aiohttp, python-yate
|
||||
, pyyaml, sqlalchemy }:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "ywsd";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "eventphone";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-9DloJSKR3Ck4Bsc0ICcAAD6LHIMeOHTe2rCx6nPINT4=";
|
||||
};
|
||||
|
||||
patches = [ ./count.patch ];
|
||||
|
||||
propagatedBuildInputs = [ aiopg aiohttp python-yate pyyaml sqlalchemy ];
|
||||
|
||||
doCheck = false;
|
||||
}
|
Reference in New Issue
Block a user