anchor.diff:  { stdenv, callPackage,
     fetchurl, guile_1_8, qt4, xmodmap, which, makeWrapper, freetype,
  +  libjpeg,
  +  sqlite,
     tex ? null,
     aspell ? null,
  +  git ? null,
  +  python3 ? null,
  +  cmake,
  +  pkgconfig,
     ghostscriptX ? null,
     extraFonts ? false,
     chineseFonts ? false,
  
positive.code:   name = "${pname}-${version}";
  
    src = fetchurl {
      url = "http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
      sha256 = "0l48g9746igiaxw657shm8g3xxk565vzsviajlrxqyljbh6py0fs";
    };
  
    buildInputs = [ guile_1_8 qt4 makeWrapper ghostscriptX freetype ];
    NIX_LDFLAGS = [ "-lz" ];
  
    postInstall = "wrapProgram $out/bin/texmacs --suffix PATH : " +
          (if ghostscriptX == null then "" else "${ghostscriptX}/bin:") +
          (if aspell == null then "" else "${aspell}/bin:") +
          (if tex == null then "" else "${tex}/bin:") +
          "${xmodmap}/bin:${which}/bin";
  
    inherit (common) postPatch;
  
negative.code: 
  let
    pname = "TeXmacs";
    version = "1.99.10";
    common = callPackage ./common.nix {
      inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
    };
  