nixos/anki-sync-server: init#257692
Conversation
17a4154 to
0fbad71
Compare
|
@martinetd as maintainer of ankisyncd. |
0fbad71 to
f129a21
Compare
de11n
left a comment
There was a problem hiding this comment.
I don't know anything about Anki so I just have random stylistic comments.
|
@de11n in the manual test, why isn't my introduced option |
martinetd
left a comment
There was a problem hiding this comment.
Thanks for your work! Everything about packaging anki has been a pain to me, so anyone working on this is greatly appreciated.
I've got a few high level questions first, didn't look at the module itself yet; I'll take a bit of time for that this weekend.
de11n
left a comment
There was a problem hiding this comment.
Much better! Thanks! I'll let others take it from here who actually know what Anki does. 😄
06aa013 to
08a5df2
Compare
There was a problem hiding this comment.
I've played with this a bit, rebased and added a few commits in https://github.com/martinetd/nixpkgs/commits/anki-sync-server-nixos
I didn't have anywhere to cmment individually, but this is missing adding the module to nixos/modules/module-list.nix ( martinetd@ccfbafe ); which makes this hard to use :) Took me a while to understand why test didn't find services.anki-sync-server !
I've added a nixosTests and switched to the pending anki-sync-server binary; not quite sure what to do order-wise here wrt this PR, but it's identical to anki --syncserver so this is probably fine to do later.
(We might want to change services.anki-sync-server.package in favor of something like server_command that'd be either "${pkgs.anki}/bin/anki --syncserver" or "${pkgs.anki-sync-server}/bin/anki-sync-server" ...)
The added test needs the 23.10beta6 update because anki's internal changed a tiny little bit (at least col.sync_collection(login, False) needs to be changed to col.sync_collection(login) for 2.1.66); I think rest would work)
The tests need updating for 23.10 so I've split the test commit and its update as we probably don't want to wait for anki update (the anki-sync-server package looks like it'll get in fast enough to use)
Last would be to really decide how we want the modules to evolve.
Keeping both services.ankisyncd and services.anki-sync-server might seem good at first but data migration will be a pain later because we'll have users with data in either directory: I'd be in favor of replacing services.ankisyncd with this, keeping just the data path working as said last week.
WDYT?
08a5df2 to
986be5e
Compare
anki-sync-server will be used in new ankisyncd module. anki itself was slightly modified to add its cargoLock as passthru so we can use it for anki-sync-server as it's built from the same sources. Link: NixOS#257692 Co-authored-by: Pavel Sobolev <paveloom@riseup.net> Co-authored-by: h7x4 <h7x4@nani.wtf>
986be5e to
bc008d4
Compare
|
@martinetd sorry for not getting back earlier - I didn't realize you had committed so many changes on your branch. I've pushed your commits to this PR. I am going to have to rebase to master to fix some merge conflicts in the docs. |
martinetd
left a comment
There was a problem hiding this comment.
(Last review before you update the package -- as far as I'm concerned, the new module is good to go, just these small details + anki update left)
f51d529 to
01ab485
Compare
|
@martinetd Can we drop the initial commit with 2.1.66 and directly start at 23.10 (ideally 23.10.1)? I presume so |
01ab485 to
b5bd54c
Compare
Sure feel free to rewrite history, but the commit should be separate as it updates anki too, not just anki-sync-server. |
b5bd54c to
1580f5d
Compare
I started with 2.1.66 and make a separate commit to update to 23.10.1. |
|
@de11n @martinetd can one of you merge? |
|
I would suggest making this dependent on #264796 and marking as a draft until that PR is merged. |
martinetd
left a comment
There was a problem hiding this comment.
I would suggest making this dependent on #264796 and marking as a draft until that PR is merged.
It's been open for a while but I guess it's likely the other PR will get in first...
We don't actually really care about which version gets in except for the test that breaks; we could just remove the version update and test addition for now and add it in a later PR @telotortium ?
That way this PR won't need to wait on anything.
And I do not have merge rights, sorry. Once the release note comment is fixed up we can bring it up in https://discourse.nixos.org/t/prs-already-reviewed/2617 and someone should take a look.
There was a problem hiding this comment.
(continuing other outdated thread here)
happy to make the modification in the ankisyncd module later but this is just wrong as clients supported are the same, let's just write will be deprecated or something.
There was a problem hiding this comment.
This should probably be done in a PR deprecating the module, I think.
There was a problem hiding this comment.
Sure, I see you removed the mention about older clients -- this is fine with me
anki-sync-server will be used in new ankisyncd module. anki itself was slightly modified to add its cargoLock as passthru so we can use it for anki-sync-server as it's built from the same sources. Link: NixOS#257692 Co-authored-by: Pavel Sobolev <paveloom@riseup.net> Co-authored-by: h7x4 <h7x4@nani.wtf>
|
@wegank merged both the anki update and the anki-sync-server package addition just now (Thanks!!) I'll rebase this and fix the release notes wording tonight if you don't have time before me; shouldn't be much longer :) |
de55e00 to
17100af
Compare
|
@ofborg build anki.passthru.tests |
Provide a NixOS module for the [built-in Anki Sync Server](https://docs.ankiweb.net/sync-server.html) included in recent versions of Anki. This supersedes the `ankisyncd` module, but we should keep that for now because `ankisyncd` supports older versions of Anki clients than this module.
Start anki-sync-server service and drive anki manually through its python lib to test sync. The anki python part isn't a stable API and might require freqent rework, let's see if it holds up...
17100af to
f0f6c77
Compare
|
@wegank can we merge? |
Description of changes
Provide a NixOS module for the built-in Anki Sync Server included in recent versions of Anki. This supersedes the
ankisyncdmodule, but we should keep that for now becauseankisyncdsupports older versions of Anki clients than this module.Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)