2009-08-11 09:11:13 +01:00
|
|
|
{ fetchurl, lib, unzip, buildPythonPackage, twisted, foolscap, nevow
|
2014-01-10 23:21:45 +00:00
|
|
|
, simplejson, zfec, pycryptopp, sqlite3, darcsver, setuptoolsTrial
|
2010-07-28 14:09:20 +01:00
|
|
|
, setuptoolsDarcs, numpy, nettools, pycrypto, pyasn1, mock }:
|
2010-07-28 00:52:22 +01: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 22:03:00 +01:00
|
|
|
|
2011-09-13 21:10:41 +01:00
|
|
|
let
|
2014-01-10 23:21:45 +00:00
|
|
|
name = "tahoe-lafs-1.10.0";
|
2011-09-13 21:10:41 +01:00
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit name;
|
2009-06-28 22:03:00 +01:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2014-01-10 23:21:45 +00:00
|
|
|
url = "http://tahoe-lafs.org/source/tahoe-lafs/releases/allmydata-tahoe-1.10.0.tar.bz2";
|
|
|
|
sha256 = "1qng7j1vykk8zl5da9yklkljvgxfnjky58gcay6dypz91xq1cmcw";
|
2009-06-28 22:03:00 +01:00
|
|
|
};
|
|
|
|
|
2010-03-02 12:46:50 +00:00
|
|
|
configurePhase = ''
|
2009-06-28 22:03:00 +01:00
|
|
|
sed -i "src/allmydata/util/iputil.py" \
|
2013-04-24 19:40:19 +01: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
|
2009-06-28 22:03:00 +01:00
|
|
|
'';
|
|
|
|
|
2010-02-03 13:38:03 +00:00
|
|
|
buildInputs = [ unzip ]
|
2010-07-28 00:52:22 +01:00
|
|
|
++ [ numpy ]; # Some tests want this + http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-dep-sdists/mock-0.6.0.tar.bz2
|
2009-07-07 23:44:29 +01:00
|
|
|
|
2014-01-10 23:21:45 +00:00
|
|
|
# The `backup' command requires `sqlite3'.
|
2010-02-03 13:38:03 +00:00
|
|
|
propagatedBuildInputs =
|
2014-01-10 23:21:45 +00:00
|
|
|
[ twisted foolscap nevow simplejson zfec pycryptopp sqlite3
|
2010-07-28 14:09:20 +01:00
|
|
|
darcsver setuptoolsTrial setuptoolsDarcs pycrypto pyasn1 mock
|
2010-02-03 13:38:03 +00:00
|
|
|
];
|
2009-06-28 22:03:00 +01:00
|
|
|
|
2010-02-03 13:38:03 +00:00
|
|
|
# The test suite is run in `postInstall'.
|
2009-06-28 22:03:00 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2009-08-11 17:26:12 +01:00
|
|
|
postInstall = ''
|
|
|
|
# Install the documentation.
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share/doc/${name}"
|
2009-08-11 17:26:12 +01:00
|
|
|
cp -rv "docs/"* "$out/share/doc/${name}"
|
|
|
|
find "$out/share/doc/${name}" -name Makefile -exec rm -v {} \;
|
2010-02-03 13:38:03 +00:00
|
|
|
|
|
|
|
# Run the tests once everything is installed.
|
|
|
|
export PYTHON_EGG_CACHE="$TMPDIR"
|
2012-11-27 00:03:59 +00:00
|
|
|
python setup.py build
|
|
|
|
python setup.py trial
|
2009-08-11 17:26:12 +01:00
|
|
|
'';
|
|
|
|
|
2009-06-28 22:03:00 +01:00
|
|
|
meta = {
|
2009-10-31 22:34:24 +00:00
|
|
|
description = "Tahoe-LAFS, a decentralized, fault-tolerant, distributed storage system";
|
2009-06-28 22:03:00 +01:00
|
|
|
|
|
|
|
longDescription = ''
|
2009-10-31 22:34:24 +00:00
|
|
|
Tahoe-LAFS is a secure, decentralized, fault-tolerant filesystem.
|
2009-06-28 22:03:00 +01: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.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = http://allmydata.org/;
|
|
|
|
|
2014-03-12 20:20:01 +00:00
|
|
|
# TODO license = [ lib.licenses.gpl2Plus /* or */ "TGPPLv1+" ];
|
2009-08-11 09:11:13 +01:00
|
|
|
|
2013-08-16 22:44:33 +01:00
|
|
|
maintainers = [ lib.maintainers.simons ];
|
2010-03-02 12:46:50 +00:00
|
|
|
platforms = lib.platforms.gnu; # arbitrary choice
|
2009-06-28 22:03:00 +01:00
|
|
|
};
|
2011-09-13 21:10:41 +01:00
|
|
|
}
|