python.pkgs.magic-wormhole: fix build mostly through adding new dependencies

This commit is contained in:
Robert Scott 2017-06-01 20:30:50 +01:00
parent f30dd71a38
commit 156ee07f3c

View File

@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonAtLeast
, nettools
, glibcLocales
, autobahn
@ -12,6 +13,10 @@
, tqdm
, python
, mock
, ipaddress
, humanize
, pyopenssl
, service-identity
}:
buildPythonPackage rec {
@ -26,7 +31,7 @@ buildPythonPackage rec {
checkInputs = [ mock ];
buildInputs = [ nettools glibcLocales ];
propagatedBuildInputs = [ autobahn cffi click hkdf pynacl spake2 tqdm ];
propagatedBuildInputs = [ autobahn cffi click hkdf pynacl spake2 tqdm ipaddress humanize pyopenssl service-identity ];
postPatch = ''
sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py
@ -34,6 +39,8 @@ buildPythonPackage rec {
# XXX: disable one test due to warning:
# setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
sed -i -e "s|def test_text_subprocess|def skip_test_text_subprocess|" src/wormhole/test/test_scripts.py
'' + lib.optionalString (pythonAtLeast "3.3") ''
sed -i -e 's|"ipaddress",||' setup.py
'';
checkPhase = ''