mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
c305510073
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: https://github.com/NixOS/nixpkgs/pull/257692 Co-authored-by: Pavel Sobolev <paveloom@riseup.net> Co-authored-by: h7x4 <h7x4@nani.wtf>
41 lines
793 B
Nix
41 lines
793 B
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, anki
|
|
, darwin
|
|
|
|
, openssl
|
|
, pkg-config
|
|
, protobuf
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage {
|
|
pname = "anki-sync-server";
|
|
inherit (anki) version src cargoLock;
|
|
|
|
# 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";
|
|
};
|
|
}
|