mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
anki-sync-server: init at 2.1.66
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>
This commit is contained in:
parent
c03e3716fc
commit
c305510073
|
@ -38,7 +38,7 @@ let
|
|||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock {
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"fsrs-0.1.0" = "sha256-bnLmJk2aaWBdgdsiasRrDG4NiTDMCDCXotCSoc0ldlk=";
|
||||
|
@ -46,6 +46,7 @@ let
|
|||
"percent-encoding-iri-2.2.0" = "sha256-kCBeS1PNExyJd4jWfDfctxq6iTdAq69jtxFQgCCQ8kQ=";
|
||||
};
|
||||
};
|
||||
cargoDeps = rustPlatform.importCargoLock cargoLock;
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
|
@ -266,6 +267,11 @@ python3.pkgs.buildPythonApplication {
|
|||
)
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
# cargoLock is reused in anki-sync-server
|
||||
inherit cargoLock;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Spaced repetition flashcard program";
|
||||
longDescription = ''
|
||||
|
|
40
pkgs/games/anki/sync-server.nix
Normal file
40
pkgs/games/anki/sync-server.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ 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";
|
||||
};
|
||||
}
|
|
@ -37534,6 +37534,7 @@ with pkgs;
|
|||
inherit (darwin.apple_sdk.frameworks) AVKit CoreAudio;
|
||||
};
|
||||
anki-bin = callPackage ../games/anki/bin.nix { };
|
||||
anki-sync-server = callPackage ../games/anki/sync-server.nix { };
|
||||
|
||||
armagetronad = callPackage ../games/armagetronad { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue