1 { lib, stdenv, fetchFromGitHub, autoreconfHook
2 , lzmaSupport ? true, xz ? null
5 assert lzmaSupport -> xz != null;
8 mkWith = flag: name: if flag
10 else "--without-${name}";
11 in stdenv.mkDerivation rec {
15 src = fetchFromGitHub {
16 sha256 = "09mmsalc7dwlvgrda56s2k927rpl3a5dzfa88aslkqcjnr790wjy";
18 repo = "xdelta-devel";
22 nativeBuildInputs = [ autoreconfHook ];
24 ++ lib.optionals lzmaSupport [ xz ];
31 (mkWith lzmaSupport "liblzma")
34 enableParallelBuilding = true;
39 for i in testing/file.h xdelta3-test.h; do
40 substituteInPlace $i --replace /tmp $PWD/tmp
46 install -D -m755 xdelta3 $out/bin/xdelta3
47 install -D -m644 xdelta3.1 $out/share/man/man1/xdelta3.1
51 description = "Binary differential compression in VCDIFF (RFC 3284) format";
53 xdelta is a command line program for delta encoding, which generates two
54 file differences. This is similar to diff and patch, but it is targeted
55 for binary files and does not generate human readable output.
57 homepage = "http://xdelta.org/";
58 license = licenses.gpl2Plus;
59 mainProgram = "xdelta3";
60 platforms = platforms.unix;