anchor.diff:  { stdenv, fetchFromGitHub, fetchurl
  -, gettext, poppler, qt5 , pkgconfig }:
  +, pkgconfig, makeWrapper
  +, poppler, qt5, gnuplot
  +}:
   
  -# Warning: You will also need a working pdflatex installation containing
  -# at least auctex and pgf.
   
   # This package only builds ktikz without KDE integration because KDE4 is
   # deprecated and upstream does not (yet ?) support KDE5.
  
positive.code: 
  stdenv.mkDerivation rec {
    version = "0.12";
    name = "qtikz-${version}";
  
    src = fetchFromGitHub {
      owner = "fhackenberger";
  
negative.code:     sha256 = "16jwsl18marfw5m888vwxdd1h7cqa37rkfqgirzdliacb1cr4f58";
    })];
  
    QT_PLUGIN_PATH = "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}";
  
    nativeBuildInputs = [ pkgconfig qt5.qttools qt5.qmake makeWrapper ];
    buildInputs = [ qt5.qtbase poppler ];
    enableParallelBuilding = true;
  
    qmakeFlags = [
      "DESKTOP_INSTALL_DIR=${placeholder "out"}/share/applications"
      "MIME_INSTALL_DIR=${placeholder "out"}/share/mime/packages"
      # qcollectiongenerator does no more exist in `qt5.qttools`.
      # It was merged with qhelpgenerator at some point.
      "QCOLLECTIONGENERATORCOMMAND=qhelpgenerator"
    ];
  
    postFixup = ''
      wrapProgram "$out/bin/qtikz" \
        --prefix QT_PLUGIN_PATH : "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}" \
        --prefix PATH : "${gnuplot}/bin"
    '';
  }
  