summary refs log tree commit diff
path: root/pkgs/tools/backup/borg
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2016-01-24 04:02:27 +0100
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2016-01-24 04:12:11 +0100
commitaca5edb8f9d001e820b892e97305e825da0f7c7e (patch)
tree4779048951136c43632fd4e033b321f06a8f347e /pkgs/tools/backup/borg
parent10229032a9799eeca0068b7bd1e05ab1d127c648 (diff)
downloadnixpkgs-aca5edb8f9d001e820b892e97305e825da0f7c7e.tar
nixpkgs-aca5edb8f9d001e820b892e97305e825da0f7c7e.tar.gz
nixpkgs-aca5edb8f9d001e820b892e97305e825da0f7c7e.tar.bz2
nixpkgs-aca5edb8f9d001e820b892e97305e825da0f7c7e.tar.lz
nixpkgs-aca5edb8f9d001e820b892e97305e825da0f7c7e.tar.xz
nixpkgs-aca5edb8f9d001e820b892e97305e825da0f7c7e.tar.zst
nixpkgs-aca5edb8f9d001e820b892e97305e825da0f7c7e.zip
borg: build and install documentation
Diffstat (limited to 'pkgs/tools/backup/borg')
-rw-r--r--pkgs/tools/backup/borg/default.nix23
1 files changed, 20 insertions, 3 deletions
diff --git a/pkgs/tools/backup/borg/default.nix b/pkgs/tools/backup/borg/default.nix
index dd590bb046d..1ea8095bd38 100644
--- a/pkgs/tools/backup/borg/default.nix
+++ b/pkgs/tools/backup/borg/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python3Packages, openssl, acl, lz4 }:
+{ stdenv, fetchurl, python3Packages, acl, lz4, openssl }:
 
 python3Packages.buildPythonPackage rec {
   name = "borgbackup-${version}";
@@ -10,14 +10,31 @@ python3Packages.buildPythonPackage rec {
     sha256 = "0n78c982kdfqbyi9jawcvzgdik4l36c2s7rpzkfr1ka6506k2rx4";
   };
 
-  propagatedBuildInputs = with python3Packages;
-    [ cython msgpack openssl acl llfuse tox detox lz4 setuptools_scm ];
+  nativeBuildInputs = with python3Packages; [
+    # For building documentation:
+    sphinx
+  ];
+  propagatedBuildInputs = [
+    acl lz4 openssl
+  ] ++ (with python3Packages; [
+    cython msgpack llfuse tox detox setuptools_scm
+  ]);
 
   preConfigure = ''
     export BORG_OPENSSL_PREFIX="${openssl}"
     export BORG_LZ4_PREFIX="${lz4}"
   '';
 
+  postInstall = ''
+    make -C docs singlehtml
+    mkdir -p $out/share/doc/borg
+    cp -R docs/_build/singlehtml $out/share/doc/borg/html
+
+    make -C docs man
+    mkdir -p $out/share/man
+    cp -R docs/_build/man $out/share/man/man1
+  '';
+
   meta = with stdenv.lib; {
     description = "A deduplicating backup program (attic fork)";
     homepage = https://borgbackup.github.io/;