···11+{ stdenv, fetchurl, ncurses, groff }:
22+33+stdenv.mkDerivation {
44+55+ name = "wiggle-1.0";
66+77+ src = fetchurl {
88+ url = "https://github.com/neilbrown/wiggle/archive/v1.0.tar.gz";
99+ sha256 = "0552dkdvl001b2jasj0jwb69s7zy6wbc8gcysqj69b4qgl9c54cs";
1010+ };
1111+1212+ buildInputs = [ ncurses groff ];
1313+1414+ configurePhase = ''
1515+ makeFlagsArray=( CFLAGS="-I. -O3"
1616+ INSTALL="install"
1717+ BINDIR="$out/bin"
1818+ MANDIR="$out/share/man"
1919+ )
2020+ patchShebangs .
2121+ '';
2222+2323+ meta = {
2424+ homepage = http://blog.neil.brown.name/category/wiggle/;
2525+ description = "Tool for applying patches with conflicts";
2626+2727+ longDescription = ''
2828+ Wiggle applies patches to a file in a similar manner to the patch(1)
2929+ program. The distinctive difference is, however, that wiggle will
3030+ attempt to apply a patch even if the "before" part of the patch doesn't
3131+ match the target file perfectly. This is achieved by breaking the file
3232+ and patch into words and finding the best alignment of words in the file
3333+ with words in the patch. Once this alignment has been found, any
3434+ differences (word-wise) in the patch are applied to the file as best as
3535+ possible. Also, wiggle will (in some cases) detect changes that have
3636+ already been applied, and will ignore them.
3737+ '';
3838+3939+ license = stdenv.lib.licenses.gpl2Plus;
4040+ platforms = stdenv.lib.platforms.all;
4141+ };
4242+4343+}