anchor.diff:  
     enableParallelBuilding = true;
   
  -  nativeBuildInputs = [ makeWrapper pkgconfig qmake removeReferencesTo qt5.wrapQtAppsHook ];
  +  nativeBuildInputs = [ pkgconfig qmake removeReferencesTo wrapGAppsHook ];
   
     buildInputs = [
       poppler_utils libpng imagemagick libjpeg
  -    fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
  +    fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils
     ] ++ (with python2Packages; [
       apsw cssselect css-parser dateutil dnspython html5-parser lxml mechanize netifaces pillow
       python pyqt5_with_qtwebkit sip
  
positive.code:     runHook postInstall
    '';
  
    # Remove some references to shrink the closure size. This reference (as of
    # 2018-11-06) was a single string like the following:
    #   /nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-podofo-0.9.6-dev/include/podofo/base/PdfVariant.h
    preFixup = ''
      remove-references-to -t ${podofo.dev} $out/lib/calibre/calibre/plugins/podofo.so
    '';
  
    postFixup = ''
  
    '';
  
    disallowedReferences = [ podofo.dev ];
  
negative.code: { stdenv, mkDerivation,  fetchurl, poppler_utils, pkgconfig, libpng
  , imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite
  , unrarSupport ? false, chmlib, python2Packages, libusb1, libmtp
  , xdg_utils, makeDesktopItem, wrapGAppsHook, removeReferencesTo, qt5
  }:
  
  mkDerivation rec {
    name = "calibre-${version}";
    version = "3.45.2";
  
    src = fetchurl {
      url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz";
  