1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 incremental,
7 python-dateutil,
8 twisted,
9}:
10
11buildPythonPackage rec {
12 pname = "wokkel";
13 version = "18.0.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "ralphm";
18 repo = "wokkel";
19 tag = version;
20 hash = "sha256-vIs9Zo8o7TWUTIqJG9SEHQd63aJFCRhj6k45IuxoCes=";
21 };
22
23 patches = [
24 # Fixes compat with current-day twisted
25 # https://github.com/ralphm/wokkel/pull/32 with all the CI & doc changes excluded
26 ./0001-Remove-py2-compat.patch
27 ];
28
29 postPatch = ''
30 substituteInPlace wokkel/muc.py \
31 --replace-fail "twisted.python.constants" "constantly"
32 '';
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 incremental
38 python-dateutil
39 twisted
40 ];
41
42 nativeCheckInputs = [ twisted ];
43
44 checkPhase = ''
45 runHook preCheck
46
47 trial wokkel
48
49 runHook postCheck
50 '';
51
52 pythonImportsCheck = [
53 "twisted.plugins.server"
54 "wokkel.disco"
55 "wokkel.muc"
56 "wokkel.pubsub"
57 ];
58
59 meta = {
60 description = "Twisted Jabber support library";
61 longDescription = ''
62 Wokkel is collection of enhancements on top of the Twisted networking framework, written in Python. It mostly
63 provides a testing ground for enhancements to the Jabber/XMPP protocol implementation as found in
64 Twisted Words, that are meant to eventually move there.
65 '';
66 homepage = "https://github.com/ralphm/wokkel"; # wokkel.ik.nu is dead
67 changelog = "https://github.com/ralphm/wokkel/blob/${version}/NEWS.rst";
68 license = lib.licenses.mit;
69 maintainers = [ lib.maintainers.ethancedwards8 ];
70 teams = [ lib.teams.ngi ];
71 };
72}