anchor.diff:      extraEntries = "NoDisplay=true";
     };
   
  -  meta = with stdenv.lib; {
  +  meta = with lib; {
       description = "Comprehensive e-book software";
  -    homepage = https://calibre-ebook.com;
  +    homepage = "https://calibre-ebook.com";
       license = with licenses; if unrarSupport then unfreeRedistributable else gpl3;
       maintainers = with maintainers; [ domenkozar pSub AndersonTorres ];
       platforms = platforms.linux;
  
positive.code:     genericName = "E-book library management";
      icon = "@out@/share/calibre/images/library.png";
      comment = "Manage, convert, edit, and read e-books";
      mimeType = stdenv.lib.concatStringsSep ";" [
        "application/x-mobipocket-subscription"
        "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
        "text/html"
  
negative.code: 
    enableParallelBuilding = true;
  
    nativeBuildInputs = [ pkgconfig qmake removeReferencesTo ];
  
    CALIBRE_PY3_PORT = builtins.toString pypkgs.isPy3k;
  
    buildInputs = [
      poppler_utils libpng imagemagick libjpeg
      fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils
    ] ++ (with pypkgs; [
      apsw cssselect css-parser dateutil dnspython html5-parser lxml netifaces pillow
      python pyqt5_with_qtwebkit sip
      regex msgpack beautifulsoup4 html2text
      # the following are distributed with calibre, but we use upstream instead
      odfpy
    ]) ++ lib.optionals (!pypkgs.isPy3k) (with pypkgs; [
      mechanize
    ]);
  
    installPhase = ''
  