Package Details: anki-git r11894.f927aa578-1

Git Clone URL: https://aur.archlinux.org/anki-git.git (read-only, click to copy)
Package Base: anki-git
Description: Helps you remember facts (like words/phrases in a foreign language) efficiently
Upstream URL: https://github.com/ankitects/anki
Keywords: anki memorise memory study
Licenses: AGPL-3.0-or-later
Conflicts: anki, anki-bin, anki-official-binary-bundle, anki20
Provides: anki
Submitter: degeberg
Maintainer: blackthorne
Last Packager: blackthorne
Votes: 25
Popularity: 0.000004
First Submitted: 2017-02-12 11:51 (UTC)
Last Updated: 2025-07-07 06:18 (UTC)

Required by (2)

Sources (2)

Pinned Comments

blackthorne commented on 2025-05-09 19:48 (UTC)

the PKGBUILD should be compiling now. if not, please let me know. i'll try and clean up the PKGBUILD soon, try and get rid of the AUR dependency, compiler optimization flags, etc.

@hmry thanks for the rust-clang-linking fix.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 .. 13 Next › Last »

homocomputeris commented on 2022-02-06 18:13 (UTC)

Doesn't build anymore:

package()...
WARNING: Requirement 'bazel-bin/pylib/anki/anki-*.whl' looks like a filename, but the file does not exist
ERROR: anki-*.whl is not a valid wheel filename.

DarkShadow44 commented on 2021-12-13 23:56 (UTC)

@magnus-tesshu I don't know when or why it happens, I had it the last time I built it...

magnus-tesshu commented on 2021-12-13 22:38 (UTC) (edited on 2021-12-13 22:38 (UTC) by magnus-tesshu)

By the way DarkShadow, is bazel breaking the build still known to be an issue? It could almost certainly be resolved by setting one of XDG_CACHE_HOME or HOME environment variables in the PKGBUILD to /tmp/something.

If the issue doesn't happen consistently, it's best not to do that I think. It builds fine for me.

homocomputeris commented on 2021-12-12 18:53 (UTC) (edited on 2022-04-13 11:15 (UTC) by homocomputeris)

@magnus-tesshu Try this:

# Maintainer:  Fabian Maurer<dark.shadow4@web.de>
# Contributor: Martin Dünkelmann<nc-duenkekl3@netcologne.de>
# Contributor: Shaoyu Tseng<zandimna@autistici.org>
# Contributor: Daniel Egeberg <daniel.egeberg@gmail.com
# Contributor: Sławomir Kowalski <suawekk+aur@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Timm Preetz <timm@preetz.us>
# Contributor: Michael 'manveru' Fellinger <m.fellinger@gmail.com>
# Contributor: Dave Pretty <david dot pretty at gmail dot com>

pkgname=anki-git
pkgver=r9370.29c48a60e
pkgrel=1
pkgdesc="Helps you remember things (like words or phrases in a foreign language) efficiently"
url="https://apps.ankiweb.net/"
license=('AGPL3')
arch=('any')
provides=('anki')
conflicts=('anki' 'anki20' 'anki-official-binary-bundle')
depends=(
    # anki and aqt
    'python-beautifulsoup4'
    'python-requests'
    'python-wheel'

    # anki
    'python-pysocks' # requests[socks]
    'python-decorator'
    'python-protobuf'
    'python-orjson'
    'python-distro'
    'python-stringcase'

    # aqt
    'python-send2trash'
    'python-markdown'
    'python-jsonschema'
    'python-pyaudio'
    'python-pyqt6-webengine'
    'python-flask'
    'python-flask-cors'
    'python-waitress'
    'python-pyqt6'
)
makedepends=(
    'git'
    'rsync'

    'bazel'
    'clang'

    'maturin'
    'rust'

    'python-pip'
    'python-mypy-protobuf'
    'npm'
    'typescript'
    'jre11-openjdk'
)
optdepends=(
    'lame: record sound'
    'mpv: play sound (preferred)'
    'mplayer: play sound'
)
source=(
    $pkgname::git+https://github.com/dae/anki.git
)
sha512sums=('SKIP')

pkgver() {
    cd "$pkgname"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "$pkgname"
    echo "build --action_env=PYO3_PYTHON=/usr/bin/python3" > "$srcdir/$pkgname/user.bazelrc"
}

build() {
    cd "$pkgname"

    export CC=/usr/bin/clang
    export CXX=/usr/bin/clang++
    export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
    ./tools/build
}

package() {
    cd "$pkgname"
    PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps .bazel/out/dist/anki-*.whl .bazel/out/dist/aqt-*.whl

    install -Dm755 qt/runanki.py "$pkgdir"/usr/bin/anki
    install -Dm644 qt/bundle/lin/anki.desktop "$pkgdir"/usr/share/applications/anki.desktop
    install -Dm644 qt/bundle/lin/anki.png "$pkgdir"/usr/share/pixmaps/anki.png
}

magnus-tesshu commented on 2021-12-09 02:31 (UTC)

@homocomputeris how would one go about doing that?

homocomputeris commented on 2021-12-08 23:51 (UTC)

It can be successfully built with Qt6 now.

DarkShadow44 commented on 2021-12-08 20:09 (UTC)

Thanks, put the patch in!

magnus-tesshu commented on 2021-12-08 07:31 (UTC)

The following patch fixes the build:

 ╭─mag@magnus in repo: anki-git on  master [!] took 12s
 ╰─λ git --no-pager diff
diff --git a/PKGBUILD b/PKGBUILD
index ee10039..3b89b5a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
 # Contributor: Dave Pretty <david dot pretty at gmail dot com>

 pkgname=anki-git
-pkgver=r9014.5a3999d0c
+pkgver=r9064.ed5273fae
 pkgrel=1
 pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently"
 url="http://ankisrs.net/"
@@ -56,6 +56,8 @@ makedepends=(
     'python-mypy-protobuf'
     'npm'
     'typescript'
+
+    'jre11-openjdk'
 )
 optdepends=(
     'lame: record sound'
@@ -93,6 +95,9 @@ build() {

     export CC=/usr/bin/clang
     export CXX=/usr/bin/clang++
+
+    export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
+
     ./scripts/build
 }

It's just two lines, you can probably manually do it; add a makedepend for jre11-openjdk and export JAVA_HOME before running the build

DarkShadow44 commented on 2021-11-29 06:47 (UTC) (edited on 2021-12-08 20:10 (UTC) by DarkShadow44)

Common Issues - Read before reporting
Processing ./bazel-bin/qt/aqt/aqt-2.1.48-py3-none-any.whl
ERROR: Cannot install aqt 2.1.47 (from /var/cache/yay/anki-git/src/anki-git/bazel-bin/qt/aqt/aqt-2.1.47-py3-none-any.whl) and aqt 2.1.48 (from /var/cache/yay/anki-git/src/anki-git/bazel-bin/qt/aqt/aqt-2.1.48-py3-none-any.whl) because these package versions have conflicting dependencies.

Try deleting ~/.cache/bazel

If someone can provide a fix for those issues for the PKGBUILD I'd be thankful, but in the meantime I add this as FAQ.

DarkShadow44 commented on 2021-11-29 06:44 (UTC)

I'll take over maintenance. But please report any issues you have in the comments!