mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
pythonPackages.magic-wormhole: enable tests
This commit is contained in:
parent
fdbf7dc8b3
commit
b09435ea51
@ -1,7 +1,6 @@
|
|||||||
{ fetchurl, lib, buildPythonPackage, python, autobahn
|
{ stdenv, fetchurl, nettools, glibcLocales, pythonPackages }:
|
||||||
, cffi, click, hkdf, pynacl, spake2, tqdm }:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
name = "magic-wormhole-${version}";
|
name = "magic-wormhole-${version}";
|
||||||
version = "0.8.1";
|
version = "0.8.1";
|
||||||
|
|
||||||
@ -9,18 +8,29 @@ buildPythonPackage rec {
|
|||||||
url = "mirror://pypi/m/magic-wormhole/${name}.tar.gz";
|
url = "mirror://pypi/m/magic-wormhole/${name}.tar.gz";
|
||||||
sha256 = "1yh5nbhh9z1am2pqnb5qqyq1zjl1m7z6jnkmvry2q14qwspw9had";
|
sha256 = "1yh5nbhh9z1am2pqnb5qqyq1zjl1m7z6jnkmvry2q14qwspw9had";
|
||||||
};
|
};
|
||||||
checkPhase = ''
|
|
||||||
${python.interpreter} -m wormhole.test.run_trial wormhole
|
buildInputs = [ nettools glibcLocales ];
|
||||||
|
propagatedBuildInputs = with pythonPackages; [ autobahn cffi click hkdf pynacl spake2 tqdm ];
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
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
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Several test failures, network related.
|
checkPhase = ''
|
||||||
doCheck = false;
|
export PATH="$PATH:$out/bin"
|
||||||
|
export LANG="en_US.UTF-8"
|
||||||
|
export LC_ALL="en_US.UTF-8"
|
||||||
|
${pythonPackages.python.interpreter} -m wormhole.test.run_trial wormhole
|
||||||
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [ autobahn cffi click hkdf pynacl spake2 tqdm ];
|
meta = with stdenv.lib; {
|
||||||
meta = {
|
|
||||||
description = "Securely transfer data between computers";
|
description = "Securely transfer data between computers";
|
||||||
homepage = "https://github.com/warner/magic-wormhole";
|
homepage = "https://github.com/warner/magic-wormhole";
|
||||||
license = lib.licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ asymmetric ];
|
maintainers = with maintainers; [ asymmetric ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -26273,7 +26273,9 @@ in {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
magic-wormhole = callPackage ../development/python-modules/magic-wormhole {};
|
magic-wormhole = callPackage ../development/python-modules/magic-wormhole {
|
||||||
|
pythonPackages = self;
|
||||||
|
};
|
||||||
|
|
||||||
wsgiproxy2 = buildPythonPackage rec {
|
wsgiproxy2 = buildPythonPackage rec {
|
||||||
name = "WSGIProxy2-0.4.2";
|
name = "WSGIProxy2-0.4.2";
|
||||||
|
Loading…
Reference in New Issue
Block a user