anchor.diff: -{ stdenv, fetchFromGitHub, gettext, poppler, qt5 , pkgconfig }:
  +{ stdenv, fetchFromGitHub, fetchurl
  +, gettext, poppler, qt5 , pkgconfig }:
   
   # Warning: You will also need a working pdflatex installation containing
   # at least auctex and pgf.
  
positive.code:   '';
  
    # 1. Configuration is done by overwriting qtikzconfig.pri
    # 2. Recent Qt removed QString::fromAscii in favor of QString::fromLatin1
    patchPhase = ''
      echo "$conf" | sed "s!@out@!$out!g" > qmake/qtikzconfig.pri
      find -name "*.cpp" -exec sed -i s/fromAscii/fromLatin1/g "{}" \;
    '';
  
    configurePhase = ''
        qmake PREFIX="$out" ./qtikz.pro
    '';
  
    nativeBuildInputs = [ pkgconfig ];
    buildInputs = [ gettext qt5.full poppler ];
  
    enableParallelBuilding = true;
  
negative.code: # See historical versions of this file for building ktikz with KDE4.
  
  stdenv.mkDerivation rec {
    version = "0.12";
    name = "qtikz-${version}";
  
    src = fetchFromGitHub {
      owner = "fhackenberger";
      repo = "ktikz";
      rev = version;
      sha256 = "1s83x8r2yi64wc6ah2iz09dj3qahy0fkxx6cfgpkavjw9x0j0582";
    };
  
    patches = [ (fetchurl {
      url = "https://github.com/fhackenberger/ktikz/commit/972685a406517bb85eb561f2c8e26f029eacd7db.patch";
      sha256 = "16jwsl18marfw5m888vwxdd1h7cqa37rkfqgirzdliacb1cr4f58";
    })];
  
    meta = with stdenv.lib; {
      description = "Editor for the TikZ language";
  