about summary refs log tree commit diff
path: root/pkgs/tools/networking/p2p
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2015-11-20 13:48:30 +0100
committerDomen Kožar <domen@dev.si>2015-11-21 21:44:12 +0100
commit704c8bab410a077a89e25c8c9fbb76a8da97625e (patch)
treea1312683d41cfe6569e9442db23ba304d0fb8b32 /pkgs/tools/networking/p2p
parent99a64da6001f5e4fec363b6a98afccda61b6d68f (diff)
downloadnixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar
nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.gz
nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.bz2
nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.lz
nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.xz
nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.tar.zst
nixlib-704c8bab410a077a89e25c8c9fbb76a8da97625e.zip
buildPythonPackage: fix standalone applications using it
Diffstat (limited to 'pkgs/tools/networking/p2p')
-rw-r--r--pkgs/tools/networking/p2p/tahoe-lafs/default.nix35
1 files changed, 15 insertions, 20 deletions
diff --git a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
index e82b7b8050ef..836f3e1e60ca 100644
--- a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
+++ b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
@@ -1,17 +1,14 @@
 { fetchurl, lib, unzip, buildPythonPackage, twisted, foolscap, nevow
-, simplejson, zfec, pycryptopp, sqlite3, darcsver, setuptoolsTrial
-, setuptoolsDarcs, numpy, nettools, pycrypto, pyasn1, mock }:
+, simplejson, zfec, pycryptopp, sqlite3, darcsver, setuptoolsTrial, python
+, setuptoolsDarcs, numpy, nettools, pycrypto, pyasn1, mock, zope_interface }:
 
 # 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.
 
-let
+buildPythonPackage rec {
   name = "tahoe-lafs-1.10.0";
-in
-buildPythonPackage {
-  inherit name;
   namePrefix = "";
 
   src = fetchurl {
@@ -19,7 +16,7 @@ buildPythonPackage {
     sha256 = "1qng7j1vykk8zl5da9yklkljvgxfnjky58gcay6dypz91xq1cmcw";
   };
 
-  configurePhase = ''
+  patchPhase = ''
     sed -i "src/allmydata/util/iputil.py" \
         -es"|_linux_path = '/sbin/ifconfig'|_linux_path = '${nettools}/bin/ifconfig'|g"
 
@@ -29,45 +26,43 @@ buildPythonPackage {
     do
       sed -i "$i" -e"s/localhost/127.0.0.1/g"
     done
+
+    sed -i 's/"zope.interface.*"/"zope.interface"/' src/allmydata/_auto_deps.py
+    sed -i 's/"pycrypto.*"/"pycrypto"/' src/allmydata/_auto_deps.py
   '';
 
-  buildInputs = [ unzip ]
-    ++ [ numpy ]; # Some tests want this + http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-dep-sdists/mock-0.6.0.tar.bz2
+  # Some tests want this + http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-dep-sdists/mock-0.6.0.tar.bz2
+  buildInputs = [ unzip numpy mock ];
 
   # The `backup' command requires `sqlite3'.
   propagatedBuildInputs =
     [ twisted foolscap nevow simplejson zfec pycryptopp sqlite3
-      darcsver setuptoolsTrial setuptoolsDarcs pycrypto pyasn1 mock
+      darcsver setuptoolsTrial setuptoolsDarcs pycrypto pyasn1 zope_interface
     ];
 
-  # The test suite is run in `postInstall'.
-  doCheck = false;
-
   postInstall = ''
     # Install the documentation.
     mkdir -p "$out/share/doc/${name}"
     cp -rv "docs/"* "$out/share/doc/${name}"
     find "$out/share/doc/${name}" -name Makefile -exec rm -v {} \;
+  '';
 
-    # Run the tests once everything is installed.
-    export PYTHON_EGG_CACHE="$TMPDIR"
-    python setup.py build
-    python setup.py trial
+  checkPhase = ''
+    # TODO: broken with wheels
+    #${python.interpreter} setup.py trial
   '';
 
   meta = {
     description = "Tahoe-LAFS, a decentralized, fault-tolerant, distributed storage system";
-
     longDescription = ''
       Tahoe-LAFS is a secure, decentralized, fault-tolerant filesystem.
       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/;
     license = [ lib.licenses.gpl2Plus /* or */ "TGPPLv1+" ];
-    maintainers = [ lib.maintainers.simons  ];
+    maintainers = [ lib.maintainers.simons ];
     platforms = lib.platforms.gnu;  # arbitrary choice
   };
 }