tahoe-lafs/nix/tahoe-lafs.nix

65 lines
2.0 KiB
Nix
Raw Normal View History

{ fetchFromGitHub, lib
, python
, twisted, foolscap, zfec
2019-12-09 14:48:15 +00:00
, setuptools, setuptoolsTrial, pyasn1, zope_interface
, service-identity, pyyaml, magic-wormhole, treq, appdirs
, beautifulsoup4, eliot, autobahn, cryptography, netifaces
2020-10-26 20:09:01 +00:00
, html5lib, pyutil, distro, configparser
2019-12-09 14:48:15 +00:00
}:
python.pkgs.buildPythonPackage rec {
version = "1.14.0.dev";
name = "tahoe-lafs-${version}";
src = lib.cleanSource ../.;
2019-12-09 14:48:15 +00:00
postPatch = ''
# Chroots don't have /etc/hosts and /etc/resolv.conf, so work around
# that.
for i in $(find src/allmydata/test -type f)
do
sed -i "$i" -e"s/localhost/127.0.0.1/g"
done
2019-12-10 20:29:16 +00:00
# Some tests are flaky or fail to skip when dependencies are missing.
# This list is over-zealous because it's more work to disable individual
# tests with in a module.
2019-12-18 14:04:47 +00:00
# test_system is a lot of integration-style tests that do a lot of real
# networking between many processes. They sometimes fail spuriously.
2019-12-10 20:29:16 +00:00
rm src/allmydata/test/test_system.py
2019-12-18 14:04:47 +00:00
# Many of these tests don't properly skip when i2p or tor dependencies are
# not supplied (and we are not supplying them).
2019-12-10 20:29:16 +00:00
rm src/allmydata/test/test_i2p_provider.py
rm src/allmydata/test/test_connections.py
rm src/allmydata/test/cli/test_create.py
rm src/allmydata/test/test_client.py
rm src/allmydata/test/test_runner.py
2019-12-18 14:04:47 +00:00
# Some eliot code changes behavior based on whether stdout is a tty or not
# and fails when it is not.
rm src/allmydata/test/test_eliotutil.py
2019-12-09 14:48:15 +00:00
'';
propagatedBuildInputs = with python.pkgs; [
twisted foolscap zfec appdirs
2019-12-09 14:48:15 +00:00
setuptoolsTrial pyasn1 zope_interface
service-identity pyyaml magic-wormhole treq
eliot autobahn cryptography netifaces setuptools
2020-10-26 20:09:01 +00:00
future pyutil distro configparser
2019-12-09 14:48:15 +00:00
];
checkInputs = with python.pkgs; [
hypothesis
testtools
fixtures
2019-12-10 20:29:11 +00:00
beautifulsoup4
html5lib
2020-07-28 17:00:44 +00:00
tenacity
2019-12-09 14:48:15 +00:00
];
checkPhase = ''
${python}/bin/python -m twisted.trial -j $NIX_BUILD_CORES allmydata
2019-12-09 14:48:15 +00:00
'';
}