13 inherit (darwin.apple_sdk.frameworks) CoreServices;
14 pname = "cargo-mobile2";
17 rustPlatform.buildRustPackage {
18 inherit pname version;
19 src = fetchFromGitHub {
22 rev = "cargo-mobile2-v${version}";
23 hash = "sha256-HLDuWEKLij1hTKxf3lrAb4d2DIHzzkj4kuiZXgQwH4Q=";
26 # Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at
27 # https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202
28 # sourceRoot = "${src.name}/tooling/cli";
30 cargoHash = "sha256-jCsP5xhNkqnwz8HocUzzf17omU8WDNrL/WVj/lP+51w=";
34 # during the install process tauri-mobile puts templates and commit information in CARGO_HOME
35 export CARGO_HOME=$out/share/
38 buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ CoreServices ];
39 nativeBuildInputs = [ pkg-config git makeWrapper ];
42 for bin in $out/bin/cargo-*; do
44 --set CARGO_HOME "$out/share"
49 description = "Rust on mobile made easy! ";
50 homepage = "https://tauri.app/";
51 license = with licenses; [ asl20 /* or */ mit ];
52 maintainers = with maintainers; [ happysalada ];