2019-06-16 19:59:06 +00:00
|
|
|
{ fetchurl, lib, nettools, pythonPackages, texinfo }:
|
2010-07-27 23:52:22 +00:00
|
|
|
|
|
|
|
# FAILURES: The "running build_ext" phase fails to compile Twisted
|
|
|
|
# plugins, because it tries to write them into Twisted's (immutable)
|
|
|
|
# store path. The problem appears to be non-fatal, but there's probably
|
|
|
|
# some loss of functionality because of it.
|
2009-06-28 21:03:00 +00:00
|
|
|
|
2016-02-19 12:12:11 +00:00
|
|
|
pythonPackages.buildPythonApplication rec {
|
2019-01-13 12:19:38 +00:00
|
|
|
version = "1.13.0";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "tahoe-lafs";
|
2009-06-28 21:03:00 +00:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2016-04-13 01:43:06 +00:00
|
|
|
url = "https://tahoe-lafs.org/downloads/tahoe-lafs-${version}.tar.bz2";
|
2019-01-13 12:19:38 +00:00
|
|
|
sha256 = "11pfz9yyy6qkkyi0kskxlbn2drfppx6yawqyv4kpkrkj4q7x5m42";
|
2009-06-28 21:03:00 +00:00
|
|
|
};
|
|
|
|
|
2018-03-26 20:22:40 +00:00
|
|
|
outputs = [ "out" "doc" "info" ];
|
|
|
|
|
2018-03-26 20:23:23 +00:00
|
|
|
postPatch = ''
|
2009-06-28 21:03:00 +00:00
|
|
|
sed -i "src/allmydata/util/iputil.py" \
|
2013-04-24 18:40:19 +00:00
|
|
|
-es"|_linux_path = '/sbin/ifconfig'|_linux_path = '${nettools}/bin/ifconfig'|g"
|
2010-02-03 13:38:03 +00:00
|
|
|
|
|
|
|
# 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
|
2015-11-20 12:48:30 +00:00
|
|
|
|
|
|
|
sed -i 's/"zope.interface.*"/"zope.interface"/' src/allmydata/_auto_deps.py
|
|
|
|
sed -i 's/"pycrypto.*"/"pycrypto"/' src/allmydata/_auto_deps.py
|
2009-06-28 21:03:00 +00:00
|
|
|
'';
|
|
|
|
|
2018-03-26 20:23:23 +00:00
|
|
|
# Remove broken and expensive tests.
|
|
|
|
preConfigure = ''
|
|
|
|
(
|
|
|
|
cd src/allmydata/test
|
|
|
|
|
|
|
|
# Buggy?
|
|
|
|
rm cli/test_create.py test_backupdb.py
|
|
|
|
|
|
|
|
# These require Tor and I2P.
|
|
|
|
rm test_connections.py test_iputil.py test_hung_server.py test_i2p_provider.py test_tor_provider.py
|
|
|
|
|
|
|
|
# Expensive
|
|
|
|
rm test_system.py
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2018-03-26 20:22:40 +00:00
|
|
|
nativeBuildInputs = with pythonPackages; [ sphinx texinfo ];
|
|
|
|
|
2014-01-10 23:21:45 +00:00
|
|
|
# The `backup' command requires `sqlite3'.
|
2016-02-15 20:56:14 +00:00
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
2016-10-13 22:03:12 +00:00
|
|
|
twisted foolscap nevow simplejson zfec pycryptopp darcsver
|
2016-02-15 20:56:14 +00:00
|
|
|
setuptoolsTrial setuptoolsDarcs pycrypto pyasn1 zope_interface
|
2019-05-29 19:48:47 +00:00
|
|
|
service-identity pyyaml magic-wormhole treq characteristic
|
2016-02-15 20:56:14 +00:00
|
|
|
];
|
2009-06-28 21:03:00 +00:00
|
|
|
|
2019-04-11 20:22:59 +00:00
|
|
|
checkInputs = with pythonPackages; [ mock hypothesis twisted ];
|
2019-01-13 12:19:38 +00:00
|
|
|
|
2018-03-26 20:22:40 +00:00
|
|
|
# Install the documentation.
|
2009-08-11 16:26:12 +00:00
|
|
|
postInstall = ''
|
2018-03-26 20:22:40 +00:00
|
|
|
(
|
|
|
|
cd docs
|
|
|
|
|
|
|
|
make singlehtml
|
2019-08-15 12:41:18 +00:00
|
|
|
mkdir -p "$doc/share/doc/${pname}-${version}"
|
|
|
|
cp -rv _build/singlehtml/* "$doc/share/doc/${pname}-${version}"
|
2018-03-26 20:22:40 +00:00
|
|
|
|
|
|
|
make info
|
|
|
|
mkdir -p "$info/share/info"
|
|
|
|
cp -rv _build/texinfo/*.info "$info/share/info"
|
|
|
|
)
|
2015-11-20 12:48:30 +00:00
|
|
|
'';
|
2010-02-03 13:38:03 +00:00
|
|
|
|
2015-11-20 12:48:30 +00:00
|
|
|
checkPhase = ''
|
2018-03-26 20:23:23 +00:00
|
|
|
trial --rterrors allmydata
|
2009-08-11 16:26:12 +00:00
|
|
|
'';
|
|
|
|
|
2009-06-28 21:03:00 +00:00
|
|
|
meta = {
|
2009-10-31 22:34:24 +00:00
|
|
|
description = "Tahoe-LAFS, a decentralized, fault-tolerant, distributed storage system";
|
2009-06-28 21:03:00 +00:00
|
|
|
longDescription = ''
|
2009-10-31 22:34:24 +00:00
|
|
|
Tahoe-LAFS is a secure, decentralized, fault-tolerant filesystem.
|
2009-06-28 21:03:00 +00:00
|
|
|
This filesystem is encrypted and spread over multiple peers in
|
|
|
|
such a way that it remains available even when some of the peers
|
|
|
|
are unavailable, malfunctioning, or malicious.
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://tahoe-lafs.org/";
|
2014-10-22 22:13:31 +00:00
|
|
|
license = [ lib.licenses.gpl2Plus /* or */ "TGPPLv1+" ];
|
2016-05-16 20:30:20 +00:00
|
|
|
maintainers = with lib.maintainers; [ MostAwesomeDude ];
|
2018-04-30 22:51:17 +00:00
|
|
|
platforms = lib.platforms.gnu ++ lib.platforms.linux;
|
2019-10-07 15:20:23 +00:00
|
|
|
broken = true;
|
2009-06-28 21:03:00 +00:00
|
|
|
};
|
2011-09-13 20:10:41 +00:00
|
|
|
}
|