anchor.diff:    name = "${pname}-${version}";
   
     src = fetchurl {
  -    url = "http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
  -    sha256 = "0l48g9746igiaxw657shm8g3xxk565vzsviajlrxqyljbh6py0fs";
  +    url = "https://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz";
  +    sha256 = "1k12bkcik7mv93q0j7q3b77x8s6rmvlb23s3v7nnzdwjxlp5lph2";
     };
   
  -  buildInputs = [ guile_1_8 qt4 makeWrapper ghostscriptX freetype ];
  +  cmakeFlags = [
  +    # Texmacs' cmake build as of writing defaults to Qt5,
  +    # but we haven't updated to that yet.
  +    "-DTEXMACS_GUI=Qt4"
  +  ];
  +
  +  enableParallelBuilding = true;
  +
  +  nativeBuildInputs = [ cmake pkgconfig ];
  +  buildInputs = [
  +    guile_1_8
  +    qt4
  +    makeWrapper
  +    ghostscriptX
  +    freetype
  +    libjpeg
  +    sqlite
  +    git
  +    python3
  +  ];
     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:") +
  +        (if git == null then "" else "${git}/bin:") +
  +        (if python3 == null then "" else "${python3}/bin:") +
           "${xmodmap}/bin:${which}/bin";
   
     inherit (common) postPatch;
  
positive.code: { stdenv, callPackage,
    fetchurl, guile_1_8, qt4, xmodmap, which, makeWrapper, freetype,
    tex ? null,
    aspell ? null,
    ghostscriptX ? null,
    extraFonts ? false,
    chineseFonts ? false,
  
negative.code: 
  let
    pname = "TeXmacs";
    version = "1.99.10";
    common = callPackage ./common.nix {
      inherit tex extraFonts chineseFonts japaneseFonts koreanFonts;
    };
  