at 23.11-beta 44 lines 1.5 kB view raw
1{ lib, stdenv, fetchFromGitHub, ncurses, groff }: 2 3stdenv.mkDerivation rec { 4 pname = "wiggle"; 5 version = "1.3"; 6 7 src = fetchFromGitHub { 8 owner = "neilbrown"; 9 repo = "wiggle"; 10 rev = "v${version}"; 11 sha256 = "18ilzr9sbal1j8p1d94ilm1j5blac5cngvcvjpdmgmpw6diy2ldf"; 12 }; 13 14 buildInputs = [ ncurses groff ]; 15 16 configurePhase = '' 17 makeFlagsArray=( CFLAGS="-I. -O3" 18 STRIP="-s" 19 INSTALL="install" 20 BINDIR="$out/bin" 21 MANDIR="$out/share/man" 22 ) 23 patchShebangs . 24 ''; 25 26 meta = with lib; { 27 homepage = "https://blog.neil.brown.name/category/wiggle/"; 28 description = "Tool for applying patches with conflicts"; 29 longDescription = '' 30 Wiggle applies patches to a file in a similar manner to the patch(1) 31 program. The distinctive difference is, however, that wiggle will 32 attempt to apply a patch even if the "before" part of the patch doesn't 33 match the target file perfectly. This is achieved by breaking the file 34 and patch into words and finding the best alignment of words in the file 35 with words in the patch. Once this alignment has been found, any 36 differences (word-wise) in the patch are applied to the file as best as 37 possible. Also, wiggle will (in some cases) detect changes that have 38 already been applied, and will ignore them. 39 ''; 40 license = licenses.gpl2Plus; 41 platforms = platforms.all; 42 maintainers = [ ]; 43 }; 44}