box64: Refactor cmakeFlags, only check if executable, add meta.mainProgram

OPNA2608 d5de36d1 1b572d52

+12 -5
+12 -5
pkgs/applications/emulators/box64/default.nix
··· 41 42 cmakeFlags = [ 43 "-DNOGIT=ON" 44 - "-DARM_DYNAREC=${if withDynarec then "ON" else "OFF"}" 45 - "-DRV64=${if stdenv.hostPlatform.isRiscV64 then "ON" else "OFF"}" 46 - "-DPPC64LE=${if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then "ON" else "OFF"}" 47 ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [ 48 "-DLD80BITS=ON" 49 "-DNOALIGN=ON" 50 ]; 51 52 installPhase = '' ··· 57 runHook postInstall 58 ''; 59 60 - doCheck = true; 61 62 - doInstallCheck = true; 63 64 installCheckPhase = '' 65 runHook preInstallCheck ··· 91 description = "Lets you run x86_64 Linux programs on non-x86_64 Linux systems"; 92 license = licenses.mit; 93 maintainers = with maintainers; [ gador OPNA2608 ]; 94 platforms = [ "x86_64-linux" "aarch64-linux" "riscv64-linux" "powerpc64le-linux" ]; 95 }; 96 })
··· 41 42 cmakeFlags = [ 43 "-DNOGIT=ON" 44 + 45 + # Arch mega-option 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" 52 "-DNOALIGN=ON" 53 + ] ++ [ 54 + # Arch dynarec 55 + "-DARM_DYNAREC=${lib.boolToString (withDynarec && stdenv.hostPlatform.isAarch64)}" 56 ]; 57 58 installPhase = '' ··· 63 runHook postInstall 64 ''; 65 66 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 67 68 + doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 69 70 installCheckPhase = '' 71 runHook preInstallCheck ··· 97 description = "Lets you run x86_64 Linux programs on non-x86_64 Linux systems"; 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 })