forked from mirrors/nixpkgs
Merge pull request #213717 from NickCao/mautrix
python3Packages.mautrix: 0.18.9 -> 0.19.3
This commit is contained in:
commit
f70192f2b9
|
@ -1,40 +1,67 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
, aiohttp
|
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, sqlalchemy
|
# deps
|
||||||
, ruamel-yaml
|
, aiohttp
|
||||||
, CommonMark
|
, attrs
|
||||||
, lxml
|
, yarl
|
||||||
|
# optional deps
|
||||||
|
, python-magic
|
||||||
|
, python-olm
|
||||||
|
, unpaddedbase64
|
||||||
|
, pycryptodome
|
||||||
|
# check deps
|
||||||
|
, pytestCheckHook
|
||||||
|
, pytest-asyncio
|
||||||
, aiosqlite
|
, aiosqlite
|
||||||
|
, sqlalchemy
|
||||||
|
, asyncpg
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "mautrix";
|
pname = "mautrix";
|
||||||
version = "0.18.9";
|
version = "0.19.3";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "mautrix";
|
||||||
hash = "sha256-Ihaz/izB9L6osu3CPwBWOwLZ2JOLKhsDuqOUf/B02qI=";
|
repo = "python";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-7nvy2/DUS2BkcyQUUG8+aT/JHcPu141e5YWOiccS6cU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
aiohttp
|
aiohttp
|
||||||
|
attrs
|
||||||
# defined in optional-requirements.txt
|
yarl
|
||||||
sqlalchemy
|
|
||||||
aiosqlite
|
|
||||||
ruamel-yaml
|
|
||||||
CommonMark
|
|
||||||
lxml
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# no tests available
|
passthru.optional-dependencies = {
|
||||||
doCheck = false;
|
detect_mimetype = [
|
||||||
|
python-magic
|
||||||
|
];
|
||||||
|
encryption = [
|
||||||
|
python-olm
|
||||||
|
unpaddedbase64
|
||||||
|
pycryptodome
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytest-asyncio
|
||||||
|
aiosqlite
|
||||||
|
sqlalchemy
|
||||||
|
asyncpg
|
||||||
|
] ++ passthru.optional-dependencies.encryption;
|
||||||
|
|
||||||
|
SQLALCHEMY_SILENCE_UBER_WARNING = 1;
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
"mautrix"
|
"mautrix"
|
||||||
|
@ -45,6 +72,6 @@ buildPythonPackage rec {
|
||||||
homepage = "https://github.com/tulir/mautrix-python";
|
homepage = "https://github.com/tulir/mautrix-python";
|
||||||
changelog = "https://github.com/mautrix/python/releases/tag/v${version}";
|
changelog = "https://github.com/mautrix/python/releases/tag/v${version}";
|
||||||
license = licenses.mpl20;
|
license = licenses.mpl20;
|
||||||
maintainers = with maintainers; [ nyanloutre ma27 sumnerevans ];
|
maintainers = with maintainers; [ nyanloutre ma27 sumnerevans nickcao ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,17 +4,18 @@ let
|
||||||
python = python3.override {
|
python = python3.override {
|
||||||
packageOverrides = self: super: {
|
packageOverrides = self: super: {
|
||||||
mautrix = super.mautrix.overridePythonAttrs (oldAttrs: rec {
|
mautrix = super.mautrix.overridePythonAttrs (oldAttrs: rec {
|
||||||
version = "0.16.3";
|
version = "0.16.10";
|
||||||
src = oldAttrs.src.override {
|
src = fetchFromGitHub {
|
||||||
inherit (oldAttrs) pname;
|
owner = "mautrix";
|
||||||
inherit version;
|
repo = "python";
|
||||||
hash = "sha256-OpHLh5pCzGooQ5yxAa0+85m/szAafV+l+OfipQcfLtU=";
|
rev = "v${version}";
|
||||||
|
hash = "sha256-YQsQ7M+mHcRdGUZp+mo46AlBmKSdmlgRdGieEG0Hu9k=";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in
|
||||||
in python.pkgs.buildPythonApplication rec {
|
python.pkgs.buildPythonApplication rec {
|
||||||
pname = "heisenbridge";
|
pname = "heisenbridge";
|
||||||
version = "1.13.1";
|
version = "1.13.1";
|
||||||
|
|
||||||
|
@ -30,11 +31,10 @@ in python.pkgs.buildPythonApplication rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = with python.pkgs; [
|
propagatedBuildInputs = with python.pkgs; [
|
||||||
aiohttp
|
|
||||||
irc
|
irc
|
||||||
|
ruamel-yaml
|
||||||
mautrix
|
mautrix
|
||||||
python-socks
|
python-socks
|
||||||
pyyaml
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = with python.pkgs; [
|
nativeCheckInputs = with python.pkgs; [
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
{ fetchFromGitHub, fetchpatch
|
{ fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, lib
|
, lib
|
||||||
, python3
|
, python3
|
||||||
, protobuf3_20
|
, enableE2be ? true
|
||||||
, enableE2be ? true, enableMetrics ? true, enableSqlite ? true
|
, enableMetrics ? true
|
||||||
|
, enableSqlite ? true
|
||||||
}: python3.pkgs.buildPythonApplication rec {
|
}: python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "mautrix-googlechat";
|
pname = "mautrix-googlechat";
|
||||||
version = "0.4.0";
|
version = "unstable-2023-01-25";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mautrix";
|
owner = "mautrix";
|
||||||
repo = "googlechat";
|
repo = "googlechat";
|
||||||
rev = "v${version}";
|
rev = "e2eb528745466468f059c506c22e500e0cd832aa";
|
||||||
sha256 = "sha256-UVWYT0HTOUEkBG0n6KNhCSSO/2PAF1rIvCaw478z+q0=";
|
sha256 = "sha256-FNlEHzuy89RuFUwZPmVA+4AmpQHGD+18BguGC6qBdBM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -24,13 +26,6 @@
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
sed -i requirements.txt \
|
|
||||||
-e 's/asyncpg>=.*/asyncpg/'
|
|
||||||
'';
|
|
||||||
|
|
||||||
baseConfigPath = "share/mautrix-googlechat/example-config.yaml";
|
baseConfigPath = "share/mautrix-googlechat/example-config.yaml";
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm $out/example-config.yaml
|
rm $out/example-config.yaml
|
||||||
|
@ -43,8 +38,12 @@
|
||||||
pycryptodome
|
pycryptodome
|
||||||
unpaddedbase64
|
unpaddedbase64
|
||||||
];
|
];
|
||||||
metrics = [ prometheus-client ];
|
metrics = [
|
||||||
sqlite = [ aiosqlite ];
|
prometheus-client
|
||||||
|
];
|
||||||
|
sqlite = [
|
||||||
|
aiosqlite
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
|
@ -54,14 +53,14 @@
|
||||||
ruamel-yaml
|
ruamel-yaml
|
||||||
CommonMark
|
CommonMark
|
||||||
python-magic
|
python-magic
|
||||||
(protobuf.override {
|
protobuf3
|
||||||
protobuf = protobuf3_20;
|
|
||||||
})
|
|
||||||
mautrix
|
mautrix
|
||||||
] ++ lib.optionals enableE2be passthru.optional-dependencies.e2be
|
] ++ lib.optionals enableE2be passthru.optional-dependencies.e2be
|
||||||
++ lib.optionals enableMetrics passthru.optional-dependencies.metrics
|
++ lib.optionals enableMetrics passthru.optional-dependencies.metrics
|
||||||
++ lib.optionals enableSqlite passthru.optional-dependencies.sqlite;
|
++ lib.optionals enableSqlite passthru.optional-dependencies.sqlite;
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/mautrix/googlechat";
|
homepage = "https://github.com/mautrix/googlechat";
|
||||||
description = "A Matrix-Google Chat puppeting bridge";
|
description = "A Matrix-Google Chat puppeting bridge";
|
||||||
|
|
|
@ -11,6 +11,20 @@ python3.pkgs.buildPythonPackage rec {
|
||||||
sha256 = "sha256-UbetU1n9zD/mVFaJc9FECDq/Zell1TI/aYPsGXGB8Js=";
|
sha256 = "sha256-UbetU1n9zD/mVFaJc9FECDq/Zell1TI/aYPsGXGB8Js=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# the version mangling in mautrix_signal/get_version.py interacts badly with pythonRelaxDepsHook
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace 'version=version' 'version="${version}"'
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = with python3.pkgs; [
|
||||||
|
pythonRelaxDepsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonRelaxDeps = [
|
||||||
|
"mautrix"
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
CommonMark
|
CommonMark
|
||||||
aiohttp
|
aiohttp
|
||||||
|
@ -31,12 +45,6 @@ python3.pkgs.buildPythonPackage rec {
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace requirements.txt \
|
|
||||||
--replace "asyncpg>=0.20,<0.26" "asyncpg>=0.20" \
|
|
||||||
--replace "mautrix>=0.16.0,<0.17" "mautrix>=0.16.0"
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
|
|
|
@ -9,28 +9,31 @@ let
|
||||||
python = python3.override {
|
python = python3.override {
|
||||||
packageOverrides = self: super: {
|
packageOverrides = self: super: {
|
||||||
tulir-telethon = self.telethon.overridePythonAttrs (oldAttrs: rec {
|
tulir-telethon = self.telethon.overridePythonAttrs (oldAttrs: rec {
|
||||||
version = "1.27.0a1";
|
version = "1.27.0a7";
|
||||||
pname = "tulir-telethon";
|
pname = "tulir-telethon";
|
||||||
src = super.fetchPypi {
|
src = super.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-tABAY4UlTyMK1ZafIFawegjBAtcnq3HMNbE1L6WaT3E=";
|
sha256 = "sha256-w4WILvLvJBKf3Nlj0omTCDDD4z+b0XFlCplQ/IHwIPs=";
|
||||||
};
|
};
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in python.pkgs.buildPythonPackage rec {
|
in
|
||||||
|
python.pkgs.buildPythonPackage rec {
|
||||||
pname = "mautrix-telegram";
|
pname = "mautrix-telegram";
|
||||||
version = "0.12.2";
|
version = "unstable-2023-01-28";
|
||||||
disabled = python.pythonOlder "3.8";
|
disabled = python.pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mautrix";
|
owner = "mautrix";
|
||||||
repo = "telegram";
|
repo = "telegram";
|
||||||
rev = "v${version}";
|
rev = "f12abbe03846fd5897d58572ab24b70a58b337d2";
|
||||||
sha256 = "sha256-htCk0VLr6GfXbpYWF/2bmpko7gSVlkH6HwDjOMhW8is=";
|
sha256 = "sha256-5ZZ85FOmTO26q2zhAIsF7mTlN4BLNLW2dQF+0culkUM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
patches = [ ./0001-Re-add-entrypoint.patch ];
|
patches = [ ./0001-Re-add-entrypoint.patch ];
|
||||||
|
|
||||||
propagatedBuildInputs = with python.pkgs; ([
|
propagatedBuildInputs = with python.pkgs; ([
|
||||||
|
@ -43,19 +46,24 @@ in python.pkgs.buildPythonPackage rec {
|
||||||
tulir-telethon
|
tulir-telethon
|
||||||
asyncpg
|
asyncpg
|
||||||
Mako
|
Mako
|
||||||
# optional
|
# speedups
|
||||||
cryptg
|
cryptg
|
||||||
cchardet
|
|
||||||
aiodns
|
aiodns
|
||||||
brotli
|
brotli
|
||||||
|
# qr_login
|
||||||
pillow
|
pillow
|
||||||
qrcode
|
qrcode
|
||||||
|
# formattednumbers
|
||||||
phonenumbers
|
phonenumbers
|
||||||
|
# metrics
|
||||||
prometheus-client
|
prometheus-client
|
||||||
|
# sqlite
|
||||||
aiosqlite
|
aiosqlite
|
||||||
] ++ lib.optionals withHQthumbnails [
|
] ++ lib.optionals withHQthumbnails [
|
||||||
|
# hq_thumbnails
|
||||||
moviepy
|
moviepy
|
||||||
] ++ lib.optionals withE2BE [
|
] ++ lib.optionals withE2BE [
|
||||||
|
# e2be
|
||||||
python-olm
|
python-olm
|
||||||
pycryptodome
|
pycryptodome
|
||||||
unpaddedbase64
|
unpaddedbase64
|
||||||
|
|
Loading…
Reference in a new issue