1 { lib, stdenv, fetchurl, perl, makeWrapper
2 , version, sha256, patches ? [], extraBuildInputs ? []
5 stdenv.mkDerivation rec {
7 inherit version patches;
10 url = "http://cyberelk.net/tim/data/patchutils/stable/${pname}-${version}.tar.xz";
14 nativeBuildInputs = [ makeWrapper ];
15 buildInputs = [ perl ] ++ extraBuildInputs;
16 hardeningDisable = [ "format" ];
18 # tests fail when building in parallel
19 enableParallelBuilding = false;
22 for bin in $out/bin/{splitdiff,rediff,editdiff,dehtmldiff}; do
24 --prefix PATH : "$out/bin"
28 doCheck = lib.versionAtLeast version "0.3.4";
33 '' + lib.optionalString (lib.versionOlder version "0.4.2") ''
34 find tests -type f -name 'run-test' \
35 -exec sed -i '{}' -e 's|/bin/echo|echo|g' \;
39 description = "Tools to manipulate patch files";
40 homepage = "http://cyberelk.net/tim/software/patchutils";
41 license = licenses.gpl2Plus;
42 platforms = platforms.all;
43 maintainers = with maintainers; [ artturin ];