blob: 0b351ae3ffade3b65dc29d50ee77f0f537134ee5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{ lib
, stdenv
, rustPlatform
, anki
, darwin
, openssl
, pkg-config
, protobuf
}:
rustPlatform.buildRustPackage {
pname = "anki-sync-server";
inherit (anki) version src cargoLock;
patches = [
./patches/Cargo.lock-update-time-for-rust-1.80.patch
];
# only build sync server
cargoBuildFlags = [
"--bin"
"anki-sync-server"
];
checkFlags = [
# these two tests are flaky, see https://github.com/ankitects/anki/issues/3353
# Also removed from anki when removing this.
"--skip=media::check::test::unicode_normalization"
"--skip=scheduler::answering::test::state_application"
];
nativeBuildInputs = [ protobuf pkg-config ];
buildInputs = [
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
env.PROTOC = lib.getExe protobuf;
meta = with lib; {
description = "Standalone official anki sync server";
homepage = "https://apps.ankiweb.net";
license = with licenses; [ agpl3Plus ];
maintainers = with maintainers; [ martinetd ];
mainProgram = "anki-sync-server";
};
}
|