Skip to content

Commit

Permalink
python.pkgs.magic-wormhole: fix build mostly through adding new depen…
Browse files Browse the repository at this point in the history
…dencies
  • Loading branch information
risicle committed Jun 1, 2017
1 parent f30dd71 commit 156ee07
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkgs/development/python-modules/magic-wormhole/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonAtLeast
, nettools
, glibcLocales
, autobahn
Expand All @@ -12,6 +13,10 @@
, tqdm
, python
, mock
, ipaddress
, humanize
, pyopenssl
, service-identity
}:

buildPythonPackage rec {
Expand All @@ -26,14 +31,16 @@ 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
sed -i -e "s|if (os.path.dirname(os.path.abspath(wormhole))|if not os.path.abspath(wormhole).startswith('/nix/store') and (os.path.dirname(os.path.abspath(wormhole))|" src/wormhole/test/test_scripts.py
# 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 = ''
Expand Down

0 comments on commit 156ee07

Please sign in to comment.