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