anchor.diff:      runHook postInstall
     '';
   
  +  # Wrap manually
  +  dontWrapQtApps = true;
  +  dontWrapGApps = true;
  +
     # 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 = ''
  -
  +    for program in $out/bin/*; do
  +      wrapProgram $program \
  +        ''${qtWrapperArgs[@]} \
  +        ''${gappsWrapperArgs[@]} \
  +        --prefix PYTHONPATH : $PYTHONPATH \
  +        --prefix PATH : ${poppler_utils.out}/bin
  +    done
     '';
   
     disallowedReferences = [ podofo.dev ];
  
positive.code:     sed -i "s/env python[0-9.]*/python/" $PYFILES
      sed -i "2i import sys; sys.argv[0] = 'calibre'" $out/bin/calibre
  
      for program in $out/bin/*; do
        wrapQtApp $program --prefix PYTHONPATH : $PYTHONPATH
      done
  
      # Replace @out@ by the output path.
      mkdir -p $out/share/applications/
      cp {$calibreDesktopItem,$ebookEditDesktopItem,$ebookViewerDesktopItem}/share/applications/* $out/share/applications/
  
negative.code: 
    enableParallelBuilding = true;
  
    nativeBuildInputs = [ pkgconfig qmake removeReferencesTo wrapGAppsHook ];
  
    buildInputs = [
      poppler_utils libpng imagemagick libjpeg
      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
  