From c46eda3c6cecad079b343160ff780c0ae1c706c3 Mon Sep 17 00:00:00 2001 From: Ivan Petkov Date: Thu, 18 May 2023 11:56:29 -0700 Subject: [PATCH] cargo-ndk: support Darwin builds --- pkgs/development/tools/rust/cargo-ndk/default.nix | 8 +++++++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-ndk/default.nix b/pkgs/development/tools/rust/cargo-ndk/default.nix index 148a35014fd1..1c8c6a24b1e2 100644 --- a/pkgs/development/tools/rust/cargo-ndk/default.nix +++ b/pkgs/development/tools/rust/cargo-ndk/default.nix @@ -2,6 +2,8 @@ , stdenv , rustPlatform , fetchFromGitHub +, CoreGraphics +, Foundation }: rustPlatform.buildRustPackage rec { @@ -17,12 +19,16 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-UEQ+6N7D1/+vhdzYthcTP1YuVEmo5llrpndKuwmrjKc="; + buildInputs = lib.optionals stdenv.isDarwin [ + CoreGraphics + Foundation + ]; + meta = with lib; { description = "Cargo extension for building Android NDK projects"; homepage = "https://github.com/bbqsrc/cargo-ndk"; license = with licenses; [ asl20 /* or */ mit ]; maintainers = with maintainers; [ mglolenstine ]; - platforms = platforms.linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a892fef32e01..c23224696e36 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16376,7 +16376,9 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; - cargo-ndk = callPackage ../development/tools/rust/cargo-ndk { }; + cargo-ndk = callPackage ../development/tools/rust/cargo-ndk { + inherit (darwin.apple_sdk.frameworks) CoreGraphics Foundation; + }; cargo-nextest = callPackage ../development/tools/rust/cargo-nextest { inherit (darwin.apple_sdk.frameworks) Security;