From c6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 23 Aug 2023 16:20:57 +0300 Subject: [PATCH] nixos/binfmt: use PE magic to detect Wine executables Otherwise we break every Meson build because it creates native executables named foo.exe --- nixos/modules/system/boot/binfmt.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix index bf1688feb19..5172371d0af 100644 --- a/nixos/modules/system/boot/binfmt.nix +++ b/nixos/modules/system/boot/binfmt.nix @@ -137,14 +137,8 @@ let magicOrExtension = ''\x00asm''; mask = ''\xff\xff\xff\xff''; }; - x86_64-windows = { - magicOrExtension = "exe"; - recognitionType = "extension"; - }; - i686-windows = { - magicOrExtension = "exe"; - recognitionType = "extension"; - }; + x86_64-windows.magicOrExtension = "MZ"; + i686-windows.magicOrExtension = "MZ"; }; in {