git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #12165 from rycee/fix/version-nag

Remove version update checks in Calibre and Anki

commit2b7b3aa5e08812f9f176bc910ecc4671e27256b0 authorPeter Simons <simons@cryp.to> dateTue 5 Jan 2016, 22:23 (11 years ago) parente5972f3ec2a1bc
4 files changed+37−1
pkgs/applications/misc/calibre/default.nix+5−1 pkgs/applications/misc/calibre/no_updates_dialog.patch+16 pkgs/games/anki/default.nix+3 pkgs/games/anki/no-version-check.patch+13
pkgs/applications/misc/calibre/default.nix+5−1
@@ -15,7 +15,11 @@ stdenv.mkDerivation rec {
1515
1616 inherit python;
1717
18− patches = stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
18+ patches = [
19+ # Patch from Debian that switches the version update change from
20+ # enabled by default to disabled by default.
21+ ./no_updates_dialog.patch
22+ ] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
1923
2024 prePatch = ''
2125 sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip':" \
pkgs/applications/misc/calibre/no_updates_dialog.patchnew file+16
@@ -0,0 +1,16 @@
1+# Description: Disable update check by default.
2+Index: calibre/src/calibre/gui2/main.py
3+===================================================================
4+--- calibre.orig/src/calibre/gui2/main.py 2014-02-02 10:41:28.470954623 +0100
5++++ calibre/src/calibre/gui2/main.py 2014-02-02 10:41:56.546954247 +0100
6+@@ -37,8 +37,8 @@
7+ help=_('Start minimized to system tray.'))
8+ parser.add_option('-v', '--verbose', default=0, action='count',
9+ help=_('Ignored, do not use. Present only for legacy reasons'))
10+- parser.add_option('--no-update-check', default=False, action='store_true',
11+- help=_('Do not check for updates'))
12++ parser.add_option('--update-check', dest='no_update_check', default=True, action='store_false',
13++ help=_('Check for updates'))
14+ parser.add_option('--ignore-plugins', default=False, action='store_true',
15+ help=_('Ignore custom plugins, useful if you installed a plugin'
16+ ' that is preventing calibre from starting'))
pkgs/games/anki/default.nix+3
@@ -26,6 +26,9 @@ stdenv.mkDerivation rec {
2626 phases = [ "unpackPhase" "patchPhase" "installPhase" ];
2727
2828 patches = [
29+ # Disable updated version check.
30+ ./no-version-check.patch
31+
2932 (substituteAll {
3033 src = ./fix-paths.patch;
3134 inherit lame mplayer qt4;
pkgs/games/anki/no-version-check.patchnew file+13
@@ -0,0 +1,13 @@
1+diff -Nurp anki-2.0.33.orig/aqt/main.py anki-2.0.33/aqt/main.py
2+--- anki-2.0.33.orig/aqt/main.py 2016-01-05 21:37:53.904533750 +0100
3++++ anki-2.0.33/aqt/main.py 2016-01-05 21:39:11.469175976 +0100
4+@@ -820,6 +820,9 @@ title="%s">%s</button>''' % (
5+ ##########################################################################
6+
7+ def setupAutoUpdate(self):
8++ # Don't check for latest version since the versions are
9++ # managed in Nixpkgs.
10++ return
11+ import aqt.update
12+ self.autoUpdate = aqt.update.LatestVersionFinder(self)
13+ self.connect(self.autoUpdate, SIGNAL("newVerAvail"), self.newVerAvail)