about summary refs log tree commit diff
path: root/pkgs/development/python-modules/slixmpp/default.nix
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2019-01-13 15:24:24 +0100
committerRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2019-01-13 15:29:21 +0100
commit6c909de29a98ab205fd4b55fc5582255895c17c9 (patch)
treefeead90b6deec92b395cf469bd793b0342de235a /pkgs/development/python-modules/slixmpp/default.nix
parent3197cd5d639da20045a31a7e8fbb476723deeb2c (diff)
python3.pkgs.slixmpp: fix build
Also hardcode path to gnupg and correctly run tests.
Diffstat (limited to 'pkgs/development/python-modules/slixmpp/default.nix')
-rw-r--r--pkgs/development/python-modules/slixmpp/default.nix22
1 files changed, 15 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/slixmpp/default.nix b/pkgs/development/python-modules/slixmpp/default.nix
index 7d6d786e6d230..ed90291ba8a04 100644
--- a/pkgs/development/python-modules/slixmpp/default.nix
+++ b/pkgs/development/python-modules/slixmpp/default.nix
@@ -1,22 +1,30 @@
-{ lib, buildPythonPackage, fetchPypi, pythonOlder, fetchurl, aiodns, pyasn1, pyasn1-modules, gnupg }:
+{ lib, buildPythonPackage, fetchPypi, isPy3k, substituteAll, aiodns, pyasn1, pyasn1-modules, aiohttp, gnupg, nose }:
 
 buildPythonPackage rec {
   pname = "slixmpp";
   version = "1.4.1";
 
-  disabled = pythonOlder "3.4";
+  disabled = !isPy3k;
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "020acd4507fd00c38835b78b5f338db60d3df840187623e0d41ab2ca89d7ae57";
   };
 
-  patchPhase = ''
-    substituteInPlace slixmpp/thirdparty/gnupg.py \
-      --replace "gpgbinary='gpg'" "gpgbinary='${gnupg}/bin/gpg'"
-  '';
+  patches = [
+    (substituteAll {
+      src = ./hardcode-gnupg-path.patch;
+      inherit gnupg;
+    })
+  ];
+
+  propagatedBuildInputs = [ aiodns pyasn1 pyasn1-modules aiohttp ];
 
-  propagatedBuildInputs = [ aiodns pyasn1 pyasn1-modules gnupg ];
+  checkInputs = [ nose ];
+
+  checkPhase = ''
+    nosetests --where=tests --exclude=live -i slixtest.py
+  '';
 
   meta = {
     description = "Elegant Python library for XMPP";