Open clotodex opened 4 months ago
Is there a workaround? If you an point me somewhere I can try myself at implementing it
cc @k3yss
Hey, @clotodex it looks like a problem with the implementation of androidenv
in nixpkgs
. Here is a link to the discourse discussion about this issue.
Yeah I found that too @k3yss but I thought it was fixed in https://github.com/NixOS/nixpkgs/pull/304716. Could it be that a) it actually got fixed, but the devenv rolling does not have the fix yet or b) this does not actually fix it for some reason or c) I misunderstood the discussion in the discourd and their way to resolve it is to just blame apple and use something legacy or rosetta?
Apart from me just wanting to make it work I am also wondering how we can have devenv support it "out of the box" since otherwise you have to go deep into nix do even start solving the issue. (Hence if we identify a workaround here I am happy to build that workaround into devenv to at least support it in some way out of the box)
I think @k3yss it is actually not yet in devenv-rolling: https://github.com/cachix/devenv-nixpkgs/blob/4267e705586473d3e5c8d50299e71503f16a6fb6/pkgs/development/mobile/androidenv/compose-android-packages.nix#L31
I dont understand fully how the update cycle there works but that is for another issue :D
@clotodex I currently don't have an access to a darwin device but if you want we can debug it together on discord. What I would do to start is instead of using devenv's nixpkgs I will use nixpkgs-unstable
, since we don't employ any patches for android stuff
#devenv.yaml
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable
Yes that would also be my plan I also dont have direct access but a coworker can check it out next week :)
@clotodex ping!
Thanks for the ping. It is working with unstable :) I needed to configure some darwin "systems" as well but now it is working
I can post the config in ~2 weeks if you are interested, that's when i have mac access again
@clotodex Do you need to configure something special for running android on mac? If yes, it would be great to look at the config and maybe automate some of it.
Not for our minimal setup in the end (had some legacy darwin things around but removing them did not break it) Disclaimer though: we dont have a full android setup though - just enough to make flutter work. For reference:
languages.dart.enable = true;
languages.dart.package = pkgs-master.flutter;
android = {
systemImageTypes = [];
abis = [];
emulator = {
enable = false;
};
sources.enable = false;
systemImages.enable = false;
ndk.enable = false;
googleAPIs.enable = false;
googleTVAddOns.enable = false;
extras = [];
android-studio.enable = false;
enable = true;
flutter.enable = true;
flutter.package = pkgs-master.pkgs.flutter;
};
env.FLUTTER_ROOT = lib.mkForce pkgs-master.flutter;
env.DART_ROOT = lib.mkForce "${pkgs-master.flutter}/bin/cache/dart-sdk";
However I still need unstable nixpkgs - it does not run with the default devenv ones
Describe the bug The nix install of the android sdk fails on the darwin architecture.
To reproduce android.enable=true on a macbook with an M processor
Logs
Version 1.0.7 - no flakes, latest update