1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 opuslib,
6 protobuf,
7 pytestCheckHook,
8 pycrypto,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "pymumble";
14 version = "1.6.1"; # Don't upgrade to 1.7, version was yanked
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "azlux";
21 repo = "pymumble";
22 rev = "refs/tags/${version}";
23 hash = "sha256-+sT5pqdm4A2rrUcUUmvsH+iazg80+/go0zM1vr9oeuE=";
24 };
25
26 postPatch = ''
27 # Changes all `library==x.y.z` statements to just `library`
28 # So that we aren't constrained to a specific version
29 sed -i 's/\(.*\)==.*/\1/' requirements.txt
30 '';
31
32 propagatedBuildInputs = [
33 opuslib
34 protobuf
35 ];
36
37 nativeCheckInputs = [
38 pycrypto
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [
43 "pymumble_py3"
44 "pymumble_py3.constants"
45 ];
46
47 meta = with lib; {
48 description = "Library to create mumble bots";
49 homepage = "https://github.com/azlux/pymumble";
50 changelog = "https://github.com/azlux/pymumble/releases/tag/${version}";
51 license = licenses.gpl3Only;
52 maintainers = with maintainers; [ thelegy ];
53 };
54}