2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper
|
2023-07-15 17:15:38 +00:00
|
|
|
, perl, pandoc, python3, git
|
2020-04-24 23:36:52 +00:00
|
|
|
, par2cmdline ? null, par2Support ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert par2Support -> par2cmdline != null;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
let
|
|
|
|
version = "0.33.2";
|
|
|
|
|
|
|
|
pythonDeps = with python3.pkgs; [ setuptools tornado ]
|
|
|
|
++ lib.optionals (!stdenv.isDarwin) [ pyxattr pylibacl fuse ];
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "bup";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "bup";
|
|
|
|
owner = "bup";
|
|
|
|
rev = version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-DDVCrY4SFqzKukXm8rIq90xAW2U+yYyhyPmUhslMMWI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [ git python3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ pandoc perl makeWrapper ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = "patchShebangs .";
|
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"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=implicit-function-declaration";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/bup \
|
2023-07-15 17:15:38 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ git par2cmdline ]} \
|
|
|
|
--prefix NIX_PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages pythonDeps}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
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;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|