anchor.diff:        make docs && make install_docs
       '';
   
  +  preFixup = ''
  +    sed -i 's,-lqtharfbuzzng,,g' $out/lib/pkgconfig/Qt5Gui.pc
  +  '';
  +
     inherit (xorg) lndir;
     setupHook = ./setup-hook.sh;
   
  
positive.code:     export LD_LIBRARY_PATH="$PWD/qtbase/lib:$PWD/qtbase/plugins/platforms:$LD_LIBRARY_PATH"
      export MAKEFLAGS=-j$NIX_BUILD_CORES
  
      export configureFlags+="-plugindir $out/lib/qt5/plugins -importdir $out/lib/qt5/imports -qmldir $out/lib/qt5/qml"
      export configureFlags+=" -docdir $out/share/doc/qt5"
    '';
  
    prefixKey = "-prefix ";
  
    # -no-eglfs, -no-directfb, -no-linuxfb and -no-kms because of the current minimalist mesa
    # TODO Remove obsolete and useless flags once the build will be totally mastered
    configureFlags = ''
      -verbose
      -confirm-license
      -opensource
  
      -release
      -shared
      -c++11
      ${lib.optionalString developerBuild "-developer-build"}
      -largefile
      -accessibility
      -rpath
      -optimized-qmake
      -strip
      -reduce-relocations
      -system-proxies
      -pkg-config
  
      -gui
      -widgets
      -opengl desktop
      -qml-debug
      -nis
      -iconv
      -icu
      -pch
      -glib
      -xcb
      -qpa xcb
      -${lib.optionalString (cups == null) "no-"}cups
      -${lib.optionalString (!gtkStyle) "no-"}gtkstyle
  
      -no-eglfs
      -no-directfb
      -no-linuxfb
      -no-kms
  
      ${lib.optionalString (!system-x86_64) "-no-sse2"}
      -no-sse3
      -no-ssse3
      -no-sse4.1
      -no-sse4.2
      -no-avx
      -no-avx2
      -no-mips_dsp
      -no-mips_dspr2
  
      -system-zlib
      -system-libpng
      -system-libjpeg
      -system-xcb
      -system-xkbcommon
      -openssl-linked
      -dbus-linked
  
      -system-sqlite
      -${if libmysql != null then "plugin" else "no"}-sql-mysql
      -${if postgresql != null then "plugin" else "no"}-sql-psql
  
      -make libs
      -make tools
      -${lib.optionalString (buildExamples == false) "no"}make examples
      -${lib.optionalString (buildTests == false) "no"}make tests
    '';
  
    # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
    # if dependency paths contain the string "pq", which can occur in the hash.
  
negative.code: 
  , xorg, libxkbcommon
  , fontconfig, freetype, openssl, dbus, glib, udev, libxml2, libxslt, pcre
  , zlib, libjpeg, libpng, libtiff, sqlite, icu, harfbuzz, libinput, mtdev
  
  , coreutils, bison, flex, gdb, gperf, ruby
  , python, perl, pkgconfig
  