Skip to content

anki: remove uv.lock, use nixpkgs versions of python deps - #498788

Merged
dotlambda merged 1 commit into
NixOS:masterfrom
euank:anki-no-uvlock
Mar 13, 2026
Merged

anki: remove uv.lock, use nixpkgs versions of python deps#498788
dotlambda merged 1 commit into
NixOS:masterfrom
euank:anki-no-uvlock

Conversation

@euank

@euank euank commented Mar 11, 2026

Copy link
Copy Markdown
Member

See #498089, the hack that was previously introduced for using upstream's python package versions isn't acceptable in nixpkgs.

Things seem to work from just running anki with this and clicking around; if there's more subtle breakages, we'll have to play whackamole with nixpkgs versions.

This also deletes the update.sh script, since that will end up having to be shaped somewhat differently after this change. It seems pragmatic to add it back as a followup.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@euank
euank requested a review from dotlambda March 11, 2026 09:45
@nixpkgs-ci
nixpkgs-ci Bot requested review from JuneStepp and oxij March 11, 2026 09:50
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Mar 11, 2026

@dotlambda dotlambda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!
I wonder if we can build the structure inside pyenv using symlinks rather than having uv do so from wheels.

Comment thread pkgs/by-name/an/anki/package.nix Outdated
See NixOS#498089, the hack that was
previously introduced for using upstream's python package versions isn't
acceptable in nixpkgs.

Things seem to work from just running anki with this and clicking
around; if there's more subtle breakages, we'll have to play whackamole
with nixpkgs versions.

This also deletes the `update.sh` script, since that will end up having
to be shaped somewhat differently after this change.
It seems pragmatic to add it back as a followup.
@euank

euank commented Mar 13, 2026

Copy link
Copy Markdown
Member Author

I wonder if we can build the structure inside pyenv using symlinks rather than having uv do so from wheels.

This is more difficult I think. The anki build code expects to write to that directory, and it also invokes uv directly, so we can't dodge uv too hard.

Basically, we're populating uv's cache so that anki's build tool can then successfully invoke uv.

iirc it's this code, though it could also be being run somewhere else in build

https://github.com/ankitects/anki/blob/1b5f60a41e8fedcb6deb86c46616ccec71cdc5b2/build/runner/src/pyenv.rs#L45-L54

@dotlambda dotlambda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a strict improvement, even though we should try to avoid using uv completely.

@dotlambda
dotlambda added this pull request to the merge queue Mar 13, 2026
Merged via the queue into NixOS:master with commit a955b38 Mar 13, 2026
29 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants