2014-03-24 05:02:00 +00:00
|
|
|
{ stdenv, fetchurl, bzip2 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "bsdiff-${version}";
|
|
|
|
version = "4.3";
|
2004-11-29 21:17:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-03-24 05:02:00 +00:00
|
|
|
url = "http://www.daemonology.net/bsdiff/${name}.tar.gz";
|
2010-06-05 12:40:23 +01:00
|
|
|
sha256 = "0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq";
|
2004-11-29 21:17:29 +00:00
|
|
|
};
|
2014-03-24 05:02:00 +00:00
|
|
|
|
2010-06-05 12:40:23 +01:00
|
|
|
buildInputs = [ bzip2 ];
|
2014-03-24 05:02:00 +00:00
|
|
|
patches = [ ./include-systypes.patch ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cc -O3 -lbz2 bspatch.c -o bspatch
|
|
|
|
cc -O3 -lbz2 bsdiff.c -o bsdiff
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
|
|
|
|
cp bsdiff $out/bin
|
|
|
|
cp bspatch $out/bin
|
|
|
|
cp bsdiff.1 $out/share/man/man1
|
|
|
|
cp bspatch.1 $out/share/man/man1
|
2010-06-05 12:40:23 +01:00
|
|
|
'';
|
2014-03-24 05:02:00 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An efficient binary diff/patch tool";
|
|
|
|
homepage = "http://www.daemonology.net/bsdiff";
|
|
|
|
license = stdenv.lib.licenses.bsd2;
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
2004-11-29 21:17:29 +00:00
|
|
|
}
|