2016-02-15 21:56:14 +01:00
|
|
|
{ fetchurl, lib, unzip, nettools, pythonPackages }:
|
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
|
|
|
|
2016-02-19 13:12:11 +01:00
|
|
|
pythonPackages.buildPythonApplication rec {
|
2017-01-24 02:55:14 +01:00
|
|
|
version = "1.12.1";
|
2016-02-15 21:56:14 +01:00
|
|
|
name = "tahoe-lafs-${version}";
|
2009-06-28 23:03:00 +02:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2016-04-13 03:43:06 +02:00
|
|
|
url = "https://tahoe-lafs.org/downloads/tahoe-lafs-${version}.tar.bz2";
|
2017-01-24 02:55:14 +01:00
|
|
|
sha256 = "0x9f1kjym1188fp6l5sqy0zz8mdb4xw861bni2ccv26q482ynbks";
|
2009-06-28 23:03:00 +02:00
|
|
|
};
|
|
|
|
|
2015-11-20 13:48:30 +01:00
|
|
|
patchPhase = ''
|
2009-06-28 23:03:00 +02:00
|
|
|
sed -i "src/allmydata/util/iputil.py" \
|
2013-04-24 20:40:19 +02:00
|
|
|
-es"|_linux_path = '/sbin/ifconfig'|_linux_path = '${nettools}/bin/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
|
2015-11-20 13:48:30 +01: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 23:03:00 +02:00
|
|
|
'';
|
|
|
|
|
2016-02-15 21:56:14 +01:00
|
|
|
buildInputs = with pythonPackages; [ unzip numpy mock ];
|
2009-07-08 00:44:29 +02:00
|
|
|
|
2014-01-11 00:21:45 +01:00
|
|
|
# The `backup' command requires `sqlite3'.
|
2016-02-15 21:56:14 +01:00
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
2016-10-14 00:03:12 +02:00
|
|
|
twisted foolscap nevow simplejson zfec pycryptopp darcsver
|
2016-02-15 21:56:14 +01:00
|
|
|
setuptoolsTrial setuptoolsDarcs pycrypto pyasn1 zope_interface
|
2017-01-24 02:55:14 +01:00
|
|
|
service-identity pyyaml
|
2016-02-15 21:56:14 +01:00
|
|
|
];
|
2009-06-28 23:03:00 +02:00
|
|
|
|
2009-08-11 18:26:12 +02:00
|
|
|
postInstall = ''
|
|
|
|
# Install the documentation.
|
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 {} \;
|
2015-11-20 13:48:30 +01:00
|
|
|
'';
|
2010-02-03 14:38:03 +01:00
|
|
|
|
2015-11-20 13:48:30 +01:00
|
|
|
checkPhase = ''
|
2016-04-13 03:43:06 +02:00
|
|
|
# Still broken. ~ C.
|
|
|
|
# trial allmydata
|
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.
|
|
|
|
'';
|
2016-04-13 03:43:06 +02:00
|
|
|
homepage = http://tahoe-lafs.org/;
|
2014-10-23 00:13:31 +02:00
|
|
|
license = [ lib.licenses.gpl2Plus /* or */ "TGPPLv1+" ];
|
2016-05-16 22:30:20 +02:00
|
|
|
maintainers = with lib.maintainers; [ MostAwesomeDude ];
|
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
|
|
|
}
|