mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 15:13:46 +00:00
ea1d1a8f52
Upstream should fix that but this fixes the build on Darwin for now: ``` building build flags: SHELL=/nix/store/mxvgjwzdvrl81plvgqnzbrqb14ccnji6-bash-5.2-p15/bin/bash MANDIR=\$\(out\)/share/man DOCDIR=\$\(out\)/share/doc/bup BINDIR=\$\(out\)/bin LIBDIR=\$\(out\)/lib/bup fatal: not a git repository (or any of the parent directories): .git clang -I/nix/store/2rrfpkq6cr8ppip9szl0z1qfdlskdinq-python3-3.10.12/include/python3.10 -I/nix/store/2rrfpkq6cr8ppip9szl0z1qfdlskdinq-python3-3.10.12/include/python3.10 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/nix/store/vnn3dp5cyjlknkqxmi29vbg812ml5m7r-libxcrypt-4.4.35/include -Wno-unused-command-line-argument -D_FILE_OFFSET_BITS=64 -Wno-unknown-pragmas -Wsign-compare -O2 -Wall -Werror -Wformat=2 -MMD -MP -D BUP_DEV_BUP_EXEC=1 -I/private/tmp/nix-build-bup-0.33.2.drv-0/source/src -I src -g lib/cmd/bup.c src/bup/compat.c src/bup/io.c -lpython3.10 -lcrypt -ldl -L/nix/store/vnn3dp5cyjlknkqxmi29vbg812ml5m7r-libxcrypt-4.4.35/lib -framework CoreFoundation -g -fPIE -o dev/bup-exec lib/cmd/bup.c:153:14: error: implicit declaration of function '_NSGetExecutablePath' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int rc = _NSGetExecutablePath(spath, &size); ^ 1 error generated. make: *** [GNUmakefile:185: dev/bup-exec] Error 1 ```
62 lines
1.6 KiB
Nix
62 lines
1.6 KiB
Nix
{ lib, stdenv, fetchFromGitHub, makeWrapper
|
|
, perl, pandoc, python3, git
|
|
, par2cmdline ? null, par2Support ? true
|
|
}:
|
|
|
|
assert par2Support -> par2cmdline != null;
|
|
|
|
let
|
|
version = "0.33.2";
|
|
|
|
pythonDeps = with python3.pkgs; [ setuptools tornado ]
|
|
++ lib.optionals (!stdenv.isDarwin) [ pyxattr pylibacl fuse ];
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "bup";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "bup";
|
|
owner = "bup";
|
|
rev = version;
|
|
hash = "sha256-DDVCrY4SFqzKukXm8rIq90xAW2U+yYyhyPmUhslMMWI=";
|
|
};
|
|
|
|
buildInputs = [ git python3 ];
|
|
nativeBuildInputs = [ pandoc perl makeWrapper ];
|
|
|
|
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.isDarwin "-Wno-error=implicit-function-declaration";
|
|
|
|
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";
|
|
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 ];
|
|
};
|
|
}
|