mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
f1389c6db1
rust 1.80 requires updating the 'time' crate to at least 0.3.35. That update is already in anki's master branch but it isn't anywhere close to time for a new release, so just bump time and only time manually for our tree. (This also fixes anki-sync-server which usese the same sources/Cargo deps, when removing the patch during the next update it will need to be removed from both files as written in comment) Link: https://github.com/NixOS/nixpkgs/issues/332957
45 lines
870 B
Nix
45 lines
870 B
Nix
{ 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"
|
|
];
|
|
|
|
nativeBuildInputs = [ protobuf pkg-config ];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
] ++ lib.optionals stdenv.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";
|
|
};
|
|
}
|