bup: optionally depend on par2cmdline
The default is to use it from path when available, as this is an optional feature.
This commit is contained in:
parent
c7f30ac377
commit
fbeb84b288
|
@ -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 = [
|
||||
|
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue