box64: Enable build & dynarec on more platforms

- box64 should *work* on 64-bit little-endian Linux platforms.
I'm sure there's a way to apply functions and programmatically generate a `meta.platforms` that expresses this
(and I'll gladly accept any suggestions for this), but manually adding loongarch64 & mips64el for now.

- RISC-V received a dynarec option in 0.2.4, so enable it.

OPNA2608 d8fea65d d5de36d1

+6 -4
+6 -4
pkgs/applications/emulators/box64/default.nix
··· 5 5 , gitUpdater 6 6 , cmake 7 7 , python3 8 - , withDynarec ? stdenv.hostPlatform.isAarch64 8 + , withDynarec ? (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isRiscV64) 9 9 , runCommand 10 10 , hello-x86_64 11 11 }: 12 12 13 - # Currently only supported on ARM 14 - assert withDynarec -> stdenv.hostPlatform.isAarch64; 13 + # Currently only supported on ARM & RISC-V 14 + assert withDynarec -> (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isRiscV64); 15 15 16 16 stdenv.mkDerivation (finalAttrs: { 17 17 pname = "box64"; ··· 46 46 "-DARM64=${lib.boolToString stdenv.hostPlatform.isAarch64}" 47 47 "-DRV64=${lib.boolToString stdenv.hostPlatform.isRiscV64}" 48 48 "-DPPC64LE=${lib.boolToString (stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian)}" 49 + "-DLARCH64=${lib.boolToString stdenv.hostPlatform.isLoongArch64}" 49 50 ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ 50 51 # x86_64 has no arch-specific mega-option, manually enable the options that apply to it 51 52 "-DLD80BITS=ON" ··· 53 54 ] ++ [ 54 55 # Arch dynarec 55 56 "-DARM_DYNAREC=${lib.boolToString (withDynarec && stdenv.hostPlatform.isAarch64)}" 57 + "-DRV64_DYNAREC=${lib.boolToString (withDynarec && stdenv.hostPlatform.isRiscV64)}" 56 58 ]; 57 59 58 60 installPhase = '' ··· 98 100 license = licenses.mit; 99 101 maintainers = with maintainers; [ gador OPNA2608 ]; 100 102 mainProgram = "box64"; 101 - platforms = [ "x86_64-linux" "aarch64-linux" "riscv64-linux" "powerpc64le-linux" ]; 103 + platforms = [ "x86_64-linux" "aarch64-linux" "riscv64-linux" "powerpc64le-linux" "loongarch64-linux" "mips64el-linux" ]; 102 104 }; 103 105 })