about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pymumble/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pymumble/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pymumble/default.nix41
1 files changed, 30 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pymumble/default.nix b/nixpkgs/pkgs/development/python-modules/pymumble/default.nix
index 6e72309a58d3..45c193899fe0 100644
--- a/nixpkgs/pkgs/development/python-modules/pymumble/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pymumble/default.nix
@@ -1,31 +1,50 @@
-{ buildPythonPackage,
-  fetchFromGitHub,
-  isPy27,
-  lib,
-  opuslib,
-  protobuf,
+{ buildPythonPackage
+, fetchFromGitHub
+, fetchpatch
+, isPy27
+, lib
+, opuslib
+, protobuf
+, pytestCheckHook
+, pycrypto
 }:
 
 buildPythonPackage rec {
   pname = "pymumble";
-  version = "0.3.1";
+  version = "1.6";
   disabled = isPy27;
 
   src = fetchFromGitHub {
     owner = "azlux";
     repo = "pymumble";
-    rev = "1dd6d6d4df2fdef33202f17e2acf3ba9678a5737";
-    sha256 = "1r1sch8xrpbzffsb72lhp5xjr3ac3xb599n44vsfmaam3xklz6vz";
+    rev = version;
+    sha256 = "04nc66d554a98mbmdgzgsg6ncaz0jsn4zdr3mr14w6wnhrxpjkrs";
   };
+  patches = [
+    # Compatibility with pycryptodome (which is what our pycrypto really is)
+    # See https://github.com/azlux/pymumble/pull/99
+    (fetchpatch {
+      url = "https://github.com/azlux/pymumble/pull/99/commits/b85548a0e1deaac820954b1c0b308af214311a14.patch";
+      sha256 = "0w9dpc87rny6vmhi634pih1p97b67jm26qajscpa9wp6nphdlxlj";
+    })
+  ];
+
+  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 ];
 
+  checkInputs = [ pytestCheckHook pycrypto ];
+
   pythonImportsCheck = [ "pymumble_py3" ];
 
   meta = with lib; {
     description = "Python 3 version of pymumble, Mumble library used for multiple uses like making mumble bot.";
     homepage = "https://github.com/azlux/pymumble";
-    license = licenses.gpl3;
-    maintainers = with maintainers; [ thelegy ];
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ thelegy infinisil ];
   };
 }