anchor.diff:    '';
   
     postInstall = ''
  -    for i in $out/lib/*.a; do
  -      so="''${i%.a}.so"
  -      gcc -shared -o $so.${version} -Wl,--whole-archive $i -Wl,--no-whole-archive
  -      ln -s $so.${version} $so
  -      rm $i
  -    done
  -
       mkdir -p "$out/lib/pkgconfig"
       cat >"$out/lib/pkgconfig/mupdf.pc" <<EOF
       prefix=$out
  
positive.code:       url = "http://git.ghostscript.com/?p=mupdf.git;a=blobdiff_plain;f=platform/x11/jstest_main.c;h=f158d9628ed0c0a84e37fe128277679e8334422a;hp=13c3a0a3ba3ff4aae29f6882d23740833c1d842f;hb=06a012a42c9884e3cd653e7826cff1ddec04eb6e;hpb=34e18d127a02146e3415b33c4b67389ce1ddb614";
        sha256 = "163bllvjrbm0gvjb25lv7b6sih4zr4g4lap3h0cbq8dvpjxx0jfc";
      })
    ];
  
    makeFlags = [ "prefix=$(out)" ];
    nativeBuildInputs = [ pkgconfig ];
    buildInputs = [ freetype harfbuzz openjpeg jbig2dec ]
                  ++ lib.optionals enableX11 [ libX11 libXext ]
                  ++ lib.optionals enableCurl [ curl openssl ];
    outputs = [ "bin" "dev" "out" "man" "doc" ];
  
negative.code: { stdenv, lib, fetchurl, fetchpatch, pkgconfig
  , freetype, harfbuzz, openjpeg, jbig2dec, libjpeg
  , enableX11 ? true, libX11, libXext
  , enableCurl ? true, curl, openssl
  }:
  