From 6aa786d1d602b4bfb5b8bff1caf0739aec71db95 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 11 Jan 2016 18:34:21 +0100 Subject: xdeltaUnstable: init at 3.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.” --- pkgs/tools/compression/xdelta/default.nix | 2 +- pkgs/tools/compression/xdelta/unstable.nix | 62 ++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/compression/xdelta/unstable.nix (limited to 'pkgs/tools/compression') diff --git a/pkgs/tools/compression/xdelta/default.nix b/pkgs/tools/compression/xdelta/default.nix index 54e04d303d66..84ccde3fd37d 100644 --- a/pkgs/tools/compression/xdelta/default.nix +++ b/pkgs/tools/compression/xdelta/default.nix @@ -11,7 +11,7 @@ let else "--without-${name}"; in stdenv.mkDerivation { name = "xdelta-${version}"; - + src = fetchFromGitHub { sha256 = "1c7xym7xr26phyf4wb9hh2w88ybzbzh2w3h1kyqq3da0ndidmf2r"; rev = "v${version}"; diff --git a/pkgs/tools/compression/xdelta/unstable.nix b/pkgs/tools/compression/xdelta/unstable.nix new file mode 100644 index 000000000000..8637463dfc0d --- /dev/null +++ b/pkgs/tools/compression/xdelta/unstable.nix @@ -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 ]; + }; +} -- cgit 1.4.1