Closed amarrella closed 1 year ago
I didn't realize it had any native dependencies, so I'm surprised that doesn't just work. Yeah, adding that overlay for aarch64-darwin seems like an okay workaround to me. Would you like to submit a PR?
This will work but use the wrong JVM. You need to override the JRE for the x86 scala-cli so that it uses an arm-compiled one (otherwise scala-cli's bloop will run with rosetta, which... will be really slow).
I'm opening a PR asap :)
@rossabaker it's not about native dependencies - the scala-cli derivation is currently simply downloading an artifact from GitHub releases, and these don't include ARM variants for either Mac nor Linux. I think the original reason is that GH Actions didn't provide runners for these machines and (specifically macs) couldn't be emulated with something like qemu. Not sure if that's changed now.
I tried to build scala-cli from source in Nix, but with my limited time and knowledge of how Mill can be made reproducible I failed. Might try at some later point.
Hi! Thanks again for the project!
I've tried running it on a M1 mac and it fails because scala-cli doesn't support aarch64-darwin yet (i tried compiling it from scratch to contribute directly upstream but no success so far).
Luckily x86 packages still work on the M1 (via rosetta) even if not as performantly (but this is fine for scala-cli i believe). Do you think it would be a good idea to add some logic to overlay x86_64 scala cli on aarch64 architectures? Or provide an example in the docs?
I've worked around it in my local project like this and it works, but there is probably a more robust way