nixpkgs/pkgs/development/python-modules/mautrix-appservice/default.nix
Maximilian Bosch 22470fff35
mautrix-telegram: fix build
With updating `pluggy` to `0.13.0`[1] the way how python modules are
imported during pytest changed which broke all modules that had a
`coding: future_fstrings` annotation at the top which used to be needed
for python <=3.5. This only affected the tests, deploying a
`mautrix-telegram` from master with `doCheck = false;` works fine.

I applied a patch for `mautrix-telegram` which drops python 3.5 compat
(this package is intended to be used as application with python 3.7, so this
should be fine on master/unstable) and modified `mautrix-appservice`
accordingly as a lot of things on master changed since their last
release, so applying a patch didn't work there.

Resolves #71996

[1] faf8cfba4e
2019-10-26 10:58:56 +02:00

33 lines
793 B
Nix

{ lib, buildPythonPackage, fetchPypi, aiohttp, future-fstrings, pythonOlder }:
buildPythonPackage rec {
pname = "mautrix-appservice";
version = "0.3.11";
src = fetchPypi {
inherit pname version;
sha256 = "60192920cff75afdd096eea3a43276e33ec15f4f00bd04d2d1dda616c84f22a5";
};
patches = lib.optional (!(pythonOlder "3.6")) [
./0001-Remove-coding-annotations.patch
];
propagatedBuildInputs = [
aiohttp
future-fstrings
];
# No tests available
doCheck = false;
disabled = pythonOlder "3.5";
meta = with lib; {
homepage = https://github.com/tulir/mautrix-appservice-python;
description = "A Python 3 asyncio-based Matrix application service framework";
license = licenses.mit;
maintainers = with maintainers; [ nyanloutre ];
};
}