anchor.diff: -{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, zlib
  -, static ? stdenv.hostPlatform.isStatic }:
  +{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, libX11, zlib
  +, static ? stdenv.hostPlatform.isStatic
  +, withX ? !stdenv.isDarwin }:
   
   stdenv.mkDerivation {
     pname = "libAfterImage";
  
positive.code:     "--disable-mmx-optimization"
      "--${if static then "enable" else "disable"}-staticlibs"
      "--${if !static then "enable" else "disable"}-sharedlibs"
    ];
  
    meta = with lib; {
      homepage = "http://www.afterstep.org/afterimage/";
  
negative.code:   patchFlags = [ "-p0" ];
  
    nativeBuildInputs = [ autoreconfHook ];
    buildInputs = [ giflib libjpeg libpng zlib ] ++ lib.optional withX libX11;
  
    preConfigure = ''
      rm -rf {libjpeg,libpng,libungif,zlib}/
  