about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pymumble/default.nix
blob: bc15652d7027edbd30f6bbd8f239a0ca63eb4ca9 (plain) (blame)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  opuslib,
  protobuf,
  pytestCheckHook,
  pycrypto,
  pythonOlder,
}:

buildPythonPackage rec {
  pname = "pymumble";
  version = "1.6.1"; # Don't upgrade to 1.7, version was yanked
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "azlux";
    repo = "pymumble";
    rev = "refs/tags/${version}";
    hash = "sha256-+sT5pqdm4A2rrUcUUmvsH+iazg80+/go0zM1vr9oeuE=";
  };

  postPatch = ''
    # Changes all `library==x.y.z` statements to just `library`
    # So that we aren't constrained to a specific version
    sed -i 's/\(.*\)==.*/\1/' requirements.txt
  '';

  propagatedBuildInputs = [
    opuslib
    protobuf
  ];

  nativeCheckInputs = [
    pycrypto
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "pymumble_py3"
    "pymumble_py3.constants"
  ];

  meta = with lib; {
    description = "Library to create mumble bots";
    homepage = "https://github.com/azlux/pymumble";
    changelog = "https://github.com/azlux/pymumble/releases/tag/${version}";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ thelegy ];
  };
}