2014-03-24 05:02:00 +00:00
|
|
|
{ stdenv, fetchurl, bzip2 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "bsdiff";
|
2014-03-24 05:02:00 +00:00
|
|
|
version = "4.3";
|
2004-11-29 21:17:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://www.daemonology.net/bsdiff/${pname}-${version}.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 = ''
|
2018-01-04 19:15:35 +00:00
|
|
|
$CC -O3 -lbz2 bspatch.c -o bspatch
|
|
|
|
$CC -O3 -lbz2 bsdiff.c -o bsdiff
|
2014-03-24 05:02:00 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
}
|