about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorAlexey Shmalko <rasen.dubi@gmail.com>2018-12-04 16:26:25 +0200
committerGitHub <noreply@github.com>2018-12-04 16:26:25 +0200
commit33b9aa4f35fdc0220987c7f87c1204b5b76f21ad (patch)
tree0bfda504cc8fb9a392eadfe5f76e603d0327aca9 /pkgs/games
parentfc02ed8b304c544f9d67f49d78182ffd5b674e91 (diff)
parent19bffeee70043b7e9f8f7287b632078c05996d35 (diff)
downloadnixlib-33b9aa4f35fdc0220987c7f87c1204b5b76f21ad.tar
nixlib-33b9aa4f35fdc0220987c7f87c1204b5b76f21ad.tar.gz
nixlib-33b9aa4f35fdc0220987c7f87c1204b5b76f21ad.tar.bz2
nixlib-33b9aa4f35fdc0220987c7f87c1204b5b76f21ad.tar.lz
nixlib-33b9aa4f35fdc0220987c7f87c1204b5b76f21ad.tar.xz
nixlib-33b9aa4f35fdc0220987c7f87c1204b5b76f21ad.tar.zst
nixlib-33b9aa4f35fdc0220987c7f87c1204b5b76f21ad.zip
Merge pull request #51272 from binarin/anki-python3.7-fix
anki: 2.1.6-beta1 -> 2.1.6-beta2, fix python 3.7
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/anki/default.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix
index fb43640b2b12..3f837886116c 100644
--- a/pkgs/games/anki/default.nix
+++ b/pkgs/games/anki/default.nix
@@ -4,6 +4,7 @@
 , lib
 , python
 , fetchurl
+, fetchpatch
 , lame
 , mplayer
 , libpulseaudio
@@ -25,7 +26,7 @@
 }:
 
 buildPythonApplication rec {
-    version = "2.1.6-beta1";
+    version = "2.1.6-beta2";
     name = "anki-${version}";
 
     src = fetchurl {
@@ -35,7 +36,7 @@ buildPythonApplication rec {
         # "http://ankisrs.net/download/mirror/${name}.tgz"
         # "http://ankisrs.net/download/mirror/archive/${name}.tgz"
       ];
-      sha256 = "0yqn8qjx9dyf754jljhyyrk8mahii188nz0yifl1lr3py9sxzbsf";
+      sha256 = "0h71s1j1269x0b8481z8xf019caqglcjs32xlpzk72087ps169fa";
     };
 
     propagatedBuildInputs = [ pyqt5 sqlalchemy
@@ -53,6 +54,16 @@ buildPythonApplication rec {
     patches = [
       # Disable updated version check.
       ./no-version-check.patch
+
+      # This is needed to fix python 3.7 compatibilty, where the
+      # behaviour of `re.escape()` was changed in a way that it no
+      # longer escapes `%`. This patch detects this difference at
+      # runtime and makes anki work with any python version.
+      # Upstream PR: https://github.com/dae/anki/pull/266
+      (fetchpatch {
+        url = "https://github.com/dae/anki/commit/3d69aa9ce454a151ba75deafd7de117af2c7307d.patch";
+        sha256 = "0kf9gajhy0wcajp24xfia71z6gn1mc4vl37svvq4sqbhj3gigd0h";
+      })
     ];
 
     buildPhase = ''