mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
anki: 2.1.66 -> 23.10.1
This commit is contained in:
parent
7301329494
commit
97933ba142
1659
pkgs/games/anki/Cargo.lock
generated
1659
pkgs/games/anki/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -27,21 +27,21 @@
|
||||
|
||||
let
|
||||
pname = "anki";
|
||||
version = "2.1.66";
|
||||
rev = "70506aeb99d4afbe73321feaf75a2fabaa011d55";
|
||||
version = "23.10.1";
|
||||
rev = "fac9e0ee1436ba5ac3366c72dd9394a6e692b1cf";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ankitects";
|
||||
repo = "anki";
|
||||
rev = version;
|
||||
hash = "sha256-eE64i/jTMvipakbQXzKu/dN+dyim7E4M+eP3d9GZhII=";
|
||||
hash = "sha256-leGdamjCehffv2ByL7JWdaUhxRA4ZEPRKxBphUVzfRw=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"csv-1.1.6" = "sha256-w728ffOVkI+IfK6FbmkGhr0CjuyqgJnPB1kutMJIUYg=";
|
||||
"fsrs-0.1.0" = "sha256-bnLmJk2aaWBdgdsiasRrDG4NiTDMCDCXotCSoc0ldlk=";
|
||||
"linkcheck-0.4.1" = "sha256-S93J1cDzMlzDjcvz/WABmv8CEC6x78E+f7nzhsN7NkE=";
|
||||
"percent-encoding-iri-2.2.0" = "sha256-kCBeS1PNExyJd4jWfDfctxq6iTdAq69jtxFQgCCQ8kQ=";
|
||||
};
|
||||
@ -49,7 +49,7 @@ let
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
hash = "sha256-3DUiwGTg7Nzd+bPJlc8aUW8bYrl7BF+CcjqkF6nW0qc=";
|
||||
hash = "sha256-ckpKxALSpZAu5xyBOYzMcNDQDfCMaYAtSGONHTCBhw4=";
|
||||
};
|
||||
|
||||
anki-build-python = python3.withPackages (ps: with ps; [
|
||||
@ -121,13 +121,13 @@ in
|
||||
python3.pkgs.buildPythonApplication {
|
||||
inherit pname version;
|
||||
|
||||
outputs = [ "doc" "man" "out" ];
|
||||
outputs = [ "out" "doc" "man" ];
|
||||
|
||||
inherit src;
|
||||
|
||||
patches = [
|
||||
./patches/gl-fixup.patch
|
||||
./patches/no-update-check.patch
|
||||
./patches/disable-auto-update.patch
|
||||
./patches/remove-the-gl-library-workaround.patch
|
||||
./patches/skip-formatting-python-code.patch
|
||||
];
|
||||
|
||||
|
15
pkgs/games/anki/patches/disable-auto-update.patch
Normal file
15
pkgs/games/anki/patches/disable-auto-update.patch
Normal 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
|
@ -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)
|
@ -1,10 +1,10 @@
|
||||
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
|
||||
+++ b/qt/aqt/__init__.py
|
||||
@@ -402,12 +402,6 @@ def parseArgs(argv: list[str]) -> tuple[argparse.Namespace, list[str]]:
|
||||
def setupGL(pm: aqt.profiles.ProfileManager) -> None:
|
||||
driver = pm.video_driver()
|
||||
@@ -402,12 +402,6 @@ def setupGL(pm: aqt.profiles.ProfileManager) -> None:
|
||||
# RHI errors are emitted multiple times so make sure we only handle them once
|
||||
driver_failed = False
|
||||
|
||||
- # work around pyqt loading wrong GL library
|
||||
- if is_lin:
|
||||
@ -15,3 +15,5 @@ index 352848cfd..3fd5d0769 100644
|
||||
# catch opengl errors
|
||||
def msgHandler(category: Any, ctx: Any, msg: Any) -> None:
|
||||
if category == QtMsgType.QtDebugMsg:
|
||||
--
|
||||
2.42.0
|
@ -1,31 +1,21 @@
|
||||
From 104572dc7ebb75061b867158ce3d4311d8cf4594 Mon Sep 17 00:00:00 2001
|
||||
From: Euan Kemp <euank@euank.com>
|
||||
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 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
pylib/tools/hookslib.py | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
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
|
||||
+++ b/pylib/tools/hookslib.py
|
||||
@@ -82,7 +82,7 @@ class Hook:
|
||||
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):
|
||||
@@ -208,4 +208,3 @@ def write_file(path: str, hooks: list[Hook], prefix: str, suffix: str):
|
||||
os.environ["USERPROFILE"] = os.environ["HOME"]
|
||||
with open(path, "wb") as file:
|
||||
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)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
Loading…
Reference in New Issue
Block a user