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: # See historical versions of this file for building ktikz with KDE4.
  
  stdenv.mkDerivation rec {
    version = "unstable-20161122";
    name = "qtikz-${version}";
  
    src = fetchFromGitHub {
      owner = "fhackenberger";
      repo = "ktikz";
      rev = "be66c8b1ff7e6b791b65af65e83c4926f307cf5a";
      sha256 = "15jx53sjlnky4yg3ry1i1c29g28v1jbbvhbz66h7a49pfxa40fj3";
    };
  
    meta = with stdenv.lib; {
      description = "Editor for the TikZ language";
  
negative.code:   '';
  
    # 1. Configuration is done by overwriting qtikzconfig.pri
    postPatch = ''
      echo "$conf" | sed "s!@out@!$out!g" > qmake/qtikzconfig.pri
    '';
  
    configurePhase = ''
        qmake PREFIX="$out" ./qtikz.pro
    '';
  
    nativeBuildInputs = [ pkgconfig qt5.qttools ];
    buildInputs = [ gettext qt5.full poppler ];
  
    enableParallelBuilding = true;
  