Thank ! For the first question, I have probably badly exposed it (sorry). I’m aware it is possible to write package definition in a cross-compilation friendly way (and sometimes check that packages I made can be cross compiled). What I wanted to ask is: Is there a way that a derivation build using x86-64-linux waifu2x (or any other platform agnostic data producing tool), when served by a binary cache, be downloaded by a aarch64-darwin and reuse it.
The main obstacle to this, AFAIK, is the depency hashing. waifu2x isn’t the same hash (as it is a different platform), and so, won’t fetch it, as the result hash would also be different (if using input addressed hash. The final hash would be the same if using CA derivation, but it can’t know it until it build at, at which point downloading it is useless). I think this can be worked around by hardcoding a hash to the derivation, but this doesn’t look a good idea when all inputs are supposed to be deterministic.