python3.pkgs.slixmpp: fix build
Also hardcode path to gnupg and correctly run tests.
This commit is contained in:
parent
3197cd5d63
commit
6c909de29a
@ -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 {
|
buildPythonPackage rec {
|
||||||
pname = "slixmpp";
|
pname = "slixmpp";
|
||||||
version = "1.4.1";
|
version = "1.4.1";
|
||||||
|
|
||||||
disabled = pythonOlder "3.4";
|
disabled = !isPy3k;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "020acd4507fd00c38835b78b5f338db60d3df840187623e0d41ab2ca89d7ae57";
|
sha256 = "020acd4507fd00c38835b78b5f338db60d3df840187623e0d41ab2ca89d7ae57";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
patches = [
|
||||||
substituteInPlace slixmpp/thirdparty/gnupg.py \
|
(substituteAll {
|
||||||
--replace "gpgbinary='gpg'" "gpgbinary='${gnupg}/bin/gpg'"
|
src = ./hardcode-gnupg-path.patch;
|
||||||
'';
|
inherit gnupg;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ aiodns pyasn1 pyasn1-modules gnupg ];
|
propagatedBuildInputs = [ aiodns pyasn1 pyasn1-modules aiohttp ];
|
||||||
|
|
||||||
|
checkInputs = [ nose ];
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
nosetests --where=tests --exclude=live -i slixtest.py
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Elegant Python library for XMPP";
|
description = "Elegant Python library for XMPP";
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/slixmpp/plugins/xep_0027/gpg.py b/slixmpp/plugins/xep_0027/gpg.py
|
||||||
|
index a0b1df4..7cfb3bd 100644
|
||||||
|
--- a/slixmpp/plugins/xep_0027/gpg.py
|
||||||
|
+++ b/slixmpp/plugins/xep_0027/gpg.py
|
||||||
|
@@ -41,7 +41,7 @@ class XEP_0027(BasePlugin):
|
||||||
|
dependencies = set()
|
||||||
|
stanza = stanza
|
||||||
|
default_config = {
|
||||||
|
- 'gpg_binary': 'gpg',
|
||||||
|
+ 'gpg_binary': '@gnupg@/bin/gpg',
|
||||||
|
'gpg_home': '',
|
||||||
|
'use_agent': True,
|
||||||
|
'keyring': None,
|
||||||
|
diff --git a/slixmpp/thirdparty/gnupg.py b/slixmpp/thirdparty/gnupg.py
|
||||||
|
index a89289f..46dd9b7 100644
|
||||||
|
--- a/slixmpp/thirdparty/gnupg.py
|
||||||
|
+++ b/slixmpp/thirdparty/gnupg.py
|
||||||
|
@@ -468,7 +468,7 @@ class GPG(object):
|
||||||
|
}
|
||||||
|
|
||||||
|
"Encapsulate access to the gpg executable"
|
||||||
|
- def __init__(self, gpgbinary='gpg', gnupghome=None, verbose=False,
|
||||||
|
+ def __init__(self, gpgbinary='@gnupg@/bin/gpg', gnupghome=None, verbose=False,
|
||||||
|
use_agent=False, keyring=None):
|
||||||
|
"""Initialize a GPG process wrapper. Options are:
|
||||||
|
|
@ -3151,7 +3151,9 @@ in {
|
|||||||
|
|
||||||
sleekxmpp = callPackage ../development/python-modules/sleekxmpp { };
|
sleekxmpp = callPackage ../development/python-modules/sleekxmpp { };
|
||||||
|
|
||||||
slixmpp = callPackage ../development/python-modules/slixmpp { };
|
slixmpp = callPackage ../development/python-modules/slixmpp {
|
||||||
|
inherit (pkgs) gnupg;
|
||||||
|
};
|
||||||
|
|
||||||
netaddr = callPackage ../development/python-modules/netaddr { };
|
netaddr = callPackage ../development/python-modules/netaddr { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user