1{
2 lib,
3 rustPlatform,
4 anki,
5
6 openssl,
7 pkg-config,
8 buildPackages,
9}:
10
11rustPlatform.buildRustPackage {
12 pname = "anki-sync-server";
13 inherit (anki) version src cargoDeps;
14
15 # only build sync server
16 cargoBuildFlags = [
17 "--bin"
18 "anki-sync-server"
19 ];
20
21 checkFlags = [
22 # this test is flaky, see https://github.com/ankitects/anki/issues/3619
23 # also remove from anki when removing this
24 "--skip=deckconfig::update::test::should_keep_at_least_one_remaining_relearning_step"
25 ];
26
27 nativeBuildInputs = [
28 pkg-config
29 ];
30
31 buildInputs = [
32 openssl
33 ];
34
35 env.PROTOC = lib.getExe buildPackages.protobuf;
36
37 meta = {
38 description = "Standalone official anki sync server";
39 homepage = "https://apps.ankiweb.net";
40 license = with lib.licenses; [ agpl3Plus ];
41 maintainers = with lib.maintainers; [ martinetd ];
42 mainProgram = "anki-sync-server";
43 };
44}