anki: 2.1.66 -> 23.10.1

This commit is contained in:
Pavel Sobolev 2023-11-01 14:50:18 +03:00
parent 7301329494
commit 97933ba142
No known key found for this signature in database
6 changed files with 1032 additions and 707 deletions

File diff suppressed because it is too large Load Diff

View File

@ -27,21 +27,21 @@
let let
pname = "anki"; pname = "anki";
version = "2.1.66"; version = "23.10.1";
rev = "70506aeb99d4afbe73321feaf75a2fabaa011d55"; rev = "fac9e0ee1436ba5ac3366c72dd9394a6e692b1cf";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ankitects"; owner = "ankitects";
repo = "anki"; repo = "anki";
rev = version; rev = version;
hash = "sha256-eE64i/jTMvipakbQXzKu/dN+dyim7E4M+eP3d9GZhII="; hash = "sha256-leGdamjCehffv2ByL7JWdaUhxRA4ZEPRKxBphUVzfRw=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
cargoDeps = rustPlatform.importCargoLock { cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;
outputHashes = { outputHashes = {
"csv-1.1.6" = "sha256-w728ffOVkI+IfK6FbmkGhr0CjuyqgJnPB1kutMJIUYg="; "fsrs-0.1.0" = "sha256-bnLmJk2aaWBdgdsiasRrDG4NiTDMCDCXotCSoc0ldlk=";
"linkcheck-0.4.1" = "sha256-S93J1cDzMlzDjcvz/WABmv8CEC6x78E+f7nzhsN7NkE="; "linkcheck-0.4.1" = "sha256-S93J1cDzMlzDjcvz/WABmv8CEC6x78E+f7nzhsN7NkE=";
"percent-encoding-iri-2.2.0" = "sha256-kCBeS1PNExyJd4jWfDfctxq6iTdAq69jtxFQgCCQ8kQ="; "percent-encoding-iri-2.2.0" = "sha256-kCBeS1PNExyJd4jWfDfctxq6iTdAq69jtxFQgCCQ8kQ=";
}; };
@ -49,7 +49,7 @@ let
yarnOfflineCache = fetchYarnDeps { yarnOfflineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock"; yarnLock = "${src}/yarn.lock";
hash = "sha256-3DUiwGTg7Nzd+bPJlc8aUW8bYrl7BF+CcjqkF6nW0qc="; hash = "sha256-ckpKxALSpZAu5xyBOYzMcNDQDfCMaYAtSGONHTCBhw4=";
}; };
anki-build-python = python3.withPackages (ps: with ps; [ anki-build-python = python3.withPackages (ps: with ps; [
@ -121,13 +121,13 @@ in
python3.pkgs.buildPythonApplication { python3.pkgs.buildPythonApplication {
inherit pname version; inherit pname version;
outputs = [ "doc" "man" "out" ]; outputs = [ "out" "doc" "man" ];
inherit src; inherit src;
patches = [ patches = [
./patches/gl-fixup.patch ./patches/disable-auto-update.patch
./patches/no-update-check.patch ./patches/remove-the-gl-library-workaround.patch
./patches/skip-formatting-python-code.patch ./patches/skip-formatting-python-code.patch
]; ];

View File

@ -0,0 +1,15 @@
diff --git a/qt/aqt/main.py b/qt/aqt/main.py
index 6c634132d..f3f3d4d10 100644
--- a/qt/aqt/main.py
+++ b/qt/aqt/main.py
@@ -1421,6 +1421,8 @@ title="{}" {}>{}</button>""".format(
##########################################################################
def setup_auto_update(self, _log: list[DownloadLogEntry]) -> None:
+ return
+
from aqt.update import check_for_update
check_for_update()
--
2.42.0

View File

@ -1,13 +0,0 @@
diff --git a/qt/aqt/main.py b/qt/aqt/main.py
index 0f2764f66..c42a88402 100644
--- a/qt/aqt/main.py
+++ b/qt/aqt/main.py
@@ -1395,6 +1395,8 @@ title="{}" {}>{}</button>""".format(
##########################################################################
def setupAutoUpdate(self) -> None:
+ # nixpkgs patch; updates are managed by nix
+ return
import aqt.update
self.autoUpdate = aqt.update.LatestVersionFinder(self)

View File

@ -1,10 +1,10 @@
diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py
index 352848cfd..3fd5d0769 100644 index 6f28d2dd0..fcd6a5ee4 100644
--- a/qt/aqt/__init__.py --- a/qt/aqt/__init__.py
+++ b/qt/aqt/__init__.py +++ b/qt/aqt/__init__.py
@@ -402,12 +402,6 @@ def parseArgs(argv: list[str]) -> tuple[argparse.Namespace, list[str]]: @@ -402,12 +402,6 @@ def setupGL(pm: aqt.profiles.ProfileManager) -> None:
def setupGL(pm: aqt.profiles.ProfileManager) -> None: # RHI errors are emitted multiple times so make sure we only handle them once
driver = pm.video_driver() driver_failed = False
- # work around pyqt loading wrong GL library - # work around pyqt loading wrong GL library
- if is_lin: - if is_lin:
@ -15,3 +15,5 @@ index 352848cfd..3fd5d0769 100644
# catch opengl errors # catch opengl errors
def msgHandler(category: Any, ctx: Any, msg: Any) -> None: def msgHandler(category: Any, ctx: Any, msg: Any) -> None:
if category == QtMsgType.QtDebugMsg: if category == QtMsgType.QtDebugMsg:
--
2.42.0

View File

@ -1,31 +1,21 @@
From 104572dc7ebb75061b867158ce3d4311d8cf4594 Mon Sep 17 00:00:00 2001 From 104572dc7ebb75061b867158ce3d4311d8cf4594 Mon Sep 17 00:00:00 2001
From: Euan Kemp <euank@euank.com> From: Euan Kemp <euank@euank.com>
Date: Thu, 6 Jul 2023 10:05:15 +0900 Date: Thu, 6 Jul 2023 10:05:15 +0900
Subject: [PATCH] Skip formatting python code Subject: [PATCH] Skip formatting Python code.
Co-authored-by: Pavel Sobolev <paveloom@riseup.net>
--- ---
pylib/tools/hookslib.py | 4 ++-- pylib/tools/hookslib.py | 1 -
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 1 deletion(-)
diff --git a/pylib/tools/hookslib.py b/pylib/tools/hookslib.py diff --git a/pylib/tools/hookslib.py b/pylib/tools/hookslib.py
index 6361c633e..95ecb64a2 100644 index 6361c633e..6b16d3ec1 100644
--- a/pylib/tools/hookslib.py --- a/pylib/tools/hookslib.py
+++ b/pylib/tools/hookslib.py +++ b/pylib/tools/hookslib.py
@@ -82,7 +82,7 @@ class Hook: @@ -208,4 +208,3 @@ def write_file(path: str, hooks: list[Hook], prefix: str, suffix: str):
code = f"""\
class {self.classname()}:
{classdoc}{self.list_code()}
-
+
def append(self, callback: {self.callable()}) -> None:
'''{appenddoc}'''
self._hooks.append(callback)
@@ -208,4 +208,4 @@ def write_file(path: str, hooks: list[Hook], prefix: str, suffix: str):
os.environ["USERPROFILE"] = os.environ["HOME"] os.environ["USERPROFILE"] = os.environ["HOME"]
with open(path, "wb") as file: with open(path, "wb") as file:
file.write(code.encode("utf8")) file.write(code.encode("utf8"))
- subprocess.run([sys.executable, "-m", "black", "-q", path], check=True) - subprocess.run([sys.executable, "-m", "black", "-q", path], check=True)
+ # subprocess.run([sys.executable, "-m", "black", "-q", path], check=True) --
-- 2.42.0
2.40.1