3
0
Fork 0
forked from mirrors/nixpkgs

cross/mingw: fix emulator for mingw32

This commit is contained in:
Jörg Thalheim 2022-11-06 20:10:25 +01:00
parent 68c387c298
commit 87f4f101d7

View file

@ -183,14 +183,13 @@ rec {
seccompSupport = false; seccompSupport = false;
hostCpuTargets = [ "${final.qemuArch}-linux-user" ]; hostCpuTargets = [ "${final.qemuArch}-linux-user" ];
}; };
wine-name = "wine${toString final.parsed.cpu.bits}"; wine = (pkgs.winePackagesFor "wine${toString final.parsed.cpu.bits}").minimal;
wine = (pkgs.winePackagesFor wine-name).minimal;
in in
if final.parsed.kernel.name == pkgs.stdenv.hostPlatform.parsed.kernel.name && if final.parsed.kernel.name == pkgs.stdenv.hostPlatform.parsed.kernel.name &&
pkgs.stdenv.hostPlatform.canExecute final pkgs.stdenv.hostPlatform.canExecute final
then "${pkgs.runtimeShell} -c '\"$@\"' --" then "${pkgs.runtimeShell} -c '\"$@\"' --"
else if final.isWindows else if final.isWindows
then "${wine}/bin/${wine-name}" then "${wine}/bin/wine${lib.optionalString (final.parsed.cpu.bits == 64) "64"}"
else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux
then "${qemu-user}/bin/qemu-${final.qemuArch}" then "${qemu-user}/bin/qemu-${final.qemuArch}"
else if final.isWasi else if final.isWasi