2023-03-13 21:10:29 +00:00
|
|
|
{ lib
|
2023-03-13 23:03:26 +00:00
|
|
|
, pythonPackages
|
2023-03-13 21:10:29 +00:00
|
|
|
, buildPythonPackage
|
2023-03-13 19:19:43 +00:00
|
|
|
, 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
|
2023-03-13 23:03:26 +00:00
|
|
|
, doCheck
|
2023-03-13 19:19:43 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "tahoe-lafs";
|
|
|
|
version = "1.18.0.post1";
|
|
|
|
|
|
|
|
pickExtraDependencies = deps: extras: builtins.foldl' (accum: extra: accum ++ deps.${extra}) [] extras;
|
|
|
|
|
2023-03-13 23:03:26 +00:00
|
|
|
pythonExtraDependencies = with pythonPackages; {
|
2023-03-13 19:19:43 +00:00
|
|
|
tor = [ txtorcon ];
|
2023-03-13 20:02:57 +00:00
|
|
|
i2p = [ txi2p ];
|
2023-03-13 19:19:43 +00:00
|
|
|
};
|
|
|
|
|
2023-03-13 23:03:26 +00:00
|
|
|
pythonPackageDependencies = with pythonPackages; [
|
2023-03-13 19:19:43 +00:00
|
|
|
attrs
|
|
|
|
autobahn
|
|
|
|
cbor2
|
|
|
|
click
|
|
|
|
collections-extended
|
|
|
|
cryptography
|
|
|
|
distro
|
|
|
|
eliot
|
|
|
|
filelock
|
|
|
|
foolscap
|
|
|
|
future
|
|
|
|
klein
|
|
|
|
magic-wormhole
|
|
|
|
netifaces
|
|
|
|
psutil
|
2023-03-26 15:49:17 +00:00
|
|
|
pyyaml
|
2023-03-13 19:19:43 +00:00
|
|
|
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
|
|
|
|
2023-03-21 12:56:50 +00:00
|
|
|
unitTestDependencies = with pythonPackages; [
|
2023-03-13 19:19:43 +00:00
|
|
|
beautifulsoup4
|
|
|
|
fixtures
|
|
|
|
hypothesis
|
|
|
|
mock
|
|
|
|
prometheus-client
|
|
|
|
testtools
|
|
|
|
];
|
2023-03-21 12:56:50 +00:00
|
|
|
|
2023-03-13 19:19:43 +00:00
|
|
|
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-21 12:56:50 +00:00
|
|
|
checkInputs = unitTestDependencies;
|
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 21:06:06 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://tahoe-lafs.org/";
|
|
|
|
description = "secure, decentralized, fault-tolerant file store";
|
|
|
|
# Also TGPPL
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
};
|
2023-03-13 19:19:43 +00:00
|
|
|
}
|