mautrix-googlechat: 0.4.0 -> unstable-2023-01-25

This commit is contained in:
Nick Cao 2023-01-31 14:02:37 +08:00
parent e139718d5f
commit f2cd0189ec
No known key found for this signature in database

View file

@ -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";