From fbeb84b28895f941fe414ef06df1274f30e469cf Mon Sep 17 00:00:00 2001 From: Mathijs Kwik Date: Sun, 6 Jan 2013 18:15:04 +0100 Subject: bup: optionally depend on par2cmdline The default is to use it from path when available, as this is an optional feature. --- pkgs/tools/backup/bup/default.nix | 7 ++++++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'pkgs') 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 { }; -- cgit 1.4.1