summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/wokkel/default.nix
blob: 567610a1624a89e71cb9dd09c989acabbf3ab594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  incremental,
  python-dateutil,
  twisted,
}:

buildPythonPackage rec {
  pname = "wokkel";
  version = "18.0.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ralphm";
    repo = "wokkel";
    tag = version;
    hash = "sha256-vIs9Zo8o7TWUTIqJG9SEHQd63aJFCRhj6k45IuxoCes=";
  };

  patches = [
    # Fixes compat with current-day twisted
    # https://github.com/ralphm/wokkel/pull/32 with all the CI & doc changes excluded
    ./0001-Remove-py2-compat.patch
  ];

  postPatch = ''
    substituteInPlace wokkel/muc.py \
      --replace-fail "twisted.python.constants" "constantly"
  '';

  build-system = [ setuptools ];

  dependencies = [
    incremental
    python-dateutil
    twisted
  ];

  nativeCheckInputs = [ twisted ];

  checkPhase = ''
    runHook preCheck

    trial wokkel

    runHook postCheck
  '';

  pythonImportsCheck = [
    "twisted.plugins.server"
    "wokkel.disco"
    "wokkel.muc"
    "wokkel.pubsub"
  ];

  meta = {
    description = "Twisted Jabber support library";
    longDescription = ''
      Wokkel is collection of enhancements on top of the Twisted networking framework, written in Python. It mostly
      provides a testing ground for enhancements to the Jabber/XMPP protocol implementation as found in
      Twisted Words, that are meant to eventually move there.
    '';
    homepage = "https://github.com/ralphm/wokkel"; # wokkel.ik.nu is dead
    changelog = "https://github.com/ralphm/wokkel/blob/${version}/NEWS.rst";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.ethancedwards8 ];
    teams = [ lib.teams.ngi ];
  };
}