forked from mirrors/nixpkgs
Merge pull request #189314 from Artturin/addemulatoravailable
This commit is contained in:
commit
d73864ae2f
|
@ -158,8 +158,10 @@ rec {
|
||||||
if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET"
|
if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET"
|
||||||
else if final.isiOS then "IPHONEOS_DEPLOYMENT_TARGET"
|
else if final.isiOS then "IPHONEOS_DEPLOYMENT_TARGET"
|
||||||
else null;
|
else null;
|
||||||
|
} // (
|
||||||
emulator = pkgs: let
|
let
|
||||||
|
selectEmulator = pkgs:
|
||||||
|
let
|
||||||
qemu-user = pkgs.qemu.override {
|
qemu-user = pkgs.qemu.override {
|
||||||
smartcardSupport = false;
|
smartcardSupport = false;
|
||||||
spiceSupport = false;
|
spiceSupport = false;
|
||||||
|
@ -171,7 +173,7 @@ rec {
|
||||||
pulseSupport = false;
|
pulseSupport = false;
|
||||||
smbdSupport = false;
|
smbdSupport = false;
|
||||||
seccompSupport = false;
|
seccompSupport = false;
|
||||||
hostCpuTargets = ["${final.qemuArch}-linux-user"];
|
hostCpuTargets = [ "${final.qemuArch}-linux-user" ];
|
||||||
};
|
};
|
||||||
wine-name = "wine${toString final.parsed.cpu.bits}";
|
wine-name = "wine${toString final.parsed.cpu.bits}";
|
||||||
wine = (pkgs.winePackagesFor wine-name).minimal;
|
wine = (pkgs.winePackagesFor wine-name).minimal;
|
||||||
|
@ -187,9 +189,16 @@ rec {
|
||||||
then "${pkgs.wasmtime}/bin/wasmtime"
|
then "${pkgs.wasmtime}/bin/wasmtime"
|
||||||
else if final.isMmix
|
else if final.isMmix
|
||||||
then "${pkgs.mmixware}/bin/mmix"
|
then "${pkgs.mmixware}/bin/mmix"
|
||||||
|
else null;
|
||||||
|
in {
|
||||||
|
emulatorAvailable = pkgs: (selectEmulator pkgs) != null;
|
||||||
|
|
||||||
|
emulator = pkgs:
|
||||||
|
if (final.emulatorAvailable pkgs)
|
||||||
|
then selectEmulator pkgs
|
||||||
else throw "Don't know how to run ${final.config} executables.";
|
else throw "Don't know how to run ${final.config} executables.";
|
||||||
|
|
||||||
} // mapAttrs (n: v: v final.parsed) inspect.predicates
|
}) // mapAttrs (n: v: v final.parsed) inspect.predicates
|
||||||
// mapAttrs (n: v: v final.gcc.arch or "default") architectures.predicates
|
// mapAttrs (n: v: v final.gcc.arch or "default") architectures.predicates
|
||||||
// args;
|
// args;
|
||||||
in assert final.useAndroidPrebuilt -> final.isAndroid;
|
in assert final.useAndroidPrebuilt -> final.isAndroid;
|
||||||
|
|
Loading…
Reference in a new issue