-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example of using with ndk + android? #129
Comments
I'm successfully cross-compiling Android binaries on x86_64-linux using https://github.com/ipetkov/crane and this cross package set: https://github.com/rvolosatovs/nixify/blob/c06d74a4cebc2a149bef2e9237a9a08c135cad22/lib/rust/defaultPkgsFor.nix#L40 I'm using https://github.com/rui314/mold linker, but it should not matter, it's a pretty standard cross setup https://github.com/rvolosatovs/nixify/blob/c06d74a4cebc2a149bef2e9237a9a08c135cad22/lib/rust/mkAttrs.nix#L314-L398 |
Ok, this looks promising but is a complex nix. I tried using as in the examples: P.D: The sample branch is here {
inputs.nixify.url = github:rvolosatovs/nixify;
outputs = {nixify, ...}:
nixify.lib.rust.mkFlake {
src = ./.;
name = "rust-workspace";
build.workspace = true;
clippy.workspace = true;
test.workspace = true;
};
} and get ❯ nix build
warning: Git tree '/Users/mamcx/Proyectos/Apps' is dirty
error:
… while updating the lock file of flake 'git+file:///Users/mamcx/Proyectos/Apps?dir=RustStore'
… while updating the flake input 'nixify'
error: unsupported tarball input attribute 'lastModified' |
I've seen this error before with outdated Nix versions, you may want to update your Nix version (also, btw, I recommend this Nix installer: https://github.com/DeterminateSystems/nix-installer) You don't really have to use But in short, cross-compilation towards Android is only supported on x86_64-linux in Looking at your error message, I'm assuming you're on a Mac - you'd need to have either a remote So with an up-to-date Nix and To do this manually you'd need set correct env vars to use cross C toolchain for linking and compilation from the Again, more than happy to help you with getting this working with |
Exist a example that show how integrate android targets that need ndk and compile stuff like rustqlite?
The text was updated successfully, but these errors were encountered: