Change:
<!-- Note that these are hard requirements --<!-- You can use the "Go to file" functionality on github to find the package Then you can go to the history for this package Find the latest "packagename: oldversion -newversion" commit The "newversion" is the the current version of the package --- <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- name: calibre <!-- The current version can be found easily with the same process than above for checking the master branch If an open PR is present for the package, take this version as the current one and link to the PR --current version: 4.23.0 desired version: 5.6 <!-- Search your package here: If no maintainer is listed for your package, tag the person that last updated the package --maintainers: Please tag this issue in your PR.

Discussion:
, hyphen , unrarSupport ? false , chmlib <del> , pythonPackages </del> <ins> , python3Packages </ins> , libusb1 , libmtp , xdg_utils

mkDerivation rec { pname = "calibre"; <del> version = "4.23.0"; </del> <ins> version = "5.9.0"; </ins> src = fetchurl { url = "https://download.calibre-ebook.com/${version}/${pname}-${version}.tar.xz"; <del> sha256 = "sha256-Ft5RRzzw4zb5RqVyUaHk9Pu6H4V/F9j8FKoTLn61lRg="; </del> <ins> sha256 = "a71196af15372054c4a25697534a2df1ef6dd732b9db07aaecaac7a86d9b3a0a"; </ins> }; patches = [

] ++ lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch; prePatch = '' <del> sed -i "/pyqt_sip_dir/ s:=.*:= '${pythonPackages.pyqt5}/share/sip/PyQt5':"   </del> <ins> sed -i "/pyqt_sip_dir/ s:=.*:= '${python3Packages.pyqt5}/share/sip/PyQt5':"   </ins> setup/build_environment.py # Remove unneeded files and libs

nativeBuildInputs = [ pkgconfig qmake removeReferencesTo ]; <del> CALIBRE_PY3_PORT = builtins.toString pythonPackages.isPy3k; </del> buildInputs = [ chmlib fontconfig

sqlite xdg_utils ] ++ ( <del> with pythonPackages; [ </del> <ins> with python3Packages; [ </ins> apsw beautifulsoup4 css-parser

export FC_LIB_DIR=${fontconfig.lib}/lib export PODOFO_INC_DIR=${podofo.dev}/include/podofo export PODOFO_LIB_DIR=${podofo.lib}/lib <del> export SIP_BIN=${pythonPackages.sip}/bin/sip </del> <ins> export SIP_BIN=${python3Packages.sip}/bin/sip </ins> export XDG_DATA_HOME=$out/share export XDG_UTILS_INSTALL_MODE="user" <del> ${pythonPackages.python.interpreter} setup.py install --root=$out  </del> <ins> ${python3Packages.python.interpreter} setup.py install --root=$out  </ins> --prefix=$out  --libdir=$out/lib  --staging-root=$out 

#   /nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-podofo-0.9.6-dev/include/podofo/base/PdfVariant.h preFixup = '' remove-references-to -t ${podofo.dev}  <del> $out/lib/calibre/calibre/plugins${lib.optionalString pythonPackages.isPy3k "/3"}/podofo.so </del> <ins> $out/lib/calibre/calibre/plugins${lib.optionalString python3Packages.isPy3k "/3"}/podofo.so </ins> for program in $out/bin/*; do wrapProgram $program 

buildGo112Module = throw "buildGo112Module has been removed"; # added 2020-04-26 bundler_HEAD = bundler; # added 2015-11-15 caddy1 = throw "caddy 1.x has been removed from nixpkgs, as it's unmaintained: https://github.com/caddyserver/caddy/blob/master/.github/SECURITY.md#supported-versions"; # added 2020-10-02 <ins> calibre-py2 = throw "calibre-py2 has been removed from nixpkgs, as calibre has upgraded to python 3. Please use calibre as replacement."; # added 2021-01-12 calibre-py3 = throw "calibre-py3 has been removed from nixpkgs, as calibre's default python version is now 3. Please use calibre as replacement."; # added 2021-01-12 </ins> cantarell_fonts = cantarell-fonts; # added 2018-03-03 cargo-tree = throw "cargo-tree has been removed, use the builtin `cargo tree` command instead."; # added 2020-08-20 casperjs = throw "casperjs has been removed, it was abandoned by upstream and broken.";

calculix = callPackage ../applications/science/math/calculix {}; <del> calibre-py2 = libsForQt5.callPackage ../applications/misc/calibre { pythonPackages = python2Packages; }; calibre-py3 = libsForQt5.callPackage ../applications/misc/calibre { pythonPackages = python3Packages; }; calibre = calibre-py3; </del> <ins> calibre = libsForQt5.callPackage ../applications/misc/calibre {}; </ins> calligra = libsForQt5.callPackage ../applications/office/calligra { openjpeg = openjpeg_1;