anchor.diff:      rm -rf thirdparty/{curl,freetype,glfw,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib}
     '';
   
  +  desktopItems = [
  +    (makeDesktopItem {
  +      name = pname;
  +      desktopName = pname;
  +      comment = meta.description;
  +      icon = "mupdf";
  +      exec = "${pname} %f";
  +      terminal = false;
  +      mimeTypes = [
  +        "application/epub+zip"
  +        "application/oxps"
  +        "application/pdf"
  +        "application/vnd.ms-xpsdocument"
  +        "application/x-cbz"
  +        "application/x-pdf"
  +      ];
  +      categories = [ "Graphics" "Viewer" ];
  +      keywords = [
  +        "mupdf" "comic" "document" "ebook" "viewer"
  +        "cbz" "epub" "fb2" "pdf" "xps"
  +      ];
  +    })
  +  ];
  +
     postInstall = ''
       mkdir -p "$out/lib/pkgconfig"
       cat >"$out/lib/pkgconfig/mupdf.pc" <<EOF
  
positive.code:     EOF
  
      moveToOutput "bin" "$bin"
    '' + lib.optionalString enableX11 ''
      ln -s "$bin/bin/mupdf-x11" "$bin/bin/mupdf"
      mkdir -p $bin/share/applications
      cat > $bin/share/applications/mupdf.desktop <<EOF
      [Desktop Entry]
      Type=Application
      Version=1.0
      Name=mupdf
      Comment=PDF viewer
      Exec=$bin/bin/mupdf-x11 %f
      Terminal=false
      MimeType=application/pdf;application/x-pdf;application/x-cbz;application/oxps;application/vnd.ms-xpsdocument;application/epub+zip
      EOF
    '';
  
    enableParallelBuilding = true;
  
  
negative.code: , lib
  , fetchurl
  , fetchpatch
  , copyDesktopItems
  , makeDesktopItem
  , desktopToDarwinBundle
  , pkg-config
  , freetype
  