summary refs log tree commit diff
path: root/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2018-03-26 20:22:40 +0000
committerJan Malakhovski <oxij@oxij.org>2018-03-30 06:26:59 +0000
commit23a814e1ad0874313849afea67e1f9357f4c381f (patch)
treea4566fffdee68fbac94580d8fe60f668d8316f55 /pkgs/tools/networking/p2p/tahoe-lafs/default.nix
parent7e00b9d652856125b4a1bdfb17b83272f845f770 (diff)
downloadnixlib-23a814e1ad0874313849afea67e1f9357f4c381f.tar
nixlib-23a814e1ad0874313849afea67e1f9357f4c381f.tar.gz
nixlib-23a814e1ad0874313849afea67e1f9357f4c381f.tar.bz2
nixlib-23a814e1ad0874313849afea67e1f9357f4c381f.tar.lz
nixlib-23a814e1ad0874313849afea67e1f9357f4c381f.tar.xz
nixlib-23a814e1ad0874313849afea67e1f9357f4c381f.tar.zst
nixlib-23a814e1ad0874313849afea67e1f9357f4c381f.zip
tahoe-lafs: build HTML and info documentation
Diffstat (limited to 'pkgs/tools/networking/p2p/tahoe-lafs/default.nix')
-rw-r--r--pkgs/tools/networking/p2p/tahoe-lafs/default.nix22
1 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
index 4bdc630efd79..cc5229bcd448 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,6 +15,8 @@ pythonPackages.buildPythonApplication rec {
     sha256 = "0x9f1kjym1188fp6l5sqy0zz8mdb4xw861bni2ccv26q482ynbks";
   };
 
+  outputs = [ "out" "doc" "info" ];
+
   patchPhase = ''
     sed -i "src/allmydata/util/iputil.py" \
         -es"|_linux_path = '/sbin/ifconfig'|_linux_path = '${nettools}/bin/ifconfig'|g"
@@ -30,6 +32,8 @@ pythonPackages.buildPythonApplication rec {
     sed -i 's/"pycrypto.*"/"pycrypto"/' src/allmydata/_auto_deps.py
   '';
 
+  nativeBuildInputs = with pythonPackages; [ sphinx texinfo ];
+
   buildInputs = with pythonPackages; [ unzip numpy mock ];
 
   # The `backup' command requires `sqlite3'.
@@ -39,11 +43,19 @@ 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 = ''