summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2016-01-05 22:23:57 +0100
committerPeter Simons <simons@cryp.to>2016-01-05 22:23:57 +0100
commit2b7b3aa5e08812f9f176bc910ecc4671e27256b0 (patch)
treeccf8ba6f3423543882373f0ee608d3d02fc25d26
parente5972f309498906e346cbefd6f08fbbb6f1bf982 (diff)
parentec2a1bcb866d5d52d62d9788d6ba00ac808c08d6 (diff)
downloadnixpkgs-2b7b3aa5e08812f9f176bc910ecc4671e27256b0.tar
nixpkgs-2b7b3aa5e08812f9f176bc910ecc4671e27256b0.tar.gz
nixpkgs-2b7b3aa5e08812f9f176bc910ecc4671e27256b0.tar.bz2
nixpkgs-2b7b3aa5e08812f9f176bc910ecc4671e27256b0.tar.lz
nixpkgs-2b7b3aa5e08812f9f176bc910ecc4671e27256b0.tar.xz
nixpkgs-2b7b3aa5e08812f9f176bc910ecc4671e27256b0.tar.zst
nixpkgs-2b7b3aa5e08812f9f176bc910ecc4671e27256b0.zip
Merge pull request #12165 from rycee/fix/version-nag
Remove version update checks in Calibre and Anki
-rw-r--r--pkgs/applications/misc/calibre/default.nix6
-rw-r--r--pkgs/applications/misc/calibre/no_updates_dialog.patch16
-rw-r--r--pkgs/games/anki/default.nix3
-rw-r--r--pkgs/games/anki/no-version-check.patch13
4 files changed, 37 insertions, 1 deletions
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index d86aee50bb9..d4786017a47 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 00000000000..52364f64dac
--- /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'))
diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix
index ca18ca194da..4c06f9126a9 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 00000000000..ce166b4b87d
--- /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</button>''' % (
+     ##########################################################################
+ 
+     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)