2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper
|
2020-10-27 00:29:36 +00:00
|
|
|
, perl, pandoc, python3Packages, git
|
2020-04-24 23:36:52 +00:00
|
|
|
, par2cmdline ? null, par2Support ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert par2Support -> par2cmdline != null;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
let version = "0.32"; in
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "bup";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "bup";
|
|
|
|
owner = "bup";
|
|
|
|
rev = version;
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "sha256-SWnEJ5jwu/Jr2NLsTS8ajWay0WX/gYbOc3J6w00DndI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
git
|
2020-10-27 00:29:36 +00:00
|
|
|
(python3Packages.python.withPackages
|
2020-04-24 23:36:52 +00:00
|
|
|
(p: with p; [ setuptools tornado ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optionals (!stdenv.isDarwin) [ pyxattr pylibacl fuse ]))
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
nativeBuildInputs = [ pandoc perl makeWrapper ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
substituteInPlace Makefile --replace "-Werror" ""
|
2023-02-02 18:25:31 +00:00
|
|
|
'' + lib.optionalString par2Support ''
|
2021-03-09 03:18:52 +00:00
|
|
|
substituteInPlace cmd/fsck-cmd.py --replace "'par2'" "'${par2cmdline}/bin/par2'"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontAddPrefix = true;
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"MANDIR=$(out)/share/man"
|
|
|
|
"DOCDIR=$(out)/share/doc/bup"
|
|
|
|
"BINDIR=$(out)/bin"
|
|
|
|
"LIBDIR=$(out)/lib/bup"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/bup \
|
|
|
|
--prefix PATH : ${git}/bin
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/bup/bup";
|
|
|
|
description = "Efficient file backup system based on the git packfile format";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Highly efficient file backup system based on the git packfile format.
|
|
|
|
Capable of doing *fast* incremental backups of virtual machine images.
|
|
|
|
'';
|
|
|
|
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|