-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
anki: 2.1.15 -> 2.1.60 #221229
anki: 2.1.15 -> 2.1.60 #221229
Conversation
I'm using my own anki server and setting the with that said -- awesome work. I agree not using pyoxidizer makes more sense for nixos, and I'll try to get my sync server working with this (been using the pip version as the ankisyncd in nixpkgs is too old and updating it requires a new anki...) when I find the time to try :) |
I figured out what was wrong with syncing - I forgot to add Easy enough to fix, and syncing seems happy now 😀 |
Back to draft. While it now launches and syncs, the review and stats pages are blank, and it produces some javascript errors. Something's still wrong with the packaging I guess. |
bd4a249
to
f5d0635
Compare
Found it! I was missing applying this patch: https://github.com/ankitects/anki/blob/2.1.60/ts/patches/protobufjs%2B7.2.1.patch I missed that they had a After fixing that, it all seems to work! |
I've updated the top-level comment with a bit more detail. I think this is ready for review now! I'd also appreciate if someone with a mac could see if it works there |
, CoreAudio | ||
# This little flag adds a huge number of dependencies, but we assume that | ||
# everyone wants Anki to draw plots with statistics by default. | ||
, plotsSupport ? true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this used to pull in matplotlib, but grepping around in the repo, it looks like they don't use that anymore, so we can drop this.
Result of 1 package failed to build:
2 packages built:
|
@euank sorry for getting back to you so late. Yes, the Qt6 modifications worked, and I'm now able to launch Anki without any issues. If anything else comes up, I'll try to let you know as soon as possible. |
opened #224366 for ankisyncd rust package update (addition) and service update |
Thanks @martinetd! Since I personally think this PR's good to merge at this point (and it has a couple approvals), I'll ping the PRs already reviewed thread in a couple days if no one here objects or merges it before then. |
@euank I tried rebuilding this after cherry-picking on master and I can no longer build
It looks like you'll need to switch to lockFile with a Cargo.lock in nixpkgs like I did for anki-sync-server-rs in the other PR (I assume they turned on fixed-output derivation style building recently? I'm pretty sure I was able to build on this system on your branch before rebasing... will recheck and update if not. |
Yup, indeed, it looks like since #221716 landed on master, I need to switch over as it says. I'll give that a go now |
Updating anki in the next commit will break it otherwise.
The automated tool couldn't get all of it, but it was easy enough to do the rest by hand. Updated, verified it builds and launches after converting it from |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Builds and works on plasma/wayland (through Xwayland).
@@ -11,7 +10,8 @@ python3.pkgs.buildPythonApplication rec { | |||
owner = "ankicommunity"; | |||
repo = "anki-sync-server"; | |||
rev = version; | |||
sha256 = "196xhd6vzp1ncr3ahz0bv0gp1ap2s37j8v48dwmvaywzayakqdab"; | |||
hash = "sha256-RXrdJGJ+HMSpDGQBuVPPqsh3+uwAgE6f7ZJ0yFRMI8I="; | |||
fetchSubmodules = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.4.0 no longer requires submodules https://github.com/ankicommunity/anki-sync-server/tree/v2.4.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review!
anki-sync-server 2.4.0 still requires anki from pypi, so it's not going to be a straightforward change (and the update isn't as simple as bumping the version number)
The current discussion seems to favor just getting rid of this flavor of ankisyncd in favor of the rust one (being discussed in #224366 ) so I'd say to just not touch ankisyncd here more than we have to for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, as discussed in #224366 and previously in this pr, I don't think it's worth updating it (nor is it easy to do so).
I'm just trying to leave it functioning at all since this PR would otherwise break it, and then we can deal with it separately
This redoes all the packaging for their new build-system. It feels a bit fragile, but in practice it works. Basically, we build most of it in nix, write some wrapper scripts to mock out stuff we just did in nix, and then call thier build system to make a wheel
Thanks to Lucio for pointing this one out, appreciated
Thank you! |
Description of changes
This updates the native packaging of anki for their new ninja-based build-system.
It's somewhat fragile feeling since their build-system isn't exactly designed for nix, but it does appear to work!
The high-level approach is that we do stuff like create node_modules, download stuff, create a python environment with nix, then we mock out a couple of things they run with our own stub bash scripts.
The upstream build system is responsible for building rust code and python wheels, and the nix derivation is responsible for getting node_modules in place, vendoring cargo deps, and all the other usual stuff like setting buildinputs.
After getting the wheel, we do normal python application packaging stuff.
I'm also happy to report that ibus based IME works on this one, unlike
anki-bin
, which was my main motivation for tackling this in the first place, so that's awesome!I haven't tested this on macOS at all since I don't have macOS hardware, so someone else will have to see what's broken there!
Fixes #78449, Fixes #112921
Helps with #147989
Things done
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)