nixpkgs/pkgs/tools/backup/bup/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.6 KiB
Nix
Raw Normal View History

2021-01-15 09:19:50 +00:00
{ lib, stdenv, fetchFromGitHub, makeWrapper
2023-07-07 08:11:53 +01:00
, perl, pandoc, python3, git
, par2cmdline ? null, par2Support ? true
}:
assert par2Support -> par2cmdline != null;
2023-07-07 08:11:53 +01:00
let
version = "0.33.2";
pythonDeps = with python3.pkgs; [ setuptools tornado ]
++ lib.optionals (!stdenv.isDarwin) [ pyxattr pylibacl fuse ];
in
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
2019-08-13 22:52:01 +01:00
pname = "bup";
inherit version;
src = fetchFromGitHub {
repo = "bup";
owner = "bup";
rev = version;
2023-07-07 08:11:53 +01:00
hash = "sha256-DDVCrY4SFqzKukXm8rIq90xAW2U+yYyhyPmUhslMMWI=";
};
2023-07-07 08:11:53 +01:00
buildInputs = [ git python3 ];
nativeBuildInputs = [ pandoc perl makeWrapper ];
2023-07-07 08:11:53 +01:00
postPatch = "patchShebangs .";
dontAddPrefix = true;
makeFlags = [
"MANDIR=$(out)/share/man"
"DOCDIR=$(out)/share/doc/bup"
"BINDIR=$(out)/bin"
"LIBDIR=$(out)/lib/bup"
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration -Wno-error=implicit-int";
postInstall = ''
wrapProgram $out/bin/bup \
2023-07-07 08:11:53 +01:00
--prefix PATH : ${lib.makeBinPath [ git par2cmdline ]} \
--prefix NIX_PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages pythonDeps}
'';
meta = with lib; {
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.
'';
2013-04-26 11:51:46 +01:00
platforms = platforms.linux ++ platforms.darwin;
2023-07-07 11:26:45 +01:00
maintainers = with maintainers; [ rnhmjoj ];
};
}