diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index 0153d30a52f..e11efa8f8dd 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -1,6 +1,7 @@ { lib , mkDerivation , fetchurl +, fetchpatch , poppler_utils , pkg-config , libpng @@ -26,18 +27,21 @@ mkDerivation rec { pname = "calibre"; - version = "5.24.0"; + version = "5.29.0"; src = fetchurl { url = "https://download.calibre-ebook.com/${version}/${pname}-${version}.tar.xz"; - hash = "sha256:18dr577nv7ijw3ar6mrk2xrc54mlrqkaj5jrc6s5sirl0710fdfg"; + sha256 = "sha256-9ymHEpTHDUM3NAGoeSETzKRLKgJLRY4eEli6N5lbZug="; }; + # https://sources.debian.org/patches/calibre/5.29.0+dfsg-1 patches = [ - # Plugin installation (very insecure) disabled (from Debian) - ./disable_plugins.patch - # Automatic version update disabled by default (from Debian) - ./no_updates_dialog.patch + # allow for plugin update check, but no calibre version check + (fetchpatch { + name = "0001_only_plugin_update.patch"; + url = "https://sources.debian.org/data/main/c/calibre/5.29.0%2Bdfsg-1/debian/patches/0001-only-plugin-update.patch"; + sha256 = "sha256-aGT8rJ/eQKAkmyHBWdY0ouZuWvDwtLVJU5xY6d3hY3k="; + }) ] ++ lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch; diff --git a/pkgs/applications/misc/calibre/disable_plugins.patch b/pkgs/applications/misc/calibre/disable_plugins.patch deleted file mode 100644 index 9ef1dd04251..00000000000 --- a/pkgs/applications/misc/calibre/disable_plugins.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Disable plugin dialog. It uses a totally non-authenticated and non-trusted way of installing arbitrary code. -Author: Martin Pitt -Bug-Debian: http://bugs.debian.org/640026 - -Index: calibre-0.8.29+dfsg/src/calibre/gui2/actions/preferences.py -=================================================================== ---- calibre-0.8.29+dfsg.orig/src/calibre/gui2/actions/preferences.py 2011-12-16 05:49:14.000000000 +0100 -+++ calibre-0.8.29+dfsg/src/calibre/gui2/actions/preferences.py 2011-12-20 19:29:04.798468930 +0100 -@@ -28,8 +28,6 @@ - pm.addAction(QIcon(I('config.png')), _('Preferences'), self.do_config) - cm('welcome wizard', _('Run welcome wizard'), - icon='wizard.png', triggered=self.gui.run_wizard) -- cm('plugin updater', _('Get plugins to enhance calibre'), -- icon='plugins/plugin_updater.png', triggered=self.get_plugins) - if not DEBUG: - pm.addSeparator() - cm('restart', _('Restart in debug mode'), icon='debug.png', diff --git a/pkgs/applications/misc/calibre/no_updates_dialog.patch b/pkgs/applications/misc/calibre/no_updates_dialog.patch deleted file mode 100644 index faaaf2c1994..00000000000 --- a/pkgs/applications/misc/calibre/no_updates_dialog.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -burN calibre-2.9.0.orig/src/calibre/gui2/main.py calibre-2.9.0/src/calibre/gui2/main.py ---- calibre-2.9.0.orig/src/calibre/gui2/main.py 2014-11-09 20:09:54.081231882 +0800 -+++ calibre-2.9.0/src/calibre/gui2/main.py 2014-11-09 20:15:48.193033844 +0800 -@@ -37,8 +37,9 @@ - help=_('Start minimized to system tray.')) - parser.add_option('-v', '--verbose', default=0, action='count', - help=_('Ignored, do not use. Present only for legacy reasons')) -- parser.add_option('--no-update-check', default=False, action='store_true', -- help=_('Do not check for updates')) -+ parser.add_option('--update-check', dest='no_update_check', default=True, -+ action='store_false', -+ help=_('Check for updates')) - parser.add_option('--ignore-plugins', default=False, action='store_true', - help=_('Ignore custom plugins, useful if you installed a plugin' - ' that is preventing calibre from starting'))