summary refs log tree commit diff
path: root/pkgs/tools/backup/bup
diff options
context:
space:
mode:
authorMathijs Kwik <mathijs@bluescreen303.nl>2013-01-06 18:15:04 +0100
committerMathijs Kwik <mathijs@bluescreen303.nl>2013-01-06 18:44:55 +0100
commitfbeb84b28895f941fe414ef06df1274f30e469cf (patch)
tree9e222eca3338f60c676fed480f42cab0babb1bb9 /pkgs/tools/backup/bup
parentc7f30ac377ef2698c725a7572e29bafe808abec2 (diff)
downloadnixlib-fbeb84b28895f941fe414ef06df1274f30e469cf.tar
nixlib-fbeb84b28895f941fe414ef06df1274f30e469cf.tar.gz
nixlib-fbeb84b28895f941fe414ef06df1274f30e469cf.tar.bz2
nixlib-fbeb84b28895f941fe414ef06df1274f30e469cf.tar.lz
nixlib-fbeb84b28895f941fe414ef06df1274f30e469cf.tar.xz
nixlib-fbeb84b28895f941fe414ef06df1274f30e469cf.tar.zst
nixlib-fbeb84b28895f941fe414ef06df1274f30e469cf.zip
bup: optionally depend on par2cmdline
The default is to use it from path when available, as this is an
optional feature.
Diffstat (limited to 'pkgs/tools/backup/bup')
-rw-r--r--pkgs/tools/backup/bup/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/tools/backup/bup/default.nix b/pkgs/tools/backup/bup/default.nix
index eef465bd142c..7ba5175d550b 100644
--- a/pkgs/tools/backup/bup/default.nix
+++ b/pkgs/tools/backup/bup/default.nix
@@ -1,4 +1,7 @@
-{ stdenv, fetchgit, python, pyxattr, pylibacl, setuptools, fuse, git, perl, pandoc, makeWrapper }:
+{ stdenv, fetchgit, python, pyxattr, pylibacl, setuptools, fuse, git, perl, pandoc, makeWrapper
+, par2cmdline, par2Support ? false }:
+
+assert par2Support -> par2cmdline != null;
 
 with stdenv.lib;
 
@@ -26,6 +29,8 @@ stdenv.mkDerivation {
       substituteInPlace $f --replace "/usr/bin/env python" "${python}/bin/python"
     done
     substituteInPlace Makefile --replace "./format-subst.pl" "perl ./format-subst.pl"
+  '' + optionalString par2Support ''
+    substituteInPlace cmd/fsck-cmd.py --replace "['par2'" "['${par2cmdline}/bin/par2'"
   '';
 
   makeFlags = [