Files
nixpkgs/pkgs/by-name/bu/bup/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

101 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
perl,
pandoc,
python3,
git,
par2Support ? true,
par2cmdline ? null,
}:
assert par2Support -> par2cmdline != null;
let
version = "0.33.9";
pythonDeps =
with python3.pkgs;
[
setuptools
tornado
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
pyxattr
pylibacl
fuse
];
in
stdenv.mkDerivation {
pname = "bup";
inherit version;
src = fetchFromGitHub {
repo = "bup";
owner = "bup";
tag = version;
hash = "sha256-MW4kScu81XW89W7WpvOj40+S8bG5QozN30Hfj4TsnX4=";
};
buildInputs = [
python3
];
nativeBuildInputs = [
pandoc
perl
makeWrapper
];
configurePlatforms = [ ];
postPatch = ''
patchShebangs --build .
substituteInPlace ./config/configure \
--replace-fail 'bup_git=' 'bup_git="${lib.getExe git}" #'
'';
dontAddPrefix = true;
makeFlags = [
"MANDIR=$(out)/share/man"
"DOCDIR=$(out)/share/doc/bup"
"BINDIR=$(out)/bin"
"LIBDIR=$(out)/lib/bup"
];
env.BUP_PYTHON_CONFIG = lib.getExe' (lib.getDev python3) "python-config";
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration -Wno-error=implicit-int";
postInstall = ''
wrapProgram $out/bin/bup \
--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";
mainProgram = "bup";
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;
maintainers = with maintainers; [ rnhmjoj ];
# bespoke ./configure does not like cross
broken = stdenv.buildPlatform != stdenv.hostPlatform;
};
}