summary refs log tree commit diff
path: root/pkgs/tools/networking/p2p
diff options
context:
space:
mode:
authorMatthew Justin Bauer <mjbauer95@gmail.com>2018-04-08 21:27:24 -0500
committerGitHub <noreply@github.com>2018-04-08 21:27:24 -0500
commit0528e1870050becf9806ae52fe20b68a830cd6da (patch)
tree1567d6d1c6c6b2d55212a661fe836908ec8dc77b /pkgs/tools/networking/p2p
parent4685d4d1f9fbe975ec1439384f49be94e5c1ac3b (diff)
parentd0849b6fdde45bd078d980030f5c074d3f55a7d1 (diff)
downloadnixlib-0528e1870050becf9806ae52fe20b68a830cd6da.tar
nixlib-0528e1870050becf9806ae52fe20b68a830cd6da.tar.gz
nixlib-0528e1870050becf9806ae52fe20b68a830cd6da.tar.bz2
nixlib-0528e1870050becf9806ae52fe20b68a830cd6da.tar.lz
nixlib-0528e1870050becf9806ae52fe20b68a830cd6da.tar.xz
nixlib-0528e1870050becf9806ae52fe20b68a830cd6da.tar.zst
nixlib-0528e1870050becf9806ae52fe20b68a830cd6da.zip
Merge pull request #38110 from oxij/pkgs/tahoe-lafs
tahoe-lafs: install documentation, run tests
Diffstat (limited to 'pkgs/tools/networking/p2p')
-rw-r--r--pkgs/tools/networking/p2p/tahoe-lafs/default.nix43
1 files changed, 35 insertions, 8 deletions
diff --git a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
index 4bdc630efd79..8c0c4a6c5664 100644
--- a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
+++ b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, lib, unzip, nettools, pythonPackages }:
+{ fetchurl, lib, unzip, nettools, pythonPackages, texinfo }:
 
 # FAILURES: The "running build_ext" phase fails to compile Twisted
 # plugins, because it tries to write them into Twisted's (immutable)
@@ -15,7 +15,9 @@ pythonPackages.buildPythonApplication rec {
     sha256 = "0x9f1kjym1188fp6l5sqy0zz8mdb4xw861bni2ccv26q482ynbks";
   };
 
-  patchPhase = ''
+  outputs = [ "out" "doc" "info" ];
+
+  postPatch = ''
     sed -i "src/allmydata/util/iputil.py" \
         -es"|_linux_path = '/sbin/ifconfig'|_linux_path = '${nettools}/bin/ifconfig'|g"
 
@@ -30,6 +32,24 @@ pythonPackages.buildPythonApplication rec {
     sed -i 's/"pycrypto.*"/"pycrypto"/' src/allmydata/_auto_deps.py
   '';
 
+  # 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
+    )
+  '';
+
+  nativeBuildInputs = with pythonPackages; [ sphinx texinfo ];
+
   buildInputs = with pythonPackages; [ unzip numpy mock ];
 
   # The `backup' command requires `sqlite3'.
@@ -39,16 +59,23 @@ pythonPackages.buildPythonApplication rec {
     service-identity pyyaml
   ];
 
+  # Install the documentation.
   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 {} \;
+    (
+      cd docs
+
+      make singlehtml
+      mkdir -p "$doc/share/doc/${name}"
+      cp -rv _build/singlehtml/* "$doc/share/doc/${name}"
+
+      make info
+      mkdir -p "$info/share/info"
+      cp -rv _build/texinfo/*.info "$info/share/info"
+    )
   '';
 
   checkPhase = ''
-    # Still broken. ~ C.
-    #   trial allmydata
+    trial --rterrors allmydata
   '';
 
   meta = {