anchor.diff:  
       # Remove unneeded files and libs
       rm -rf resources/calibre-portable.* \
  -           src/{chardet,cherrypy,html5lib,odf,routes}
  +           src/{chardet,cherrypy,odf,routes}
     '';
   
     dontUseQmakeConfigure = true;
  
positive.code:     python pyqt5 sip
      regex msgpack
      # the following are distributed with calibre, but we use upstream instead
      chardet cherrypy html5lib_0_9999999 odfpy routes
    ]);
  
    installPhase = ''
  
negative.code: }:
  
  stdenv.mkDerivation rec {
    version = "3.3.0";
    name = "calibre-${version}";
  
    src = fetchurl {
      url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz";
      sha256 = "1zq3aihnyxdczdz8b0w02xfw4b0l9i23f6ljpmsmm69jyh4j3m0c";
    };
  
    patches = [
  