summary refs log tree commit diff
path: root/pkgs
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
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')
-rw-r--r--pkgs/tools/backup/bup/default.nix7
-rw-r--r--pkgs/top-level/all-packages.nix1
2 files changed, 7 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 = [
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ccd6b8d15e09..65a59e08f7a0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -513,6 +513,7 @@ let
   bup = callPackage ../tools/backup/bup {
     inherit (pythonPackages) pyxattr pylibacl setuptools fuse;
     inherit (haskellPackages) pandoc;
+    par2Support = (config.bup.par2Support or false);
   };
 
   atool = callPackage ../tools/archivers/atool { };