New comment by fosslinux on void-packages repository https://github.com/void-linux/void-packages/pull/31382#issuecomment-858391644 Comment: I have attempted this in the past. Your bazel template looks sane. Bazel is not sane. Neither is anki, has a stupid mix of nodejs, bazel, python and rust. Here's my template thus far, not for the latest version yet: ``` # Template file for 'anki' pkgname=anki version=2.1.42 revision=1 hostmakedepends="bazel python3-pip git protobuf rust cargo rsync" makedepends="protobuf-devel glib-devel python3-PyQt5-webengine" depends="python3-PyQt5-webengine python3-requests python3-SQLAlchemy python3-PyAudio python3-mpv python3-Markdown python3-send2trash python3-BeautifulSoup4 python3-decorator python3-jsonschema python3-protobuf python3-Flask-Cors python3-waitress" short_desc="Spaced repetition flashcard program" maintainer="fosslinux " license="AGPL-3.0-or-later" homepage="https://apps.ankiweb.net" changelog="https://apps.ankiweb.net/docs/changes.html" distfiles="https://github.com/ankitects/anki/archive/${version}.tar.gz" checksum=a23e1ad9cc9d2ec2031810c847ae15efcd315123c7e0c3b3def40bd6d451d9c9 python_version=3 patch_args="-Np1" do_build() { # Bazel dies on ccache if [ "$CROSS_BUILD" ]; then export CC="$(command -v ${XBPS_CROSS_TRIPLET}-gcc)" else export CC="$(command -v gcc)" fi export PYTHON_SITE_PACKAGES="${XBPS_CROSS_BASE}/${py3_sitelib}" bazel build -c opt dist --jobs=1 bsdtar -xf bazel-bin/dist.tar } do_install() { # I dislike bazel PIP_CONFIG_FILE=/dev/null TMPDIR=/tmp python3 -m pip install --isolated --root=${DESTDIR} --prefix=/usr --ignore-installed --no-deps bazel-dist/*.whl vbin qt/runanki.py anki vinstall qt/linux/anki.desktop 644 usr/share/applications vinstall qt/linux/anki.png 644 usr/share/pixmaps vinstall qt/linux/anki.xpm 644 usr/share/pixmaps vman qt/linux/anki.1 vlicense LICENSE } ``` Haven't worked on it for a while. Cross is still broken IIRC. Mutlicore building is broken last I checked. Musl is broken (you may need a patch for bazel for musl which I have also).