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