2023-03-13 19:19:43 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, tahoe-lafs-src
|
2023-03-13 21:02:10 +00:00
|
|
|
, extrasNames
|
2023-03-13 19:19:43 +00:00
|
|
|
|
2023-03-13 20:43:22 +00:00
|
|
|
# control how the test suite is run
|
|
|
|
, doCheck ? false
|
|
|
|
|
2023-03-13 19:19:43 +00:00
|
|
|
# always dependencies
|
|
|
|
, attrs
|
|
|
|
, autobahn
|
|
|
|
, cbor2
|
|
|
|
, click
|
|
|
|
, collections-extended
|
|
|
|
, cryptography
|
|
|
|
, distro
|
|
|
|
, eliot
|
|
|
|
, filelock
|
|
|
|
, foolscap
|
|
|
|
, future
|
|
|
|
, klein
|
|
|
|
, magic-wormhole
|
|
|
|
, netifaces
|
|
|
|
, psutil
|
|
|
|
, pycddl
|
|
|
|
, pyrsistent
|
|
|
|
, pyutil
|
|
|
|
, six
|
|
|
|
, treq
|
|
|
|
, twisted
|
|
|
|
, werkzeug
|
|
|
|
, zfec
|
|
|
|
, zope_interface
|
|
|
|
|
|
|
|
# tor extra dependencies
|
|
|
|
, txtorcon
|
|
|
|
|
|
|
|
# i2p extra dependencies
|
2023-03-13 20:02:57 +00:00
|
|
|
, txi2p
|
2023-03-13 19:19:43 +00:00
|
|
|
|
2023-03-13 20:19:07 +00:00
|
|
|
# twisted extra dependencies - if there is overlap with our dependencies we
|
|
|
|
# have to skip them since we can't have a name in the argument set twice.
|
|
|
|
, appdirs
|
|
|
|
, bcrypt
|
|
|
|
, idna
|
|
|
|
, pyasn1
|
|
|
|
, pyopenssl
|
|
|
|
, service-identity
|
|
|
|
|
2023-03-13 19:19:43 +00:00
|
|
|
# test dependencies
|
|
|
|
, beautifulsoup4
|
|
|
|
, fixtures
|
|
|
|
, hypothesis
|
|
|
|
, mock
|
|
|
|
, paramiko
|
|
|
|
, prometheus-client
|
|
|
|
, pytest
|
|
|
|
, pytest-timeout
|
|
|
|
, pytest-twisted
|
|
|
|
, tenacity
|
|
|
|
, testtools
|
|
|
|
, towncrier
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "tahoe-lafs";
|
|
|
|
version = "1.18.0.post1";
|
|
|
|
|
|
|
|
pickExtraDependencies = deps: extras: builtins.foldl' (accum: extra: accum ++ deps.${extra}) [] extras;
|
|
|
|
|
|
|
|
pythonExtraDependencies = {
|
|
|
|
tor = [ txtorcon ];
|
2023-03-13 20:02:57 +00:00
|
|
|
i2p = [ txi2p ];
|
2023-03-13 19:19:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
pythonPackageDependencies = [
|
|
|
|
attrs
|
|
|
|
autobahn
|
|
|
|
cbor2
|
|
|
|
click
|
|
|
|
collections-extended
|
|
|
|
cryptography
|
|
|
|
distro
|
|
|
|
eliot
|
|
|
|
filelock
|
|
|
|
foolscap
|
|
|
|
future
|
|
|
|
klein
|
|
|
|
magic-wormhole
|
|
|
|
netifaces
|
|
|
|
psutil
|
|
|
|
pycddl
|
|
|
|
pyrsistent
|
|
|
|
pyutil
|
|
|
|
six
|
|
|
|
treq
|
|
|
|
twisted
|
2023-03-13 20:19:07 +00:00
|
|
|
# Get the dependencies for the Twisted extras we depend on, too.
|
|
|
|
twisted.passthru.optional-dependencies.tls
|
|
|
|
twisted.passthru.optional-dependencies.conch
|
2023-03-13 19:19:43 +00:00
|
|
|
werkzeug
|
|
|
|
zfec
|
|
|
|
zope_interface
|
2023-03-13 21:02:10 +00:00
|
|
|
] ++ pickExtraDependencies pythonExtraDependencies extrasNames;
|
2023-03-13 19:19:43 +00:00
|
|
|
|
|
|
|
pythonCheckDependencies = [
|
|
|
|
beautifulsoup4
|
|
|
|
fixtures
|
|
|
|
hypothesis
|
|
|
|
mock
|
|
|
|
paramiko
|
|
|
|
prometheus-client
|
|
|
|
pytest
|
|
|
|
pytest-timeout
|
|
|
|
pytest-twisted
|
|
|
|
tenacity
|
|
|
|
testtools
|
|
|
|
towncrier
|
|
|
|
];
|
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit pname version;
|
|
|
|
src = tahoe-lafs-src;
|
2023-03-13 21:01:57 +00:00
|
|
|
propagatedBuildInputs = pythonPackageDependencies;
|
2023-03-13 20:43:22 +00:00
|
|
|
|
|
|
|
inherit doCheck;
|
2023-03-13 19:19:43 +00:00
|
|
|
checkInputs = pythonCheckDependencies;
|
2023-03-13 20:43:22 +00:00
|
|
|
checkPhase = ''
|
|
|
|
export TAHOE_LAFS_HYPOTHESIS_PROFILE=ci
|
|
|
|
python -m twisted.trial -j $NIX_BUILD_CORES allmydata
|
|
|
|
'';
|
2023-03-13 19:19:43 +00:00
|
|
|
}
|