xdeltaUnstable: init at 3.1.0

This will eventually become the new stable branch (as unstable ones
are wont to do), but is worth having if you want to patch yesterday's
‘large’ files today, or need to apply patches already created with it.

“First release of the 3.1.x series. This is taken from the
"64bithash" branch.

- Adds support for -B values greater than 2GB, enabled by
  -DXD3_USE_LARGESIZET=1 variable. [Enabled in nixpkgs.]
- Adds new performance and speed regression test, written in #Golang.
  [Not enabled in nixpkgs.]

When compiled for large sizes, xdelta3 uses a 64bit checksum function.
This impacts both compression and speed.

Relative to 3.0.11, the new branch is currently 3-5% slower and
has 1-2% worse compression. Performance will be addressed in
future 3.1.x releases.”
This commit is contained in:
Tobias Geerinckx-Rice 2016-01-11 18:34:21 +01:00
parent 823f797c26
commit 6aa786d1d6
3 changed files with 64 additions and 1 deletions

View File

@ -11,7 +11,7 @@ let
else "--without-${name}";
in stdenv.mkDerivation {
name = "xdelta-${version}";
src = fetchFromGitHub {
sha256 = "1c7xym7xr26phyf4wb9hh2w88ybzbzh2w3h1kyqq3da0ndidmf2r";
rev = "v${version}";

View File

@ -0,0 +1,62 @@
{ stdenv, fetchFromGitHub, autoreconfHook
, lzmaSupport ? true, xz ? null
}:
assert lzmaSupport -> xz != null;
let
version = "3.1.0";
mkWith = flag: name: if flag
then "--with-${name}"
else "--without-${name}";
in stdenv.mkDerivation {
name = "xdelta-${version}";
src = fetchFromGitHub {
sha256 = "09mmsalc7dwlvgrda56s2k927rpl3a5dzfa88aslkqcjnr790wjy";
rev = "v${version}";
repo = "xdelta-devel";
owner = "jmacd";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = []
++ stdenv.lib.optionals lzmaSupport [ xz ];
postPatch = ''
cd xdelta3
substituteInPlace Makefile.am --replace \
"common_CFLAGS =" \
"common_CFLAGS = -DXD3_USE_LARGESIZET=1"
'';
configureFlags = [
(mkWith lzmaSupport "liblzma")
];
enableParallelBuilding = true;
doCheck = true;
checkPhase = ''
mkdir $PWD/tmp
for i in testing/file.h xdelta3-test.h; do
substituteInPlace $i --replace /tmp $PWD/tmp
done
./xdelta3regtest
'';
installPhase = ''
install -D -m755 xdelta3 $out/bin/xdelta3
install -D -m644 xdelta3.1 $out/share/man/man1/xdelta3.1
'';
meta = with stdenv.lib; {
inherit version;
description = "Binary differential compression in VCDIFF (RFC 3284) format";
homepage = http://xdelta.org/;
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ nckx ];
};
}

View File

@ -3658,6 +3658,7 @@ let
xtitle = callPackage ../tools/misc/xtitle { };
xdelta = callPackage ../tools/compression/xdelta { };
xdeltaUnstable = callPackage ../tools/compression/xdelta/unstable.nix { };
xdummy = callPackage ../tools/misc/xdummy { };