From 108cd9aa7f5a9ffbc2d0d95371e07d29d9baa10f Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 5 Jan 2016 21:35:08 +0100 Subject: [PATCH 1/2] calibre: disable version check Applies patch from Debian to disable version checking by default. --- pkgs/applications/misc/calibre/default.nix | 6 +++++- .../misc/calibre/no_updates_dialog.patch | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/misc/calibre/no_updates_dialog.patch diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index d86aee50bb90..d4786017a473 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -15,7 +15,11 @@ stdenv.mkDerivation rec { inherit python; - patches = stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch; + patches = [ + # Patch from Debian that switches the version update change from + # enabled by default to disabled by default. + ./no_updates_dialog.patch + ] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch; prePatch = '' sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip':" \ diff --git a/pkgs/applications/misc/calibre/no_updates_dialog.patch b/pkgs/applications/misc/calibre/no_updates_dialog.patch new file mode 100644 index 000000000000..52364f64dac7 --- /dev/null +++ b/pkgs/applications/misc/calibre/no_updates_dialog.patch @@ -0,0 +1,16 @@ +# Description: Disable update check by default. +Index: calibre/src/calibre/gui2/main.py +=================================================================== +--- calibre.orig/src/calibre/gui2/main.py 2014-02-02 10:41:28.470954623 +0100 ++++ calibre/src/calibre/gui2/main.py 2014-02-02 10:41:56.546954247 +0100 +@@ -37,8 +37,8 @@ + 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')) From ec2a1bcb866d5d52d62d9788d6ba00ac808c08d6 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 5 Jan 2016 21:42:31 +0100 Subject: [PATCH 2/2] anki: disable version check --- pkgs/games/anki/default.nix | 3 +++ pkgs/games/anki/no-version-check.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/games/anki/no-version-check.patch diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix index ca18ca194da1..4c06f9126a96 100644 --- a/pkgs/games/anki/default.nix +++ b/pkgs/games/anki/default.nix @@ -26,6 +26,9 @@ stdenv.mkDerivation rec { phases = [ "unpackPhase" "patchPhase" "installPhase" ]; patches = [ + # Disable updated version check. + ./no-version-check.patch + (substituteAll { src = ./fix-paths.patch; inherit lame mplayer qt4; diff --git a/pkgs/games/anki/no-version-check.patch b/pkgs/games/anki/no-version-check.patch new file mode 100644 index 000000000000..ce166b4b87d5 --- /dev/null +++ b/pkgs/games/anki/no-version-check.patch @@ -0,0 +1,13 @@ +diff -Nurp anki-2.0.33.orig/aqt/main.py anki-2.0.33/aqt/main.py +--- anki-2.0.33.orig/aqt/main.py 2016-01-05 21:37:53.904533750 +0100 ++++ anki-2.0.33/aqt/main.py 2016-01-05 21:39:11.469175976 +0100 +@@ -820,6 +820,9 @@ title="%s">%s''' % ( + ########################################################################## + + def setupAutoUpdate(self): ++ # Don't check for latest version since the versions are ++ # managed in Nixpkgs. ++ return + import aqt.update + self.autoUpdate = aqt.update.LatestVersionFinder(self) + self.connect(self.autoUpdate, SIGNAL("newVerAvail"), self.newVerAvail)