2009-08-11 10:11:13 +02:00
|
|
|
{ fetchurl, lib, unzip, buildPythonPackage, twisted, foolscap, nevow
|
2010-02-03 14:38:03 +01:00
|
|
|
, simplejson, zfec, pycryptopp, pysqlite, darcsver, setuptoolsTrial
|
2010-07-28 15:09:20 +02:00
|
|
|
, setuptoolsDarcs, numpy, nettools, pycrypto, pyasn1, mock }:
|
2010-07-28 01:52:22 +02: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 23:03:00 +02:00
|
|
|
|
2011-09-13 22:10:41 +02:00
|
|
|
let
|
|
|
|
name = "tahoe-lafs-1.8.3";
|
|
|
|
in
|
|
|
|
buildPythonPackage {
|
|
|
|
inherit name;
|
2009-06-28 23:03:00 +02:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2011-09-13 22:10:41 +02:00
|
|
|
url = "http://tahoe-lafs.org/source/tahoe-lafs/snapshots/allmydata-tahoe-1.8.3.tar.bz2";
|
|
|
|
sha256 = "00pm7fvwci5ncg2jhsqsl9r79kn495yni8nmr7p5i98f3siwvjd8";
|
2009-06-28 23:03:00 +02:00
|
|
|
};
|
|
|
|
|
2011-09-13 22:10:41 +02:00
|
|
|
# The patch doesn't apply cleanly to the current version.
|
|
|
|
patches = [ /* ./test-timeout.patch */ ];
|
2010-02-04 00:38:12 +01:00
|
|
|
|
2010-03-02 13:46:50 +01:00
|
|
|
configurePhase = ''
|
2009-10-31 23:34:24 +01:00
|
|
|
echo "forcing the use of \`setuptools' 0.6c9 rather than an unreleased version"
|
2009-06-28 23:03:00 +02:00
|
|
|
for i in *setup.py
|
|
|
|
do
|
|
|
|
sed -i "$i" -es'/0.6c12dev/0.6c9/g'
|
|
|
|
done
|
|
|
|
|
|
|
|
# `find_exe()' returns a list like ['.../bin/python'
|
|
|
|
# '.../bin/twistd'], which doesn't work when `twistd' is not a
|
|
|
|
# Python script (e.g., when it's a script produced by
|
|
|
|
# `wrapProgram').
|
|
|
|
sed -i "src/allmydata/scripts/startstop_node.py" \
|
|
|
|
-es"|cmd = find_exe.find_exe('twistd')|cmd = ['${twisted}/bin/twistd']|g"
|
|
|
|
|
|
|
|
sed -i "src/allmydata/util/iputil.py" \
|
|
|
|
-es"|_linux_path = '/sbin/ifconfig'|_linux_path = '${nettools}/sbin/ifconfig'|g"
|
2010-02-03 14:38:03 +01: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 23:03:00 +02:00
|
|
|
'';
|
|
|
|
|
2010-02-03 14:38:03 +01:00
|
|
|
buildInputs = [ unzip ]
|
2010-07-28 01:52:22 +02: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-08 00:44:29 +02:00
|
|
|
|
2010-02-03 14:38:03 +01:00
|
|
|
# The `backup' command requires `pysqlite'.
|
|
|
|
propagatedBuildInputs =
|
|
|
|
[ twisted foolscap nevow simplejson zfec pycryptopp pysqlite
|
2010-07-28 15:09:20 +02:00
|
|
|
darcsver setuptoolsTrial setuptoolsDarcs pycrypto pyasn1 mock
|
2010-02-03 14:38:03 +01:00
|
|
|
];
|
2009-06-28 23:03:00 +02:00
|
|
|
|
2010-02-03 14:38:03 +01:00
|
|
|
# The test suite is run in `postInstall'.
|
2009-06-28 23:03:00 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
2009-08-11 18:26:12 +02:00
|
|
|
postInstall = ''
|
|
|
|
# Install the documentation.
|
|
|
|
|
2009-10-31 23:34:24 +01:00
|
|
|
# FIXME: Inkscape segfaults when run from here. Setting $HOME to
|
2009-08-11 18:26:12 +02:00
|
|
|
# something writable doesn't help; providing $FONTCONFIG_FILE doesn't
|
|
|
|
# help either. So we just don't run `make' under `docs/'.
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/share/doc/${name}"
|
2009-08-11 18:26:12 +02:00
|
|
|
cp -rv "docs/"* "$out/share/doc/${name}"
|
|
|
|
find "$out/share/doc/${name}" -name Makefile -exec rm -v {} \;
|
2010-02-03 14:38:03 +01:00
|
|
|
|
|
|
|
# Run the tests once everything is installed.
|
|
|
|
# FIXME: Some of the tests want to run $out/bin/tahoe, which isn't usable
|
|
|
|
# yet because it gets wrapped later on, in `postFixup'.
|
|
|
|
export PYTHON_EGG_CACHE="$TMPDIR"
|
2011-09-13 22:10:41 +02:00
|
|
|
: python setup.py trial
|
2009-08-11 18:26:12 +02:00
|
|
|
'';
|
|
|
|
|
2009-06-28 23:03:00 +02:00
|
|
|
meta = {
|
2009-10-31 23:34:24 +01:00
|
|
|
description = "Tahoe-LAFS, a decentralized, fault-tolerant, distributed storage system";
|
2009-06-28 23:03:00 +02:00
|
|
|
|
|
|
|
longDescription = ''
|
2009-10-31 23:34:24 +01:00
|
|
|
Tahoe-LAFS is a secure, decentralized, fault-tolerant filesystem.
|
2009-06-28 23:03:00 +02: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/;
|
|
|
|
|
2009-10-31 23:34:24 +01:00
|
|
|
license = [ "GPLv2+" /* or */ "TGPPLv1+" ];
|
2009-08-11 10:11:13 +02:00
|
|
|
|
2010-07-28 01:52:22 +02:00
|
|
|
maintainers = [ lib.maintainers.ludo lib.maintainers.simons ];
|
2010-03-02 13:46:50 +01:00
|
|
|
platforms = lib.platforms.gnu; # arbitrary choice
|
2009-06-28 23:03:00 +02:00
|
|
|
};
|
2011-09-13 22:10:41 +02:00
|
|
|
}
|