From 9dea01228a5a1867391dff56e92a64b88d3fd09f Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 28 Nov 2024 10:55:51 -0500 Subject: [PATCH 1/2] anki-sync-server: fix cross compilation --- pkgs/games/anki/sync-server.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/games/anki/sync-server.nix b/pkgs/games/anki/sync-server.nix index 0b351ae3ffad..6ef2c3279b81 100644 --- a/pkgs/games/anki/sync-server.nix +++ b/pkgs/games/anki/sync-server.nix @@ -6,7 +6,7 @@ , openssl , pkg-config -, protobuf +, buildPackages }: rustPlatform.buildRustPackage { @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage { "--skip=scheduler::answering::test::state_application" ]; - nativeBuildInputs = [ protobuf pkg-config ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage { darwin.apple_sdk.frameworks.SystemConfiguration ]; - env.PROTOC = lib.getExe protobuf; + env.PROTOC = lib.getExe buildPackages.protobuf; meta = with lib; { description = "Standalone official anki sync server"; From 3f7d6de841ca6a3f00c5866771c013a064efd400 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 28 Nov 2024 10:56:57 -0500 Subject: [PATCH 2/2] anki-sync-server: use new darwin sdk pattern, format with nixfmt --- pkgs/games/anki/sync-server.nix | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/pkgs/games/anki/sync-server.nix b/pkgs/games/anki/sync-server.nix index 6ef2c3279b81..a312887f5d27 100644 --- a/pkgs/games/anki/sync-server.nix +++ b/pkgs/games/anki/sync-server.nix @@ -1,12 +1,11 @@ -{ lib -, stdenv -, rustPlatform -, anki -, darwin +{ + lib, + rustPlatform, + anki, -, openssl -, pkg-config -, buildPackages + openssl, + pkg-config, + buildPackages, }: rustPlatform.buildRustPackage { @@ -30,22 +29,21 @@ rustPlatform.buildRustPackage { "--skip=scheduler::answering::test::state_application" ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + ]; buildInputs = [ openssl - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.Security - darwin.apple_sdk.frameworks.SystemConfiguration ]; env.PROTOC = lib.getExe buildPackages.protobuf; - meta = with lib; { + meta = { description = "Standalone official anki sync server"; homepage = "https://apps.ankiweb.net"; - license = with licenses; [ agpl3Plus ]; - maintainers = with maintainers; [ martinetd ]; + license = with lib.licenses; [ agpl3Plus ]; + maintainers = with lib.maintainers; [ martinetd ]; mainProgram = "anki-sync-server"; }; }